U++ Forum - RDF feed
https://www.ultimatepp.org/forums/
GeoFun crashes under Ubuntu
https://www.ultimatepp.org/forums/index.php?t=rview&goto=39629&th=7563#msg_39629
I just upgrade my Upp to 5973-Quantal-i386 and I noticed that the example app GeoFun craches just after run command (see the picture enclosed)
The assertion problem concerns line 33 in VCont.h header file.
Please note that Geofun compiles and runs normally under Win7 (Upp 5973 version too) using MSC9.
I suspect that the problem comes with the GCC compiler under Linux.
Regards
Biobytes
]]>BioBytes2013-04-10T20:41:52-00:00Re: GeoFun crashes under Ubuntu
https://www.ultimatepp.org/forums/index.php?t=rview&goto=39634&th=7563#msg_39634
I checked from downloaded UPP-5974 source of GeoFun .
It worked well with debug mode and optimal mode compile.
]]>deep2013-04-11T13:40:32-00:00Re: GeoFun crashes under Ubuntu
https://www.ultimatepp.org/forums/index.php?t=rview&goto=39637&th=7563#msg_39637
Thank you very much for the information about Ubuntu 12.04 and Upp 5914.
I tried again to compile GeoFun and got the assert error message only under debug mode. When the project is compiled using the optimal mode, all is working perfectly.
Biobytes
]]>BioBytes2013-04-11T18:40:51-00:00Re: GeoFun crashes under Ubuntu
https://www.ultimatepp.org/forums/index.php?t=rview&goto=39643&th=7563#msg_39643
BioBytes wrote on Fri, 12 April 2013 00:10
I tried again to compile GeoFun and got the assert error message only under debug mode. When the project is compiled using the optimal mode, all is working perfectly.
How to find solution for such problems. What will be the source of error when it works OK with one compile mode and gives error like this in other.
This program works when compiled with MinGW32 debug. And gives assertion error in all release modes.(WIN7) ]]>deep2013-04-12T07:06:19-00:00Re: GeoFun crashes under Ubuntu
https://www.ultimatepp.org/forums/index.php?t=rview&goto=39645&th=7563#msg_39645
deep wrote on Fri, 12 April 2013 09:06
How to find solution for such problems. What will be the source of error when it works OK with one compile mode and gives error like this in other.
This program works when compiled with MinGW32 debug. And gives assertion error in all release modes.(WIN7)
ASSERT macros and messages are only defined in debug mode. In release mode, it should "just crash".
If debug asserts, and in optimal it works, then it might be in any part of code that is wrapped by #define DEBUG or similar. Also, there can be difference in default initialization of variables - in optimized modes, variables can contain random values before first assignment. Have you tried to run the application in debugger and inspect the values of the variables when it crashes?
The screenshot below shows assert in Vector code, which ussualy happens when you try to access item in vector with negative index, or with index bigger than size size of the vector. You should check that in your code. Debugger can help with this too if you look in the stack frames above the one that asserts.
Best regards,
Honza]]>dolik.rce2013-04-12T07:31:59-00:00Re: GeoFun crashes under Ubuntu
https://www.ultimatepp.org/forums/index.php?t=rview&goto=39646&th=7563#msg_39646
Thank you for answer.
You are right - It crashes with release mode MinGW32.
I will look in the code. ]]>deep2013-04-12T07:44:29-00:00Re: GeoFun crashes under Ubuntu
https://www.ultimatepp.org/forums/index.php?t=rview&goto=39647&th=7563#msg_39647
dolik.rce wrote on Fri, 12 April 2013 09:31
The screenshot below shows assert in Vector code, which ussualy happens when you try to access item in vector with negative index, or with index bigger than size size of the vector. You should check that in your code. Debugger can help with this too if you look in the stack frames above the one that asserts.
]]>Zbych2013-04-12T08:31:49-00:00Re: GeoFun crashes under Ubuntu
https://www.ultimatepp.org/forums/index.php?t=rview&goto=39648&th=7563#msg_39648
Thank you all for considering this issue with GeoFun project. Just to make things clearer, there is no problem at all under Win 7 using Upp 5973 either under debug or optimal mode.
Thank you Honza for reminding us that assert is concerning the Debug mode. When using the embedded debugger for GCC under Upp 5973 and Ubuntu 12.10 (Quantal), the assert dialog window is sent to the screen when line 325 in TopWindow.cpp ("EvenLoop(this)") is executed. I guess it should be a side effect.
Thank you Deepak for having developped GeoFun which brings very interesting elements for complex graphics development.
And thank you also Zbych for your post related to the assert patch. I will try it surely as I use GCC under Linux while I prefer MSC9 or 10 under Win7.