"Hello, world!" crashes during exit
Vadim Zeitlin
vadim at wxwindows.org
Fri May 25 09:46:26 PDT 2007
On Fri, 25 May 2007 23:37:20 +0700 Slava Semushin <slava.semushin at gmail.com> wrote:
SS> 2007/5/25, Vadim Zeitlin <vadim / wxwindows.org>:
SS> [...]
SS> > SS> (BTW, I think this example may be upgraded by using
SS> > SS> wxID_ABOUT/wxID_EXIT contants instead of self defined enumeration...)
SS> >
SS> > Funny you should say this, I thought using these "magic" constants would
SS> > be too confusing for the beginners. Maybe I was wrong.
SS>
SS> IMHO these constants have speakers names and can't confuse users. And
SS> if I`m not mistaken when we use these constants in menus appear icons
SS> and additional hints in status bar.
Yes, I agree that using these constants is simple and understandable. What
worries me is that I know many people start from the minimal sample and
then try to write their own program by extending it (nothing bad with it)
and they risk to be stumped when they need to add a non standard menu item.
But maybe I worry too much.
SS> > I don't think there are any bugs in the code which can result in a crash
SS> > in such simple example so I suspect the libraries were built incorrectly
SS> > somehow and/or there was a mismatch between library headers and actual
SS> > libraries used.
SS>
SS> May be. And how test this? Build wxWidgets from sources?
Well, this would definitely answer the question. Maybe rebuild it from SRPM.
Also, do check that you don't have multiple wx installations on your system
somehow.
SS> > Are you sure the packages were built with the same compiler version or at
SS> > least a compatible one?
SS>
SS> No.
To be honest, I'd expect the program to crash on startup, not shutdown, if
the problem was really due to a compiler/library incompatibility so I don't
really think this is the case but who knows.
SS> > Also, seeing you have the debug info package, what about running the
SS> > program under gdb and looking at the backtrace ("bt" command) when it
SS> > crashes?
SS>
SS> I try debug under gdb and see to bt output, but I received only
SS> question signs instead of real names of functions. Also I try to link
SS> againts wxWidgets with debug symbols (from wxWidgets-debuginfo
SS> package) but my dance with LD_LIBRARY variable and -L flag fails =( (I
SS> check this by grep'ing ldd output)
I don't know what does wxWidgets-debuginfo package contain but if it
really has debug wx libraries (and not just debug info for the libraries in
the main package as I'd expect) you need to use `wx-config --debug ...` to
link with them.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list