History messed up with overlapping click+holds

Bug #599468 reported by Nobu on 2010-06-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
High
Unassigned

Bug Description

Steps to reproduce:
1) draw a line (to add an item to the history)
1.5) switch to gradient tool
2) hold down the left mouse button, move the mouse
3) (while still holding the left mouse button) begin holding the right mouse button down.
4) release the left mouse button and the right mouse button (in that order, I think). (You should now have at least 3 history items)
5) click the back/undo (history) button

What happens:
 Two history items are added, clicking undo once undoes the second gradient. Clicking a second time does nothing. Clicking undo a third time will undo the first gradient and whatever you drew before it (so, essentially, you lose a history item).

What's expected:
 Either one gradient is drawn and one history item is added, or two gradients are drawn and two history items are added. In neither case should history be lost.

System Info:

Ubuntu 10.10 (Maverick) 32-bit
Pinta 0.3

[Edit: Added step 1.5, which I accidentally omitted.]

Nobu (benjo316) wrote :
Download full text (3.7 KiB)

Additionally, performing a "select all" from the Edit menu after clicking undo twice causes Pinta to crash. here's the stacktrace:

Stacktrace:

  at (wrapper managed-to-native) Cairo.NativeMethods.cairo_image_surface_get_width (intptr) <0x00004>
  at (wrapper managed-to-native) Cairo.NativeMethods.cairo_image_surface_get_width (intptr) <0xffffffff>
  at Cairo.ImageSurface.get_Width () <0x00014>
  at Pinta.CellRendererSurface.RenderCell (Cairo.Context,int,int) <0x00044>
  at Pinta.CellRendererSurface.Render (Gdk.Drawable,Gtk.Widget,Gdk.Rectangle,Gdk.Rectangle,Gdk.Rectangle,Gtk.CellRendererState) <0x000c6>
  at Gtk.CellRenderer.Render_cb (intptr,intptr,intptr,Gdk.Rectangle&,Gdk.Rectangle&,Gdk.Rectangle&,Gtk.CellRendererState) <0x00179>
  at (wrapper native-to-managed) Gtk.CellRenderer.Render_cb (intptr,intptr,intptr,Gdk.Rectangle&,Gdk.Rectangle&,Gdk.Rectangle&,Gtk.CellRendererState) <0xffffffff>
  at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004>
  at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff>
  at Gtk.Application.Run () <0x0000a>
  at Pinta.MainClass.Main (string[]) <0x002a8>
  at (wrapper runtime-invoke) Pinta.MainClass.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

 /usr/bin/cli() [0x80ca6e4]
 /usr/bin/cli() [0x80f6893]
 [0x404410]
 [0x3fef6a5]
 [0x3fef665]
 [0x3fef245]
 [0x3feeff7]
 [0x3feeef2]
 [0xf1e92e]
 /usr/lib/libgtk-x11-2.0.so.0(gtk_cell_renderer_render+0xc0) [0x90dab80]
 /usr/lib/libgtk-x11-2.0.so.0(+0x288db6) [0x92d3db6]
 /usr/lib/libgtk-x11-2.0.so.0(+0x289bc4) [0x92d4bc4]
 /usr/lib/libgtk-x11-2.0.so.0(+0x284459) [0x92cf459]
 /usr/lib/libgtk-x11-2.0.so.0(+0x28546a) [0x92d046a]
 /usr/lib/libgtk-x11-2.0.so.0(+0x155e58) [0x91a0e58]
 /usr/lib/libgobject-2.0.so.0(+0xb817) [0xaab817]
 /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x19a) [0xaad1aa]
 /usr/lib/libgobject-2.0.so.0(+0x24d76) [0xac4d76]
 /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x603) [0xac6613]
 /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x32) [0xac6f02]
 /usr/lib/libgtk-x11-2.0.so.0(+0x29c5c6) [0x92e75c6]
 /usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x65b) [0x9199abb]
 /usr/lib/libgdk-x11-2.0.so.0(+0x3e43b) [0x86b43b]
 /usr/lib/libgdk-x11-2.0.so.0(+0x3e3ea) [0x86b3ea]
 /usr/lib/libgdk-x11-2.0.so.0(+0x3e3ea) [0x86b3ea]
 /usr/lib/libgdk-x11-2.0.so.0(+0x6e214) [0x89b214]
 /usr/lib/libgdk-x11-2.0.so.0(+0x3abb4) [0x867bb4]
 /usr/lib/libgdk-x11-2.0.so.0(gdk_window_process_all_updates+0x157) [0x86cb17]
 /usr/lib/libgtk-x11-2.0.so.0(+0xb5d6d) [0x9100d6d]
 /usr/lib/libgdk-x11-2.0.so.0(+0x16f08) [0x843f08]
 /lib/libglib-2.0.so.0(+0x3a0b1) [0x14a0b1]
 /lib/libglib-2.0.so.0(g_main_context_dispatch+0x1d5) [0x14c0c5]
 /lib/libglib-2.0.so.0(+0x3fed8) [0x14fed8]
 /lib/libglib-2.0.so.0(g_main_loop_run+0x187) [0x150417]
 /usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xb9) [0x9199d69]
 [0x3fecd70]
 [0x3fecd33]
 [0x427559]
 [0x427204]
 /usr/bin/cli(mono_runtime_exec_main+0xde) [0x8113b1e]
 /usr/bin/cli(mono_runtime_run_main+0x15a) [0x811429a]
 /usr/bin/cli(mono_main+0x18c4) [0x80b3524]
 /usr/bin/cli() [0x805ad25]
 /lib/libc.so.6(__libc_start_main+0xe6) [0x1f1ce6]
 /usr/bin/cli() [0x805ac61]

Debug info...

Read more...

Nobu (benjo316) on 2010-06-28
description: updated
Jonathan Pobst (jpobst) wrote :
Changed in pinta:
importance: Undecided → High
milestone: none → 0.5
status: New → Fix Committed
Nobu (benjo316) wrote :

Just want to note: the crash occurs when using other tools as well; the history bug may be present with other tools too.

I haven't tested trunk yet. I'll do that soon.

Nobu (benjo316) wrote :

Following up on my previous comment (#4):

Now testing a trunk build

The history & crash with the gradient tool is fixed.

With the paintbrush tool, performing the overlapping clicks and then clicking back in the history causes a crash (stacktrace: http://pastebin.org/397213 ). The pencil tool has the same behavior as the gradient tool had before this fix (stacktrace: http://pastebin.org/397219 ). I haven't tested any of the other tools yet, but I assume they suffer from similar bugs.

Maybe a broader fix is in order?

Nobu (benjo316) on 2010-07-25
Changed in pinta:
status: Fix Committed → Incomplete
Jonathan Pobst (jpobst) on 2010-11-05
Changed in pinta:
milestone: 0.5 → none
Jonathan Pobst (jpobst) wrote :

All cases should now be fixed in https://github.com/jpobst/Pinta/commit/0c2255a04e5f9de5802f470333e4fe8141009b89.

Thanks for the report!

Changed in pinta:
milestone: none → 0.6
status: Incomplete → Fix Committed
grofaty (grofaty) wrote :

I installed Pinta 0.7 on Windows XP sp3 / Ubuntu 10.10 and bug is fixed. Only single Gradient is displayed in history.

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

Other bug subscribers