*** Caught unhandled unknown exception; terminating
[ snip -- repeats all the way to #1 ]
#163767 0x00d34ecf in wxMBConv::WC2MB (this=0x16844d0, outBuff=0x0, inBuff=0x821c010 L"/home/keith/Desura", outLen=0) at ./src/common/strconv.cpp:371
#163768 0x00d34d4a in wxMBConv::FromWChar (this=0x16844d0, dst=0x0, dstLen=0, src=0x821c010 L"/home/keith/Desura", srcLen=19) at ./src/common/strconv.cpp:330
#163769 0x00d34ecf in wxMBConv::WC2MB (this=0x16844d0, outBuff=0x0, inBuff=0x821c010 L"/home/keith/Desura", outLen=0) at ./src/common/strconv.cpp:371
#163770 0x00d34d4a in wxMBConv::FromWChar (this=0x16844d0, dst=0x0, dstLen=0, src=0x821c010 L"/home/keith/Desura", srcLen=19) at ./src/common/strconv.cpp:330
#163771 0x00d34ecf in wxMBConv::WC2MB (this=0x16844d0, outBuff=0x0, inBuff=0x821c010 L"/home/keith/Desura", outLen=0) at ./src/common/strconv.cpp:371
#163772 0x00d34d4a in wxMBConv::FromWChar (this=0x16844d0, dst=0x0, dstLen=0, src=0x821c010 L"/home/keith/Desura", srcLen=19) at ./src/common/strconv.cpp:330
#163773 0x00d34ecf in wxMBConv::WC2MB (this=0x16844d0, outBuff=0x0, inBuff=0x821c010 L"/home/keith/Desura", outLen=0) at ./src/common/strconv.cpp:371
#163774 0x00d34d4a in wxMBConv::FromWChar (this=0x16844d0, dst=0x0, dstLen=0, src=0x821c010 L"/home/keith/Desura", srcLen=19) at ./src/common/strconv.cpp:330
#163775 0x00d34ecf in wxMBConv::WC2MB (this=0x16844d0, outBuff=0x0, inBuff=0x821c010 L"/home/keith/Desura", outLen=0) at ./src/common/strconv.cpp:371
#163776 0x00d34d4a in wxMBConv::FromWChar (this=0x16844d0, dst=0x0, dstLen=0, src=0x821c010 L"/home/keith/Desura", srcLen=19) at ./src/common/strconv.cpp:330
#163777 0x00d34ecf in wxMBConv::WC2MB (this=0x16844d0, outBuff=0x0, inBuff=0x821c010 L"/home/keith/Desura", outLen=0) at ./src/common/strconv.cpp:371
#163778 0x00d34d4a in wxMBConv::FromWChar (this=0x16844d0, dst=0x0, dstLen=0, src=0x821c010 L"/home/keith/Desura", srcLen=18) at ./src/common/strconv.cpp:330
#163779 0x00d3fb10 in wxString::AsChar (this=0x81c8908, conv=...) at ./src/common/string.cpp:535
#163780 0x00cdee18 in wxString::AsCharBuf (this=0x81c8908, conv=...) at ./include/wx/string.h:3513
#163781 0x00cded98 in wxString::mb_str (this=0x81c8908, conv=...) at ./include/wx/string.h:1813
---Type <return> to continue, or q <return> to quit---
#163782 0x00cec4a7 in wxString::fn_str (this=0x81c8908) at ./include/wx/string.h:1830
#163783 0x00d7e640 in wxSingleInstanceCheckerImpl::Unlock (this=0x81c8900) at ./src/unix/snglinst.cpp:321
#163784 0x00d7ed5a in ~wxSingleInstanceCheckerImpl (this=0x81c8900, __in_chrg=<value optimized out>) at ./src/unix/snglinst.cpp:124
#163785 0x00d7ec84 in ~wxSingleInstanceChecker (this=0x81c3b88, __in_chrg=<value optimized out>) at ./src/unix/snglinst.cpp:395
#163786 0x0062d8b9 in void safe_delete<wxSingleInstanceChecker>(wxSingleInstanceChecker*&) () from /home/keith/desura/build/lin_debug/lib/libuicore.so
#163787 0x0064e8e7 in UICore::~UICore() () from /home/keith/desura/build/lin_debug/lib/libuicore.so
#163788 0x002e31bf in ?? () from /lib/tls/i686/cmov/libc.so.6
#163789 0x002e322f in exit () from /lib/tls/i686/cmov/libc.so.6
#163790 0x002cabde in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#163791 0x0804c981 in _start ()
(gdb)
KP> Before I get into it, quick specs: Ubuntu 10.04.3 LTS i386, GCC 4.5.3,
KP> wxWidgets 2.9.0.
As the first thing, please try updating to 2.9.2, there is really no
reason to stick to (very old by now) 2.9.0.
KP> Suddenly we've had the program terminating abnormally with:
KP>
KP> > *** Caught unhandled unknown exception; terminating
Do you expect your program to throw an exception? If not, set a
breakpoint on throw in gdb to learn where does it come from.
KP> Doing a gdb and backtrace shows the following:
KP>
KP> > [ snip -- repeats all the way to #1 ]
KP> > #163767 0x00d34ecf in wxMBConv::WC2MB (this=0x16844d0, outBuff=0x0,
KP> > inBuff=0x821c010 L"/home/keith/Desura", outLen=0) at
KP> > ./src/common/strconv.cpp:371
...
KP> > #163787 0x0064e8e7 in UICore::~UICore() () from
KP> > /home/keith/desura/build/lin_debug/lib/libuicore.so
KP> > #163788 0x002e31bf in ?? () from /lib/tls/i686/cmov/libc.so.6
KP> > #163789 0x002e322f in exit () from /lib/tls/i686/cmov/libc.so.6
KP> > #163790 0x002cabde in __libc_start_main () from
KP> > /lib/tls/i686/cmov/libc.so.6
KP> > #163791 0x0804c981 in _start ()
It looks like you're using wx functionality from a dtor of a global object
which is being destroyed after wx had been shut down. The simple answer is:
do not do this. A possible fix could be to catch the exception which
results in abnormal program termination and destroy your UICore earlier but
it's really impossible to say more without knowing anything about your
code.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
On Fri, 29 Jul 2011 16:16:06 +1000 Keith Poole <pla...@gmail.com> wrote:
KP> Before I get into it, quick specs: Ubuntu 10.04.3 LTS i386, GCC 4.5.3,
KP> wxWidgets 2.9.0.
As the first thing, please try updating to 2.9.2, there is really no
reason to stick to (very old by now) 2.9.0.
KP> On Fri, Jul 29, 2011 at 10:38 PM, Vadim Zeitlin <va...@wxwidgets.org> wrote:
KP>
KP> > On Fri, 29 Jul 2011 16:16:06 +1000 Keith Poole <pla...@gmail.com> wrote:
KP> >
KP> > KP> Before I get into it, quick specs: Ubuntu 10.04.3 LTS i386, GCC 4.5.3,
KP> > KP> wxWidgets 2.9.0.
KP> >
KP> > As the first thing, please try updating to 2.9.2, there is really no
KP> > reason to stick to (very old by now) 2.9.0.
KP>
KP> Unfortunately we're suck on 2.9.0 for now, although congrats on the recent
KP> release/milestone. We're stuck because we have had to patch some things in
KP> 2.9.0 to achieve the functionality that we want for our (extremely) custom
KP> interface -- http://www.desura.com . I have suggested to the lead developer
KP> that we upgrade though, as I can see a lot of great changes.
You could also consider contributing some of your changes to wxWidgets if
it makes sense. This will take some effort initially but in my experience
will save much more time later as you would be able to upgrade much easier.
KP> By the way, I managed to follow a fair bit of the code back, and it's error
KP> in the call to wxEntry(), which has me even more baffled. Something in that
KP> code is causing some sort of loop between WC2MB and FromWChar which
KP> eventually crashes the call.
I think you're using some invalid (already destroyed) global wxMBConv
pointer. I could be wrong but it should be easy to check, just look if the
value of "this" in WC2MB() looks correct.