trunk: mesh gradient tool cannot assign colors to stops, crash when dragging a stop (rev >= r12532)

Bug #1239430 reported by su_v on 2013-10-13
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
High
Markus Engel

Bug Description

Steps to reproduce:
0) build trunk with mesh tool enabled
1) launch trunk (default prefs, default new doc)
2) draw a reactangle
3) switch to the mesh gradient tool
4) defined a 3x3 mesh (controls bar)
5) double-click the rectangle with the mesh tool

6) try to assign different colors to the inner stops
--> only the first one updates the color, later ones don't
7) grab the node last selected and drag it
--> crash:

SPGradient::rebuildArray(): reffed array NOT IMPLEMENTED!!!

** (inkscape:76406): WARNING **: SPGradient::rebuildArray() called for non-mesh gradient

(inkscape:76406): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 71: Invalid UTF-8 encoded text in name - not valid 'UH\x89\xe5H\x8d=\x8b1 selected out of 64 mesh handles on 1 selected object'

(inkscape:76406): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 71: Invalid UTF-8 encoded text in name - not valid 'UH\x89\xe5H\x8d=\x8b1 selected out of 64 mesh handles on 1 selected object'
Assertion failed: (drag_valid), function update_handles, file ../../src/sp-mesh-array.cpp, line 1961.

Program received signal SIGABRT, Aborted.
0x00007fff93822ce2 in __pthread_kill ()
(gdb)

Confirmed with r12682 on OS X 10.7.5

Based on tests with archived builds:
- not reproduced with rev <= 12531
- reproduced with rev >= 12532
this regression was introduced with the merge of the C++ification branch in revision 12532:
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/12532>

(Note: the markup warnings are not related to the regression - they are present ever since the mesh tool was merged into trunk with builds complied with llvm-gcc-4.2 on OS X 10.7.5 - FSF GCC and clang builds don't produce them).

su_v (suv-lp) wrote :
su_v (suv-lp) on 2013-10-15
Changed in inkscape:
importance: Undecided → High
Markus Engel (engelmarkus) wrote :

The attached patch fixes this; note that the code has only ever worked because the wrong constant was used in the type check. I'm not sure now what all these other functions are good for.

Changed in inkscape:
status: New → In Progress
su_v (suv-lp) wrote :

Patch tested successfully with r12701 on OS X 10.7.5: with the patch applied, more than one stop can be assigned a different color, and dragging a gradient stop no longer produces a crash.

Markus Engel (engelmarkus) wrote :

Fixed in r12703.

Changed in inkscape:
status: In Progress → Fix Released
su_v (suv-lp) on 2013-10-21
Changed in inkscape:
milestone: 0.49 → none
Tavmjong Bah (tavmjong-free) wrote :

This fix broke undo for meshes. When 'undo' is invoked by the user, the XML tree is reverted to a previous state. This needs to force the mesh array to be rebuilt or the display is not updated.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers