After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 133071 - --disable-crash-dialog doesn't work
--disable-crash-dialog doesn't work
Status: RESOLVED FIXED
Product: libgnomeui
Classification: Deprecated
Component: general
2.5.x
Other Linux
: Normal normal
: future
Assigned To: libgnomeui maintainers
libgnomeui maintainers
: 321581 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-01-31 16:06 UTC by Christian Marillat
Modified: 2006-05-02 10:26 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
crash-dialog.patch (1.50 KB, patch)
2004-02-03 22:44 UTC, Jeffrey Stedfast
none Details | Review
disable_crash_dialog_simplify_implementation.patch (2.00 KB, patch)
2004-04-09 00:16 UTC, Scott Tsai
none Details | Review
only call libgnomeui_segv_setup once (2.14 KB, patch)
2004-08-18 16:19 UTC, Robert McQueen
none Details | Review
a working version (atoi on NULL considered harmful) (2.15 KB, patch)
2004-08-18 16:35 UTC, Robert McQueen
needs-work Details | Review
Updated patch (2.42 KB, patch)
2005-07-05 08:41 UTC, Loïc Minier
none Details | Review
updated patch for HEAD (2.28 KB, patch)
2005-07-05 09:02 UTC, Kjartan Maraas
committed Details | Review

Description Christian Marillat 2004-01-31 16:06:04 UTC
Hi,

http://bugs.debian.org/230503

I want to get a coredump from blackjack, but I keep getting the gnome crash
dialog instead. I tried --disable-crash-dialog, but it seems to have no effect.
Comment 1 Fernando Herrera 2004-02-03 22:39:56 UTC
Wrong debian bug number.
BTW it is confirmed by fejj. a problem with G_PARAM_CONSTRUCT_ONLY
Comment 2 Jeffrey Stedfast 2004-02-03 22:44:18 UTC
Created attachment 24038 [details] [review]
crash-dialog.patch
Comment 3 Jeffrey Stedfast 2004-02-03 22:49:33 UTC
patch applied to CVS
Comment 4 Christian Marillat 2004-02-06 20:31:05 UTC
Are you sure this is the right patch ?

The dialog box is definitely gone with this patch.
Comment 5 Christian Marillat 2004-02-07 13:20:45 UTC
I reopen this bug. Still here even with the patch
Comment 6 Christian Persch 2004-02-15 20:51:58 UTC
With the patch from bug 131867 now comitted, the
--disable-crash-dialog option should now correctly disable the crash
dialogue, and otherwise show that dialogue. Can you confirm that it
works now? It does work for me.
Comment 7 Christian Marillat 2004-02-15 21:32:43 UTC
It doesn't work for me. Both patches apllied against 2.4.0
Comment 8 Allison Karlitskaya (desrt) 2004-03-31 11:17:36 UTC
this is still a problem in libgnomeui-2.6.0
Comment 9 Scott Tsai 2004-04-09 00:16:30 UTC
Created attachment 26491 [details] [review]
disable_crash_dialog_simplify_implementation.patch

This bug is indeed still present in libgnomeui CVS HEAD.
Attached patch to fix it by only calling libgnomeui_segv_setup in
libgnomeui_post_args_parse.
You may not want to apply this patch as-is, but it shows a way to simplify the
code paths to get rid of this bug once and for all.
Comment 10 Robert McQueen 2004-08-18 16:18:30 UTC
Yeah, the cause to this bug is still present. Currently it sets up the segv
handler in pre_args_parse as well as post_args_parse, and it looks like there
was meant to be some magic when it was called from pre_args_parse that... well..
exactly. The magic is unimplemented. There's no sensible way to determine if the
segv handler should be registered until after you parse args, so it just ended
up always registering the handler whether or not you disabled it on the command
line. The patch I wrote to fix this is similar to Scott's in that it just rips
the broken code out, along with some confusing double-negatives, but is included
for reference anyway.
Comment 11 Robert McQueen 2004-08-18 16:19:52 UTC
Created attachment 30707 [details] [review]
only call libgnomeui_segv_setup once
Comment 12 Robert McQueen 2004-08-18 16:35:39 UTC
Created attachment 30708 [details] [review]
a working version (atoi on NULL considered harmful)
Comment 13 Loïc Minier 2005-07-04 19:04:25 UTC
Any reason not to commit this?
Comment 14 Kjartan Maraas 2005-07-05 08:18:39 UTC
It doesn't apply cleanly any more. Sorry about that.
Comment 15 Loïc Minier 2005-07-05 08:41:58 UTC
Created attachment 48659 [details] [review]
Updated patch

Yeah, I had to update the patch yesterday.

I tested it, and it indeed brings back support of --disable-crash-dialog here.

(This is shipped in Debian.)
Comment 16 Kjartan Maraas 2005-07-05 08:53:46 UTC
It still doesn't apply to HEAD:

[kmaraas@localhost libgnomeui]$ patch < ~/libgnomeui-crash-dialog-fix.patch
patching file gnome-ui-init.c
Hunk #1 FAILED at 88.
Hunk #2 FAILED at 277.
Hunk #3 FAILED at 533.
Hunk #4 succeeded at 667 (offset 8 lines).
3 out of 4 hunks FAILED -- saving rejects to file gnome-ui-init.c.rej
Comment 17 Kjartan Maraas 2005-07-05 09:02:53 UTC
Created attachment 48662 [details] [review]
updated patch for HEAD

Attaching an updated patch. Please check if this is ok for the Win32 case as
well.
Comment 18 Loïc Minier 2005-07-05 09:06:17 UTC
Sorry, I updated the patch to match the 2.10 tarball, not HEAD.

(I can't check for Win32, and I probably won't check for 2.11 before 2.12 is
prepared for Debian.)
Comment 19 Kjartan Maraas 2005-07-05 09:26:54 UTC
no problem, I'll ask the win32 maintainer to look it over.
Comment 20 Christian Persch 2006-03-25 21:42:32 UTC
The patch looks good to me, and changes nothing in win32 (crash dialogue setup is #ifndef G_OS_WIN32). Kjartan, can we apply this now?
Comment 21 Christian Persch 2006-03-25 21:47:17 UTC
*** Bug 321581 has been marked as a duplicate of this bug. ***
Comment 22 Kjartan Maraas 2006-04-07 07:13:24 UTC
If it's been tested and found to work it's ok by me. Go ahead and commit to both branches.
Comment 23 Christian Persch 2006-04-08 17:19:34 UTC
Checked in, and verified with gnome-crash from bug-buddy.
Comment 24 Ghee Teo 2006-04-27 16:46:22 UTC
I tried with gnome 2.14,
eog --disable-crash-dialog

kill -SEGV `pgrep eog`

The crash dialog still come up.

But when I did,
GNOME_DISABLE_CRASH_DIALOG=1 eog
kill -SEGV `pgrep eog`

A core file is generated.

Can anyone tell me what releases has the patch been checked into?
Thanks.
Comment 25 Christian Persch 2006-05-02 10:04:43 UTC
Should be fixed in 2.14.1.
Comment 26 Ghee Teo 2006-05-02 10:26:16 UTC
Thanks, Chpe ;)