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 303221 - [PATCH]crash when using a detached menu after closing the associated diagram
[PATCH]crash when using a detached menu after closing the associated diagram
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: general
0.94
Other other
: High major
: 0.95
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2005-05-06 09:08 UTC by Predrag Minic
Modified: 2005-05-09 11:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch fixing crash on closing nonexisting diagram from detached menu (460 bytes, patch)
2005-05-07 01:38 UTC, Radek Krahl
committed Details | Review

Description Predrag Minic 2005-05-06 09:08:24 UTC
Distribution: Debian 3.1
Package: dia
Severity: normal
Version: GNOME2.8.3 0.94
Gnome-Distributor: Debian
Synopsis: Crashes when using a detached menu after closing the diagram.
Bugzilla-Product: dia
Bugzilla-Component: general
Bugzilla-Version: 0.94
BugBuddy-GnomeVersion: 2.0 (2.8.1)
Description:
Description of the crash:
When one detaches the file menu from a diagram, and closes that diagram,
the menu related to that diagram stays open.  After that, an action on
that menu crashes dia.

Steps to reproduce the crash:
1. Detach a menu from the diagram.
2. Click close on that menu.
3. Click close on that menu again.

Expected Results:
Dia crashes.

How often does this happen?
Always

Additional Information:




Debugging Information:

Backtrace was generated from '/usr/bin/dia-gnome'

(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
`system-supplied DSO at 0xffffe000' has disappeared; keeping its
symbols.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 1088354112 (LWP 4848)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0x40b4c4ee in __waitpid_nocancel () from /lib/tls/libpthread.so.0

Thread 1 (Thread 1088354112 (LWP 4848))

  • #0 __waitpid_nocancel
    from /lib/tls/libpthread.so.0
  • #1 libgnomeui_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #2 <signal handler called>
  • #3 ddisplay_close
  • #4 gtk_item_factory_new
    from /usr/lib/libgtk-x11-2.0.so.0
  • #5 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #6 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #7 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #8 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #9 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #10 gtk_widget_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #11 gtk_menu_shell_activate_item
    from /usr/lib/libgtk-x11-2.0.so.0
  • #12 _gtk_menu_shell_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #13 gtk_menu_reorder_child
    from /usr/lib/libgtk-x11-2.0.so.0
  • #14 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #15 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #20 gtk_widget_send_expose
    from /usr/lib/libgtk-x11-2.0.so.0
  • #21 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #22 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #24 g_main_depth
    from /usr/lib/libglib-2.0.so.0
  • #25 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #26 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #27 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #28 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #29 main
  • #0 __waitpid_nocancel
    from /lib/tls/libpthread.so.0




------- Bug moved to this database by unknown@bugzilla.gnome.org 2005-05-06 09:08 UTC -------

Comment 1 Christian Kirbach 2005-05-06 13:49:42 UTC
hmmm unique stack trace.

Strange I cannot reproduce the crash using your steps.

Dia 0.94 , Debian testing as well

Maybe your system/libs are in an inconsistant state?

Try apt-get update upgrade .
Comment 2 Predrag Minic 2005-05-06 14:06:48 UTC
I'll do the upgrade during the night, in the meanwhile, I tried same steps on
Fedora Core 2, dia 0.92.2 and it works (that is, it crashes), if it's any help.
Comment 3 Christian Kirbach 2005-05-06 15:32:18 UTC
That is version 0.92.2 on FC2? 
Is that your version on Debian as well?

0.94 is the latest.
Please try the latest.
Comment 4 Predrag Minic 2005-05-06 16:53:10 UTC
No, my version on Debian is (and was) 0.94, version on FC2 was 0.92.2 (was
crashing), but I have just installed 0.94 on FC2, and this one also crashes. 
Debian is currently updating, so I'll send the report when it finishes.
Comment 5 Predrag Minic 2005-05-06 17:51:47 UTC
Ok, debian is now upgraded, dia still crashes.

My precise steps, from the start of dia:
dia starts and opens a default diagram, I right-click it, to get the menu for
that diagram, select file menu, and detach it.  Using that file menu, I close
the diagram, the menu stays open (there are now no diagrams), I click close on
that menu again. segmentation fault.
Comment 6 Radek Krahl 2005-05-07 01:38:29 UTC
Created attachment 46113 [details] [review]
Patch fixing crash on closing nonexisting diagram from detached menu

Crashes on CVS-HEAD (slackware 10.1 + dropline gnome 2.10.1). Quickfix patch
attached.
Comment 7 Christian Kirbach 2005-05-07 13:29:42 UTC
Ah - confirmed. Misunderstood you before.

thanks for the patch Radek.

+HIGH priority
+MAJOR severity

target 0.95
Comment 8 Hans Breuer 2005-05-08 22:00:32 UTC
Christian: thanks for looking into this but at least I use the
bugzilla fields different.

Although you seem to follow
http://developer.gnome.org/projects/bugsquad/triage/steps.html
for 'Crasher Bugs", I wouldn't have changed the fields at all
with such a simple work around (Don't do it;)).
The 'target' should only be set if it is for sure that the target
version wont have the bug in it, usually set when a fix is 
in cvs.

Radek: thanks for the patch. I've done it different to be consitent
with the rest of commands.c. Check for valid parameters before 
calling functions on them.

2005-05-08  Hans Breuer  <hans@breuer.org>

	* app/command.c : some people insist to close diagrams already
	closed using tear-off menus. Maybe we should add a dialog 
	"Do you want to call Dr. Watson now?". If there is no diagram
	to close anymore just do nothing, fixes bug #303221
	* app/display.c(ddisplay_close) : use g_return_if_fail(ddisp != NULL);
	Calling this with no display to close is a pathological case.


Comment 9 Christian Kirbach 2005-05-09 11:13:45 UTC
ok changing patch to commited.

thanks for reminding me about the target milestone field Hans.