Leafpad segfaults

Bug #787995 reported by tdn on 2011-05-25
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
leafpad (Ubuntu)
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

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...

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 ...

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.

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.

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

apport information

tags: added: apport-collected natty
description: updated
tdn (spam-thomasdamgaard) wrote :

Jonathan, is this what you need?

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?

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.

Launchpad Janitor (janitor) wrote :

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

Changed in leafpad (Ubuntu):
status: Incomplete → Expired
tdn (spam-thomasdamgaard) wrote :

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

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
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?

Julien Lavergne (gilir) wrote :

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

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.

Launchpad Janitor (janitor) wrote :

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

Changed in leafpad (Ubuntu):
status: New → Confirmed
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...

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)

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!

Nikolay Morozov (nmorozov) wrote :

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

Nikolay Morozov (nmorozov) wrote :

xubuntu 13.10 amd64

tags: added: amd64 raring
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers