gpaint crashed when user changes font

Bug #262889 reported by Kevin Huang
80
Affects Status Importance Assigned to Milestone
gpaint (Debian)
Fix Released
Unknown
gpaint (Ubuntu)
Fix Released
Medium
Andrew Starr-Bochicchio
Hardy
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: gpaint

scenario1:

1. click font options (original is Sans/12)
2. do nothing, just click "OK". --> crash

scenario2:

1. click font options (original is Sans/12)
2. select any font, font size, then click "OK". --> crash

Revision history for this message
Ying-Chun Liu (paulliu) wrote :

gdb trace log:

Starting program: /tmp/gpaint-0.3.3/src/gpaint-2
[Thread debugging using libthread_db enabled]
[New Thread 0xb7263910 (LWP 14858)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7263910 (LWP 14858)]
0x08062516 in text_attribute (tool=0x93d7cc0, attrib=GpaintFont,
    data=0x9481b68) at text.c:156
156 GtkWidget *widget = GTK_WIDGET(tool->canvas->drawing_area);
(gdb) bt
#0 0x08062516 in text_attribute (tool=0x93d7cc0, attrib=GpaintFont,
    data=0x9481b68) at text.c:156
#1 0xb7585074 in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#2 0xb7577923 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#3 0xb758ae9d in ?? () from /usr/lib/libgobject-2.0.so.0
#4 0x091d61e8 in ?? ()
#5 0x00000000 in ?? ()
(gdb) print tool->canvas
$1 = (gpaint_canvas *) 0x0
(gdb)

The tool->canvas is only set on tool_palette.c on_tool_select() at line 400:
    canvas_set_tool(canvas_lookup(GTK_WIDGET(tb->widget)), tb->tool);
Which means the users have to click the text-tool button at least once to set the tool->canvas to avoid the crash.

Please report the bug to upstream. Thanks.

Revision history for this message
Caroline Ford (secretlondon) wrote :

This is intrepid?

Revision history for this message
Caroline Ford (secretlondon) wrote :

I can reproduce on Hardy.

You need to click the box with font and size *before* you select the text tool. If you have selected the text tool it doesn't crash.

Revision history for this message
Caroline Ford (secretlondon) wrote :

confirming

Changed in gpaint:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Caroline Ford (secretlondon) wrote :

I wonder if bug #208435 and bug #194990 are the same bug? (bug #194990 has retraced stack traces).

Revision history for this message
Caroline Ford (secretlondon) wrote :

It looks like at least bug #194990 is a duplicate.

Changed in gpaint:
status: Unknown → New
Changed in gpaint:
status: New → Fix Committed
Revision history for this message
Goedson Teixeira Paixão (goedson) wrote :

Here's a patch to fix this issue. I'm including this in the (not uploaded yet) 0.3.3-2 revision of the package in Debian. Complete source for what's going to be uploaded to Debian may be found at http://git.debian.org/?p=users/goedson/pkg-gpaint.git;a=summary

Revision history for this message
Caroline Ford (secretlondon) wrote : Re: [Bug 262889] Re: gpaint crashed when user changes font

Thanks!

When do you think you'll get it in debian as it's a lot easier to sync
it from debian than patch it ourselves and have a delta.

Revision history for this message
Goedson Teixeira Paixão (goedson) wrote :

On Tue, Sep 30, 2008 at 4:35 PM, Caroline Ford
<email address hidden> wrote:
> Thanks!
>
> When do you think you'll get it in debian as it's a lot easier to sync
> it from debian than patch it ourselves and have a delta.

I'm just waiting for gpaint 0.3.3-1.1 to migrate into lenny before I
upload this to sid.
According to http://qa.debian.org/excuses.php?package=gpaint it's only
waiting for the sparc's binary upload (which has already been built
since September 23). So, I can't tell you for sure when this upload
will be done. But I hope it will be soon.

--
Goedson Teixeira Paixao

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :
Changed in gpaint:
assignee: nobody → andrewsomething
status: Confirmed → In Progress
Revision history for this message
Goedson Teixeira Paixão (goedson) wrote :

I've just uploaded 0.3.3-2 to sid with the fix for this and #262942 to Debian sid.

Changed in gpaint:
status: Fix Committed → Fix Released
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Sync bug #277725 has been filed.

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gpaint:
status: New → Fix Committed
Revision history for this message
Martin Olsson (mnemo) wrote :

Hi Martin. I have tested your gpaint fix and it works as intended on my machine. When I launch gpaint the font control is disabled. I was able to create various fonts with different text etc and also when I select a non-text tool the font control gets disabled again. I was not able to make it crash again using this bug.

One question though, please commit the fix for intreprid as well. I only see the fix in proposed for hardy.
Also I'm curious, did you submit the patch upstream as well?

Revision history for this message
Caroline Ford (secretlondon) wrote :

> Also I'm curious, did you submit the patch upstream as well?

It's from Debian.

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

This bug was fixed in the package gpaint - 0.3.3-2

---------------
gpaint (0.3.3-2) unstable; urgency=low

  * debian/patches/20_fix_line_width_combo.dpatch: Add missing line
    widths (5, 7 and 9).
  * debian/patches/10_fix_crash_on_font_select.dpatch: Make the font
    selection button active only when the text tool is selected,
    avoiding a crash that occurs if the user selects a font without
    selecting the text tool. (Closes: #497201) (LP: #262889)
  * debian/control: Added packaging Vcs information.
  * debian/patches/11_fix_image_rotation.dpatch: Use the
    gdk_pixbuf_rotate_simple function to do image rotation in multiples
    of 90 degrees (Closes: #497487) (LP: #262942)

 -- Andrew Starr-Bochicchio <email address hidden> Thu, 09 Oct 2008 07:42:09 +0100

Changed in gpaint:
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Works fine for me now. Copied to hardy-updates.

Changed in gpaint:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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