Node tool causes crash editing gradient stop position with bounding box snapping

Bug #593023 reported by Chris Morgan on 2010-06-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Diederik van Lierop

Bug Description

There's something ever so slightly buggy in the node tool which is causing a crash for me when editing a gradient stop position, when I have one or more of the bounding box snapping options turned on. I haven't been able to reproduce this with a new document, but I have been able to trim the document in which I had it happen down until I got it to just one object, so I've attached the simplest test case I could which shows the bug.

Turn off bounding box snapping and the bug stops, or use the gradient tool and it doesn't happen, or any other tool which allows gradient position editing.

To have it crash, use the node tool and drag the node halfway along the gradient. When it tries to snap, the node handle diamond will move to where the cursor is and it will crash.

Ubuntu 10.04, Inkscape 0.47+devel-r9474

GDB output:

ERROR:object-snapper.cpp:102:void Inkscape::ObjectSnapper::_findCandidates(SPObject*, const std::vector<const SPItem*, std::allocator<const SPItem*> >*, const bool&, const Geom::Rect&, Inkscape::ObjectSnapper::DimensionToSnap, bool, Geom::Matrix) const: assertion failed: (_snapmanager->getDesktop() != NULL)

Program received signal SIGABRT, Aborted.
0x00007fffefe07a75 in raise () from /lib/


#0 0x00007fffefe07a75 in raise () from /lib/
#1 0x00007fffefe0b5c0 in abort () from /lib/
#2 0x00007ffff39a7bb4 in g_assertion_message () from /lib/
#3 0x00007ffff39a8130 in g_assertion_message_expr ()
   from /lib/
#4 0x00000000009544ac in Inkscape::ObjectSnapper::_findCandidates (
    this=0x1f1c608, parent=0x1f146a0, it=0x1f1c670,
    first_point=<value optimised out>, bbox_to_snap=<value optimised out>,
    snap_dim=<value optimised out>, clip_or_mask=false, additional_affine=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
    at object-snapper.cpp:102
#5 0x0000000000957e56 in Inkscape::ObjectSnapper::constrainedSnap (
    this=0x1f1c608, sc=..., p=..., bbox_to_snap=<value optimised out>, c=...,
    it=0x1f1c670) at object-snapper.cpp:630
#6 0x000000000049cb1d in SnapManager::constrainedSnap (
    this=<value optimised out>, p=..., constraint=...,
    bbox_to_snap=<value optimised out>) at snap.cpp:378
#7 0x000000000049d02f in SnapManager::constrainedSnapReturnByRef (
    this=<value optimised out>, p=..., source_type=<value optimised out>,
    constraint=..., bbox_to_snap=...) at snap.cpp:341
#8 0x000000000046d621 in gr_knot_moved_midpoint_handler (
    ppointer=<value optimised out>, state=256, data=0x6222790)
    at gradient-drag.cpp:815
#9 0x00007ffff4c535de in g_closure_invoke () from /usr/lib/
#10 0x00007ffff4c67598 in ?? () from /usr/lib/
#11 0x00007ffff4c68a76 in g_signal_emit_valist ()
   from /usr/lib/
#12 0x00007ffff4c69033 in g_signal_emit () from /usr/lib/
#13 0x000000000047c95d in sp_knot_set_position (knot=0x54a7280, p=...,
    state=256) at knot.cpp:578
#14 0x000000000047cbba in sp_knot_request_position (knot=0x54a7280, p=...,
    state=256) at knot.cpp:538
#15 0x000000000047cc48 in sp_knot_handler_request_position (event=0x4ea9520,
    knot=0x54a7280) at knot.cpp:458
#16 0x0000000000461997 in sp_event_context_snap_watchdog_callback (
    data=<value optimised out>) at event-context.cpp:1282
#17 0x00007ffff398209b in ?? () from /lib/
#18 0x00007ffff39818c2 in g_main_context_dispatch () from /lib/
#19 0x00007ffff3985748 in ?? () from /lib/
#20 0x00007ffff3985c55 in g_main_loop_run () from /lib/
#21 0x00007ffff64a2b27 in gtk_main () from /usr/lib/
#22 0x000000000045594b in sp_main_gui (argc=1, argv=0x7fffffffe368)
    at main.cpp:983
#23 0x0000000000454da1 in main (argc=1, argv=<value optimised out>)
    at main.cpp:719

Chris Morgan (chris.morgan) wrote :
su_v (suv-lp) wrote :

not reproduced with Inkscape 0.47 r22583
reproduced with Inkscape 0.47+devel r9495 on OS X 10.5.8

tags: added: gradient node-editing snapping
Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
Changed in inkscape:
assignee: nobody → Diederik van Lierop (mail-diedenrezi)

Has been fixed as of rev. #9550

Thanks for this excellent bug report!

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

Other bug subscribers