Leafpad segfaults

Bug #787995 reported by tdn
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
leafpad (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: leafpad

When I start leafpad it segfaults.

Strace here:http://paste.adora.dk/P2066.txt

GDB bt here: http://paste.adora.dk/P2067.txt

Uname: Linux malbec 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
---
Architecture: amd64
DistroRelease: Ubuntu 11.04
InstallationMedia: Kubuntu 11.04 "Natty Narwhal" - Release amd64 (20110426.3)
NonfreeKernelModules: nvidia
Package: leafpad 0.8.17-4
PackageArchitecture: amd64
ProcEnviron:
 LANGUAGE=en_DK:en
 PATH=(custom, user)
 LANG=en_DK.UTF-8
 SHELL=/bin/zsh
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Tags: natty
Uname: Linux 2.6.38-8-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
tdn (spam-thomasdamgaard) wrote :
Download full text (9.2 KiB)

More details:

Starting program: /home/tdn/tmp/leafpad-soruce/leafpad-0.8.17/src/leafpad
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffeef3a700 (LWP 24289)]
[New Thread 0x7fffee739700 (LWP 24290)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7988d1c in ?? () from /usr/lib/libgtk-x11-2.0.so.0
(gdb) bt
#0 0x00007ffff7988d1c in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#1 0x00007ffff5a9f81c in g_closure_invoke (closure=0x697bd0, return_value=0x0, n_param_values=2, param_values=0x7e3120, invocation_hint=0x7fffffffcc70)
    at /build/buildd/glib2.0-2.28.6/./gobject/gclosure.c:767
#2 0x00007ffff5ab07e3 in signal_emit_unlocked_R (node=<value optimized out>, detail=0, instance=0x795370, emission_return=0x0, instance_and_params=0x7e3120)
    at /build/buildd/glib2.0-2.28.6/./gobject/gsignal.c:3182
#3 0x00007ffff5aba258 in g_signal_emit_valist (instance=<value optimized out>, signal_id=<value optimized out>, detail=<value optimized out>,
    var_args=<value optimized out>) at /build/buildd/glib2.0-2.28.6/./gobject/gsignal.c:2983
#4 0x00007ffff5aba41f in g_signal_emit (instance=<value optimized out>, signal_id=<value optimized out>, detail=<value optimized out>)
    at /build/buildd/glib2.0-2.28.6/./gobject/gsignal.c:3040
#5 0x00007ffff79f37ca in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#6 0x00007ffff79f3998 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#7 0x00007ffff793492e in ?? ...

Read more...

Revision history for this message
tdn (spam-thomasdamgaard) wrote :
Download full text (12.5 KiB)

Even more detailed backtrace:
Reading symbols from /home/tdn/tmp/leafpad-soruce/leafpad-0.8.17/src/leafpad...done.
(gdb) run
Starting program: /home/tdn/tmp/leafpad-soruce/leafpad-0.8.17/src/leafpad
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffeef3a700 (LWP 24955)]
[New Thread 0x7fffee739700 (LWP 24956)]

Program received signal SIGSEGV, Segmentation fault.
gtk_text_view_set_attributes_from_style (widget=0x791370, previous_style=<value optimized out>) at /build/buildd/gtk+2.0-2.24.4/gtk/gtktextview.c:6380
6380 /build/buildd/gtk+2.0-2.24.4/gtk/gtktextview.c: No such file or directory.
        in /build/buildd/gtk+2.0-2.24.4/gtk/gtktextview.c
(gdb) bt
#0 gtk_text_view_set_attributes_from_style (widget=0x791370, previous_style=<value optimized out>) at /build/buildd/gtk+2.0-2.24.4/gtk/gtktextview.c:6380
#1 gtk_text_view_style_set (widget=0x791370, previous_style=<value optimized out>) at /build/buildd/gtk+2.0-2.24.4/gtk/gtktextview.c:3980
#2 0x00007ffff5a9f81c in g_closure_invoke (closure=0x697bd0, return_value=0x0, n_param_values=2, param_values=0x7deb20, invocation_hint=0x7fffffffcc70)
    at /build/buildd/glib2.0-2.28.6/./gobject/gclosure.c:767
