On Tue, Oct 25, 2011 at 10:59:25PM -0500, Steve M. Robbins wrote: > The underlying problem is that "mcverter" segfaults in the > wxCmdLineParser.Parse() call. Below is a small test case that > exhibits this problem. > > Test transcript: [snip]
This seems to be an issue with wx upstream. If I build their console sample to test wxCmdLine then it also segfaults: g++ -oconsole -DTEST_CMDLINE `wx-config --cxxflags` console.cpp `wx-config --libs` Either removing the use of wxInitializer or passing argc and argv to its constructor fixes the segfault. The issue is that (at least in wx2.8) the app name used by wxCmdLineParser is got from wxTheApp->argv if wxTheApp is non-NULL, without checking further. I'll patch wxwidgets2.8 to also check wxTheApp->argc > 0 there, as it does elsewhere in the same source file before using wxTheApp->argv[0]. Then it'll use the argv passed to wxCmdLineParser instead in this case (it seems a bit odd that it uses a different argv at all, but I'd rather not diverge from what wx upstream have chosen to do here). The code in mriconvert can probably easily work around this by passing argc and argv to wxInitializer (and it probably ought to in upstream versions so that it works with current wx 2.8 releases). Cheers, Olly -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org