Friday, June 5, 2020

The solution is DYNAMICBASE:NO

I usually make a program from a project template of Visual Studio 2019.
I used a geometry processing library, Libigl, to make surface from implicit functions because I had used the library earlier.
All examples of the default tutorial had no problem, but some problems occurred when I execute problems I made from the project template of Visual Studio.
Unfortunately, one was the example of parameterization to make extract surfaces on UV coordinate, which I wanted to use. 
An access violation occurred about libopenblas.dll when it ran on the release mode build, while there was no error on the debug mode build.
That was an unfamiliar action of the program, and there were very few articles about this issue on the web. 
So, I checked flags of the project file, and I tried to edit them. At the time, I had understood the problem occurred around memory management, and then I focused on it.  Also, differences between both the modes point the problem location out because the debug mode did not hold this problem but the release mode did. 

From them, I found a point to repair the program. The linker option has a "base address randomization" flag. Then that was yes, this program occurred. So, the easiest solution was to change the flag to no (DYNAMICBASE:NO).