#3 0x00007ffff5ab07e3 in signal_emit_unlocked_R (node=<value optimized out>, detail=0, instance=0x791370, emission_return=0x0, instance_and_params=0x7deb20)
    at /build/buildd/glib2.0-2.28.6/./gobject/gsignal.c:3182 ...

Revision history for this message
tdn (spam-thomasdamgaard) wrote :

I have tried the folllowing:
mkdir gtk-bak && mv .gtk* gtk-bak

Then I started 'gtk-theme-switch2' and selected theme 'aud-default'.
Now leafpad does not segfault.
If I run 'gtk-theme-switch2' and switch back to 'oxygen-gtk', leafpad segfaults.

So either the bug is in leafpad or the theme. Or somewhere in between.

Revision history for this message
tdn (spam-thomasdamgaard) wrote :

Please note that the above workaround does not fix this bug -- and it is not particularly convenient since this theme integrates really badly with KDE themes. Some buttons are invisible for instance. Also, it makes GTK apps look inconsistent from the rest of the (KDE) apps.

Revision history for this message
Jonathan Marsden (jmarsden) wrote :

Please make the bug happen again (which seems to be easy for you!), and then run

  apport-collect 787995

to provide full information on it, collected in a standard way and attached to this bug report.

This issue does not seem to occur in Lubuntu, using the LDXE desktop environment, at least in my testing. It may only happen in KDE / Kubuntu.

Changed in leafpad (Ubuntu):
status: New → Incomplete
Revision history for this message
tdn (spam-thomasdamgaard) wrote : Dependencies.txt

apport information

tags: added: apport-collected natty
description: updated
Revision history for this message
tdn (spam-thomasdamgaard) wrote :

Jonathan, is this what you need?

Revision history for this message
Jonathan Marsden (jmarsden) wrote :

Yes and no :) You did what I asked, but the automatic stack dump collection and analysis didn't happen for some reason. It did collect good information on your system, which is useful.

Also, I see in an earlier message you wrote:

> Starting program: /home/tdn/tmp/leafpad-soruce/leafpad-0.8.17/src/leafpad

Are you running the expected Ubuntu-packaged leafpad, installed from a Ubuntu package into /usr/bin/leafpad ? Or, are you running a self-compiled version of leafpad of some sort -- and if you are, why are you doing that?

Revision history for this message
tdn (spam-thomasdamgaard) wrote :

I am runnning the distributed Ubuntu-package version of leafpad. However, during my investigation of the problem I wanted to run it through gdb and produce a useful backtrace to see where the error occured. Thus, I needed debug symbols. As I could not find any -dbg package in the mirrors, I did an apt-get source leafpad in order to obtain the source code. Then I compiled it myself and ran it through gdb in order to produce the above traces. Please note, I did not change anything in the source AND it produces the same error when using the pre-packaged version of leafpad as when I am using the self-compiled one. This bug is reported for the Ubuntu-packaged one and not the self-compiled version. I am sorry for any confusion and I hope this is clear now.

According to the backtrace, the error happens on line 83 in window.c. This is what hinted the theme relation.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for leafpad (Ubuntu) because there has been no activity for 60 days.]

Changed in leafpad (Ubuntu):
status: Incomplete → Expired
Revision history for this message
tdn (spam-thomasdamgaard) wrote :

How to get progress on this bug?
It is still a problem in 11.04.

Revision history for this message
Julien Lavergne (gilir) wrote :

Backtrace seems ok to have a look. Could you add to the bug report the theme you use, since it seems to be the cause of the bug ? Thanks

