Access violation reading location

2022.04: insert version you are using (i.e. 2021.11)
Windows: insert platform, incl. version (i.e. Ubuntu 20.04)

Issue
I’m running Cubit example file on examples/CubitLib/ . There is an error while calling CubitInterface::initi(). Exception thrown at 0x00007FFD0EF9C369 (msvcr120.dll) in CubitC++.exe: 0xC0000005: Access violation reading location 0x000000230E970000. Do you have some suggestions how to fix it?

Thanks,

lge

Can you reproduce the error in the Visual Studio debugger and post the call stack?

CallStack.pdf (14.2 KB)

I reinstall Coreform 2022.4, and adding some dynamic link lib, the error message changed to: Exception thrown at 0x00007FFD45BE1470 (vcruntime140.dll) in CubitC++.exe: 0xC0000005: Access violation reading location 0x0000000906FDF1E6. the call stack is attached.
vcruntime140CallStack.pdf (12.1 KB)

Are you able to share your code? From the callstack I’m not able to deduce much. It’s likely that something is not being initialized correctly.

The code is exactly the same as the /examples/CubitLib/main.C. It crashed while calling CubitInterface::init(my_args);

@scot Could we have a short zoom meeting? Thanks

For others who may read this: The problem was making sure the Cubit bin directory and the bin/acis/code/bin directories were in PATH at runtime, as well as building in Release mode to make sure the Windows C runtimes matched.