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 589367 - gedit crashed with SIGSEGV in IA__g_list_last()
gedit crashed with SIGSEGV in IA__g_list_last()
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.17.x
Other Linux
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
csw
Depends on:
Blocks:
 
 
Reported: 2009-07-22 12:35 UTC by Pedro Villavicencio
Modified: 2009-09-01 02:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
Valgrind log of gedit (269.25 KB, text/plain)
2009-08-18 15:28 UTC, Janne Hyötylä
Details
valgrind run without G_DEBUG=gc-friendly (276.17 KB, text/plain)
2009-08-18 16:02 UTC, Janne Hyötylä
Details

Description Pedro Villavicencio 2009-07-22 12:35:08 UTC
this report has been filed here:

https://bugs.edge.launchpad.net/ubuntu/+source/gedit/+bug/401934

"Trying to open a python script. It worked one time but crashes on any subsequent attempt."

"

Same here. I attempted to run after a fresh boot with the same crash.

code:
quagmire@quagmire-desktop:~$ sudo gedit /etc/pulse/default.pa
[sudo] password for quagmire:
Segmentation fault (core dumped)
quagmire@quagmire-desktop:~$
/code

However, it doesn't crash all the time.
If I open Text Editor from the Applications - Accessories menu, it works fine.
If I open a text file on my desktop, it also works fine.
If I copy default.pa from /etc/pulse to Desktop, it still does not open from the desktop.
However, if I rename the file from default.pa to simply default (on the desktop), it opens fine. If I rename it back to default.pa, it will again crash.
"

"#0  0x004235c2 in IA__g_list_last (list=0xaaaaaaaa)
    at /build/buildd/glib2.0-2.21.4/glib/glist.c:717
No locals.
  • #1 IA__gdk_window_process_updates
    at /build/buildd/gtk+2.0-2.17.5/gdk/gdkwindow.c line 4952
  • #2 gtk_text_view_value_changed
    at /build/buildd/gtk+2.0-2.17.5/gtk/gtktextview.c line 7211
  • #3 IA__g_cclosure_marshal_VOID__VOID
    at /build/buildd/glib2.0-2.21.4/gobject/gmarshal.c line 77
  • #4 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.21.4/gobject/gclosure.c line 767
  • #5 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.21.4/gobject/gsignal.c line 3247
  • #6 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.21.4/gobject/gsignal.c line 2980
  • #7 IA__g_signal_emit
    at /build/buildd/glib2.0-2.21.4/gobject/gsignal.c line 3037
  • #8 IA__gtk_adjustment_value_changed
    at /build/buildd/gtk+2.0-2.17.5/gtk/gtkadjustment.c line 668
  • #9 set_adjustment_clamped
    at /build/buildd/gtk+2.0-2.17.5/gtk/gtktextview.c line 1677
  • #10 IA__gtk_text_view_scroll_to_iter
    at /build/buildd/gtk+2.0-2.17.5/gtk/gtktextview.c line 1818
  • #11 gtk_text_view_flush_scroll
    at /build/buildd/gtk+2.0-2.17.5/gtk/gtktextview.c line 1965
  • #12 gtk_text_view_flush_first_validate
    at /build/buildd/gtk+2.0-2.17.5/gtk/gtktextview.c line 3556
  • #13 first_validate_callback
    at /build/buildd/gtk+2.0-2.17.5/gtk/gtktextview.c line 3577
  • #14 gdk_threads_dispatch
    at /build/buildd/gtk+2.0-2.17.5/gdk/gdk.c line 498
  • #15 g_idle_dispatch
    at /build/buildd/glib2.0-2.21.4/glib/gmain.c line 4065
  • #16 g_main_dispatch
    at /build/buildd/glib2.0-2.21.4/glib/gmain.c line 1960
  • #17 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.21.4/glib/gmain.c line 2513
  • #18 g_main_context_iterate
    at /build/buildd/glib2.0-2.21.4/glib/gmain.c line 2591
  • #19 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.21.4/glib/gmain.c line 2799
  • #20 IA__gtk_main
    at /build/buildd/gtk+2.0-2.17.5/gtk/gtkmain.c line 1205
  • #21 main
    at gedit.c line 724

Comment 1 Paolo Borelli 2009-07-25 20:03:01 UTC
crash in gdk with 2.27... client side windows issue?
Comment 2 Matthias Clasen 2009-07-26 06:27:52 UTC
Dubious. 

Can you reproduce this under valgrind ? Ie

G_SLICE=always-malloc valgrind gedit foo
Comment 3 Pedro Villavicencio 2009-07-29 19:16:32 UTC
valgrind log available at http://launchpadlibrarian.net/29673804/valgrind-logs-gedit_gtk-dbg.tar.gz
Comment 4 Vish 2009-07-31 04:57:43 UTC
The crash does not happen with files which have not been edited , crash happens only with files that have been edited.

Has something to do with restoring the state of the document, and scrolling the document to the last location.
Comment 5 Sebastien Bacher 2009-08-11 10:52:46 UTC
the ubuntu bug has 38 duplicates that seems a frequent crasher
Comment 6 Sebastien Bacher 2009-08-11 10:52:53 UTC
the ubuntu bug has 38 duplicates that seems a frequent crasher
Comment 7 Alexander Larsson 2009-08-11 15:09:03 UTC
This looks like bug 591434, or at least related to it.
Comment 8 Alexander Larsson 2009-08-13 14:55:15 UTC
fixed with commit 9f822431970b9744f0184ae2d9e9977f607ffe4e
Comment 9 Sebastien Bacher 2009-08-17 20:01:27 UTC
the commit doesn't fix the issue reopening the bug, similar crash keep being opened on the ubuntu bug tracker using a gtk with this change
Comment 10 Alexander Larsson 2009-08-18 14:08:44 UTC
Is there a valgrind log for the new crash?
Comment 11 Janne Hyötylä 2009-08-18 15:28:02 UTC
Created attachment 141086 [details]
Valgrind log of gedit

Attached a valgrind log run with debug symbols for libgtk2.0-0 and gedit installed (Ubuntu karmic alpha).

The log was obtained as follows:
$ sudo -s -H
$ G_SLICE=always-malloc G_DEBUG=gc-friendly  valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind.log gedit /etc/apt/sources.list

(as per https://wiki.ubuntu.com/Valgrind )

When running gedit with valgrind, it did *not* crash. Whereas when running simply

$ sudo -s -H
$ gedit /etc/apt/sources.list

it crashes.

I have no experience with Valgrind, so if this is not the expected behaviour, please advice how to proceed with debugging.
Comment 12 Janne Hyötylä 2009-08-18 16:02:42 UTC
Created attachment 141092 [details]
valgrind run without G_DEBUG=gc-friendly

Just noticed a comment in launchpad regarding the crashing with valgrind.

Running without G_DEBUG=gc-friendly crashes gedit with valgrind. Log of following run attached:

$ sudo -s -H
# G_SLICE=always-malloc valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind.log gedit /etc/apt/sources.list

An additional valgrind log by another user has been posted to the original launchpad bugreport.
Comment 13 Alexander Larsson 2009-08-20 15:02:15 UTC
428d7bd27bccb4f21d210cefc2024cfb526d398c has some more fixes. Hopefully this fixes it. Anyone that can reproduce this, please verify.
Comment 14 Matthias Clasen 2009-09-01 02:06:38 UTC
I am going to assume this is fixed. Please reopen if you still see this with 2.17.9+.