Changed in leafpad (Ubuntu):
status: Expired → New
Revision history for this message
tdn (spam-thomasdamgaard) wrote :

But which one? I experience this with multiple different themes. Also, I am not sure which package those themes are in. How do I check? Can you tell me what package to report it to?

Also, do I need to add a new bug report for this theme? Or can I link it to this one somehow?

Revision history for this message
Julien Lavergne (gilir) wrote :

Just start with the name of the themes :) We will see if we need more informations.

Revision history for this message
tdn (spam-thomasdamgaard) wrote :

Theme: gtk clearlooks
I recently installed qtcurve.
I selected this with gtk-theme-switch2. Now leafpad can start.
So there is still a bug somewhere that needs to be fixed. Either in the theme or in leafpad.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in leafpad (Ubuntu):
status: New → Confirmed
Revision history for this message
isync (o-zucker) wrote :

I am experiencing this bug since upgrade to 12.04.
Besides the shipped version 0.8.18.1, I tried leafpad versions 0.8.16 and 0.8.18: same results.
Btw: CLI only functions work, like leafpad --version, leafpad --help, so it seems GTK related...

Revision history for this message
isync (o-zucker) wrote :

user@ubuntu:~$ leafpad --version
Leafpad 0.8.16

user@ubuntu:~$ gdb leafpad
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free S.... <snip>
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/local/bin/leafpad...done.
(gdb) run
Starting program: /usr/local/bin/leafpad
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0xb76cb590 in ?? () from /lib/i386-linux-gnu/libc.so.6
(gdb)

Revision history for this message
isync (o-zucker) wrote :

Fixed for me!

As said by me before, I ran into this error after upgrading to 12.04. I did all the theme-switching that others here did to resolve the issue - no luck on my side. But:
removing the file

     .config/leafpad/leafpadrc

did the trick. After moving it to a .bak, leafpad starts again!

Revision history for this message
Nikolay Morozov (nmorozov) wrote :

rm ~/.config/leafpad/leafpadrc helps me too

Revision history for this message
Nikolay Morozov (nmorozov) wrote :

xubuntu 13.10 amd64

tags: added: amd64 raring
Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for reporting this bug to Ubuntu.

Ubuntu 20.10 (groovy) reached end-of-life on July 22, 2021.
Ubuntu 19.10 (eoan) reached end-of-life on July 17, 2020.
Ubuntu 19.04 (disco) reached end-of-life on January 23, 2020.
Ubuntu 18.10 (cosmic) reached end-of-life on July 18, 2019.
Ubuntu 17.10 (artful) reached end-of-life on July 19, 2018.
Ubuntu 17.04 (zesty) reached end-of-life on January 13, 2018.
Ubuntu 16.10 (yakkety) reached end-of-life on July 20, 2017.
Ubuntu 16.04 (xenial) reached end-of-life on April 29, 2021.
Ubuntu 15.10 (wily) reached end-of-life on July 28, 2016.
Ubuntu 15.04 (vivid) reached end-of-life on February 4, 2016.
Ubuntu 14.10 (utopic) reached end-of-life on July 23, 2015.
Ubuntu 14.04 (trusty) reached end-of-life on April 25, 2019.
Ubuntu 13.10 (saucy) reached end-of-life on July 17, 2014.
Ubuntu 13.04 (raring) reached end-of-life on January 27, 2014.
Ubuntu 12.10 (quantal) reached end-of-life on May 16, 2014.
Ubuntu 12.04 (precise) reached end-of-life on April 28, 2017.
Ubuntu 11.10 (oneiric) reached end-of-life on May 9, 2013.
Ubuntu 11.04 (natty) reached end-of-life on October 28, 2012.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test. If you then find the bug is still present in the newer Ubuntu version, please add a comment here telling us which new version it is in.

Changed in leafpad (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for leafpad (Ubuntu) because there has been no activity for 60 days.]

Changed in leafpad (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.