gnucash -help crashes

Charles Day cedayiv at gmail.com
Sat Dec 15 21:20:43 EST 2007


On Dec 15, 2007 12:08 PM, Josh Sled <jsled at asynchronous.org> wrote:

> "Charles Day" <cedayiv at gmail.com> writes:
> >> I realized by accident that starting GnuCash 2.2.1 with a "-help"
> option (as
> >> opposed to "--help") causes a crash, at least on Windows XP.  If I
> launch
> >> from within dbg, the signal received is SIGTRAP, which seems very odd
> since
> >> I never set any breakpoints.
> >>
> >> Any ideas, or shall I file a bug report? I couldn't find anything
> similar in
> >> Bugzilla.
> >
> > My guess is that this happens because glib was compiled with debugging
> turned
> > on (G_ENABLE_DEBUG). So instead of quitting cleanly, you crash with a
> SIGTRAP
> > signal when g_error() is called. If my theory is right, then maybe some
> of the
> > other "GnuCash crashes when X happens" bugs are coming from this.
>
> Yeah, that's exactly what's happening, and it's a bit annoying.  I've just
> changed this to a [[[ g_warning(…); exit(1); ]]] instead.
>

That fixed it!  You might want take a look at the rest of the calls to
g_error() in gnucash-bin.c. In each case, there is code after the call that
will never get executed. It doesn't make sense. In other .c files, g_error()
only appears to be used when a bug is detected in the code.

-Charles


More information about the gnucash-user mailing list