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 547173 - Ctrl+Alt+M crashes dia
Ctrl+Alt+M crashes dia
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: general
0.96.1
Other Linux
: Normal normal
: 0.97
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-10 13:39 UTC by Rolf Leggewie
Modified: 2008-11-02 12:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case (838 bytes, application/x-dia-diagram)
2008-09-20 15:02 UTC, Rolf Leggewie
Details

Description Rolf Leggewie 2008-08-10 13:39:31 UTC
from https://bugs.launchpad.net/ubuntu/+bug/256519

I can reliably crash dia 0.96.1 in ubuntu hardy by selecting two objects and pressing Ctrl+Alt+M
Comment 1 Hans Breuer 2008-08-10 14:41:07 UTC
see comment in bug #527565 - still no crash. Why do you think this deserves a new bug report _and_ a comment in the existing one?
Comment 2 Rolf Leggewie 2008-08-10 15:32:08 UTC
(In reply to comment #1)
> Why do you think this deserves a new bug report _and_ a comment in 
> the existing one?

quite simply "one issue - one report".

bug 527565 is very broad and not my own.  It is about keyboard shortcuts not working.  This one is about crashing stuff.  There is a connection between this report and the other one which is why I think it makes sense to leave a comment there.

Adding information is not about entitlement or deserving something.  It is just about that; "adding information" in the hope that it will help in getting bugs fixed.

I am recompiling dia with debug symbols now.
Comment 3 Rolf Leggewie 2008-08-10 18:30:13 UTC
I recompiled 0.96.1-7ubuntu1 which is the same upstream version but IIRC packaging is a little bit more recent than standard hardy and included debugging symbols.  In any case, the program still crashes and I was able to get a backtrace.  I hope it is meaningful.

(gdb) bt
  • #0 get_string_offsets
    at font.c line 614
  • #1 dia_font_get_sizes
    at font.c line 705
  • #2 text_line_cache_values
    at textline.c line 315
  • #3 text_line_get_width
    at textline.c line 179
  • #4 text_get_line_width
    at text.c line 126
  • #5 text_insert_char
    at text.c line 791
  • #6 text_key_event
    at text.c line 903
  • #7 handle_key_event
    at disp_callbacks.c line 374
  • #8 ddisplay_canvas_events
    at disp_callbacks.c line 696
  • #9 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #10 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #11 ??
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #14 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #15 gtk_window_propagate_key_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #16 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #17 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #18 ??
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #20 ??
    from /usr/lib/libgobject-2.0.so.0
  • #21 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #22 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #23 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #24 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #25 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #26 ??
    from /usr/lib/libgdk-x11-2.0.so.0
  • #27 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #28 ??
    from /usr/lib/libglib-2.0.so.0
  • #29 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #30 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #31 main
    at main.c line 40

Comment 4 Hans Breuer 2008-09-20 13:40:15 UTC
still can't make it crash but the callstack reminded me on bug #539476. I'm willing to put in the following hack if it avoids the crashing for you:

Index: lib/text.c
===================================================================
--- lib/text.c	(revision 4116)
+++ lib/text.c	(working copy)
@@ -918,6 +918,8 @@
         break;
       default:
         if (str || (strlen>0)) {
+          if (strlen == 1 && *str == '\r')
+            break; /* avoid putting junk into our string */
           return_val = TRUE;
           utf = str;
           for (utf = str; utf && *utf && strlen > 0 ;
Comment 5 Rolf Leggewie 2008-09-20 15:02:05 UTC
Created attachment 119038 [details]
test case

Thanks for coming back to this issue.  Actually, I now had some trouble reconfirming this problem, but ultimately I was successful.  I attach a file with two objects in it.  Select them both, press Ctrl+Alt+M and dia will crash.  It seems that some objects are OK and others will crash.

I am now recompiling with your patch.  The results should be in shortly.

BTW, I saw that the keyboard shortcut Shift+Alt+M is assigned twice (Align middle as well as Magnify).  I'd consider that a bug.  Do you agree?
Comment 6 Rolf Leggewie 2008-09-20 15:08:33 UTC
(In reply to comment #5)
> BTW, I saw that the keyboard shortcut Shift+Alt+M is assigned twice (Align
> middle as well as Magnify).  I'd consider that a bug.  Do you agree?

nevermind.  I just saw this is already being discussed in bug 527565 comment 6 and following.
Comment 7 Rolf Leggewie 2008-09-22 11:05:03 UTC
FWIW, the patched version does not crash with attachment 119038 [details] and Ctrl+Alt+M
Comment 8 Hans Breuer 2008-11-02 12:46:40 UTC
2008-11-02  Hans Breuer  <hans@breuer.org>

	* lib/text.c : ignore single carriage return, work around for bug #547173