! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
mousepad crashes during scrolling and/or 'painting'
Status:
RESOLVED: WORKSFORME
Severity:
critical
Product:
Mousepad
Component:
General

Comments

Description Jari Rahkonen 2005-06-08 19:20:13 CEST
Mousepad crashes unfailingly, if I scroll up and down a lot (with the mouse
wheel or the scrollbar) or if I move the mouse around a lot while holding down
the left mouse button so that text gets 'painted'. Here are two error messages
mousepad outputs on the terminal when it crashes (only one of them each time and
the first one seems to come more often):

*** glibc detected *** free(): invalid next size (fast): 0x082XXXXX ***
*** glibc detected *** corrupted double-linked list: 0x082XXXXX ***

I tested with both 0.2.0 and 0.2.2, but not trunk, sorry.

Reproducible: Always
Steps to Reproduce:
Fastest way to make mousepad crash:
1. Start mousepad and open a document.
2. Push and hold down your left mouse button on any part of the text.
3. Move your mouse around rapidly inside the mousepad window for a while, still
holding down the left button (takes 5 to 20 seconds here, might possibly depend
on how fast you move your mouse).
Actual Results:  
Mousepad crashed with the following message:

  *** glibc detected *** free(): invalid next size (fast): 0x0821bb58 ***
  Aborted

Expected Results:  
It shouldn't have crashed.

I'm running Ubuntu/libc6-2.3.5/gtk+2.6.4.
If you need any more information, ask away.
Comment 1 Jari Rahkonen 2005-06-21 18:04:30 CEST
I just noticed that this only seems to happen if line numbers are enabled. Sorry
about not noticing this earlier. I also tested leafpad 0.8.1 and got the same
crash, so the problem is not in your code...
Comment 2 Erik Harrison 2005-06-21 19:20:11 CEST
I can't generate the crash here, but Leafpad's method of hooking in to generate the line numbers 
(Which mousepad inherited) always seemed suspect to me

Mousepad is currently undergoing a rewrite, so I unless the fix is obvious when I look at it tonight, then 
it'll have to wait till then. Thanks for the report. 
Comment 3 Erik Harrison 2005-07-03 17:11:55 CEST
Jari, can you run Mousepad under gdb and get me a backtrace after the crash? I
can't simulate here, and this is irking me.

Thanks.
Comment 4 Jari Rahkonen 2005-07-03 20:05:11 CEST
I've never used gdb before, so I hope this is what you asked for:

Starting program: /usr/bin/mousepad
*** glibc detected *** corrupted double-linked list: 0x08239f70 ***

Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
(gdb) backtrace
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb79f8099 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb79f96e5 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7a2ac1a in __fsetlocking () from /lib/tls/i686/cmov/libc.so.6
#4  0xb7a32dd7 in mallopt () from /lib/tls/i686/cmov/libc.so.6
#5  0xb7a31ef5 in mallopt () from /lib/tls/i686/cmov/libc.so.6
#6  0xb7a315a4 in mallopt () from /lib/tls/i686/cmov/libc.so.6
#7  0xb7a3087b in malloc () from /lib/tls/i686/cmov/libc.so.6
#8  0xb7b6cba0 in g_malloc () from /usr/lib/libglib-2.0.so.0
#9  0xb7c221e7 in pango_script_iter_new () from /usr/lib/libpango-1.0.so.0
#10 0xb7c14a6a in pango_context_get_base_dir () from /usr/lib/libpango-1.0.so.0
#11 0xb7c155aa in pango_itemize_with_base_dir ()
   from /usr/lib/libpango-1.0.so.0
#12 0xb7c1c0f0 in pango_layout_get_pixel_size ()
   from /usr/lib/libpango-1.0.so.0
#13 0xb7c1a77f in pango_layout_get_cursor_pos ()
   from /usr/lib/libpango-1.0.so.0
#14 0xb7c1aac3 in pango_layout_get_extents () from /usr/lib/libpango-1.0.so.0
#15 0xb7eaec14 in gtk_text_layout_get_line_display ()
   from /usr/lib/libgtk-x11-2.0.so.0
#16 0xb7eaf6b2 in gtk_text_layout_get_iter_at_position ()
   from /usr/lib/libgtk-x11-2.0.so.0
#17 0xb7eaf613 in gtk_text_layout_get_iter_at_pixel ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/libgtk-x11-2.0.so.0
#18 0xb7ebc596 in gtk_text_view_place_cursor_onscreen ()
   from /usr/lib/libgtk-x11-2.0.so.0
#19 0xb7e2fbca in _gtk_marshal_BOOLEAN__BOXED ()
   from /usr/lib/libgtk-x11-2.0.so.0
#20 0xb7bd195b in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
#21 0xb7bd1e45 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#22 0xb7be1e12 in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#23 0xb7be3435 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#24 0xb7be3a29 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#25 0xb7f119ad in gtk_widget_send_expose () from /usr/lib/libgtk-x11-2.0.so.0
#26 0xb7e2e7de in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#27 0xb7e2d7bb in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#28 0xb7cdab0b in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
#29 0xb7b6658e in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#30 0xb7b69596 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#31 0xb7b69883 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#32 0xb7e2d10f in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#33 0x0804dedd in create_new_process (filename=0x0) at main.c:191
#34 0x0804df70 in main (argc=1, argv=0xbffff9a4) at main.c:231
Comment 5 Erik Harrison 2005-07-04 17:47:18 CEST
I'm gonna go out on a limb here and lay the blame at the feet of Gtk. 

What version of Gtk are you running? Looks like Arch linux shipped a 2.6.1 Gtk that could cause this 
problem in lots of Gnome apps.
Comment 6 Jari Rahkonen 2005-07-04 19:54:12 CEST
I'm running gtk 2.6.4 on Ubuntu, as mentioned in the bug description. Mousepad
is the only gnome app with this problem for me. Might of course still be a gtk
bug. I can upgrade up to 2.6.8 and try it out if you think that'll help. I'm not
too eager to do this though as I can't really afford to bork this box right now...
Comment 7 Erik Harrison 2005-07-17 03:35:07 CEST
I'm closing since no matter what hoop I go through I can't make this bug happen,
and all my energy is on the rewrite anyway.

If the new version (whensoever it shall arrive) has the same problem _please_
reopen this bug.

Bug #990

Reported by:
Jari Rahkonen
Reported on: 2005-06-08
Last modified on: 2005-07-17

People

Assignee:
Erik Harrison
CC List:
0 users

Version

Version:
Unspecified

Attachments

Additional information