MicBosi / VisualizationLibrary

Visualization Library is a C++ middleware for high-performance 2D and 3D graphics applications based on OpenGL 1.x-4.x supporting Windows, Linux and Mac OS X.
http://VisualizationLibrary.org
Other
342 stars 96 forks source link

vlQt4_test is crashing on assert #164

Closed Fojtik closed 4 years ago

Fojtik commented 6 years ago

I suspect, that a main problem is using argv[1] without checking argc. "test_battery.run(test, argv[1], format);"

    msvcp90d.dll!104ebfbd()     
    msvcp90d.dll!10488d7c()     
    msvcp90d.dll!1048816c()     
>   vlQt4_tests.exe!main(int argc=1, char * * argv=0x01777fe8)  Line 92 + 0x15 bytes    C++
    vlQt4_tests.exe!WinMain(HINSTANCE__ * instance=0x00400000, HINSTANCE__ * prevInstance=0x00000000, char * __formal=0x00161f33, int cmdShow=1)  Line 131 + 0x12 bytes C++
    vlQt4_tests.exe!__tmainCRTStartup()  Line 574 + 0x35 bytes  C
    vlQt4_tests.exe!WinMainCRTStartup()  Line 399   C
    kernel32.dll!7c816e0f()     
    vlQt4_tests.exe!App_Texturing::texture1DArray()  Line 240 + 0x65 bytes  C++
    74006300()  
Fojtik commented 6 years ago

This would fix a problem: test_battery.run(test, (argc>=2)?argv[1]:"Empty", format);

You are passing std::string through constant reference. And even NULL in argv[1] is not acceptable.

MicBosi commented 4 years ago

Issue closed, see https://github.com/MicBosi/VisualizationLibrary/issues/113