"Hello, world!" crashes during exit

Vadim Zeitlin vadim at wxwindows.org
Fri May 25 06:16:51 PDT 2007


On Fri, 25 May 2007 12:59:14 +0700 Slava Semushin <slava.semushin at gmail.com> wrote:

SS> I'm newbie in programming with WxWidgets. I'm trying to compile
SS> "hello, world!" example from site:
SS> http://wxwidgets.org/docs/tutorials/hello.htm
SS> 
SS> (BTW, I think this example may be upgraded by using
SS> wxID_ABOUT/wxID_EXIT contants instead of self defined enumeration...)

 Funny you should say this, I thought using these "magic" constants would
be too confusing for the beginners. Maybe I was wrong.

SS> But after exit from application I see error message in console about
SS> segmentation fault. I try search in mailing lists and in forums, but
SS> not find any solutions.
SS> 
SS> What problems can happens and how I can fix her?

 I don't think there are any bugs in the code which can result in a crash
in such simple example so I suspect the libraries were built incorrectly
somehow and/or there was a mismatch between library headers and actual
libraries used.

SS> About my system:
SS> SuSe 10.1 (i586) with wxWidgets from packman
SS> (http://packman.links2linux.de/package/wxWidgets/26529):
SS> wxWidgets-devel-2.8.4-0.pm.1
SS> wxWidgets-debuginfo-2.8.4-0.pm.1
SS> wxWidgets-2.8.4-0.pm.1
SS> wxWidgets-docs-2.8.4-0.pm.1
SS> with gcc-c++-4.1.0-25

 Are you sure the packages were built with the same compiler version or at
least a compatible one?

 Also, seeing you have the debug info package, what about running the
program under gdb and looking at the backtrace ("bt" command) when it
crashes?

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list