Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » GeoFun crashes under Ubuntu
GeoFun crashes under Ubuntu [message #39629] Wed, 10 April 2013 22:41 Go to next message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hi all guys,

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)

index.php?t=getfile&id=4132&private=0

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

Re: GeoFun crashes under Ubuntu [message #39634 is a reply to message #39629] Thu, 11 April 2013 15:40 Go to previous messageGo to next message
deep is currently offline  deep
Messages: 263
Registered: July 2011
Location: Bangalore
Experienced Member
Hi BioBytes,

I checked from downloaded UPP-5974 source of GeoFun .

It is working on following config.

Ubuntu 12.04,
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
UPP-5914

It worked well with debug mode and optimal mode compile.



Warm Regards

Deepak
Re: GeoFun crashes under Ubuntu [message #39637 is a reply to message #39634] Thu, 11 April 2013 20:40 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hi Deepak,

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
Re: GeoFun crashes under Ubuntu [message #39643 is a reply to message #39637] Fri, 12 April 2013 09:06 Go to previous messageGo to next message
deep is currently offline  deep
Messages: 263
Registered: July 2011
Location: Bangalore
Experienced Member
Hi,

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)


Warm Regards

Deepak

[Updated on: Fri, 12 April 2013 09:07]

Report message to a moderator

Re: GeoFun crashes under Ubuntu [message #39645 is a reply to message #39643] Fri, 12 April 2013 09:31 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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
Re: GeoFun crashes under Ubuntu [message #39646 is a reply to message #39645] Fri, 12 April 2013 09:44 Go to previous messageGo to next message
deep is currently offline  deep
Messages: 263
Registered: July 2011
Location: Bangalore
Experienced Member
Hi Honza,

Thank you for answer.

You are right - It crashes with release mode MinGW32.

I will look in the code.


Warm Regards

Deepak
Re: GeoFun crashes under Ubuntu [message #39647 is a reply to message #39645] Fri, 12 April 2013 10:31 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
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.



Some time ago I proposed a patch that displays call stack in an assert window:
http://www.ultimatepp.org/forum/index.php?t=msg&th=7275& amp;start=0&

It could be helpful in such situations.

Re: GeoFun crashes under Ubuntu [message #39648 is a reply to message #39647] Fri, 12 April 2013 21:09 Go to previous message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hi Deep, Honza and Zbych,

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.

Regards

Biobytes
Previous Topic: Problem with TheIDE
Next Topic: expect feature: Selection Highlight
Goto Forum:
  


Current Time: Thu Mar 28 11:10:17 CET 2024

Total time taken to generate the page: 0.02361 seconds