[connectors] 'Exchange Position' of objects with orthogonal connectors causes crash

Bug #635469 reported by su_v
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Gellule

Bug Description

Inkscape 0.48+devel r9755 on Mac OS X 10.5.8

Using 'Exchange Position' with objects connected by orthogonal connectors causes Inkscape to crash and results in a broken emergency-save file.

Steps to reproduce:
1) draw some objects
2) connect them with orthogonal connector lines
3) select two or more objects
4) apply 'Exchange Positions' from the 'Align&Distribute' dialog
-> crash

Console message:
Assertion failed: (displayRoute.at(indexLow)[altDim] < displayRoute.at(indexHigh)[altDim]), function buildOrthogonalChannelInfo, file libavoid/orthogonal.cpp, line 1747.

Emergency-saved file cannot be open in Inkscape: it triggers the same crash again (file attached).

Related:
Bug #171944 “Exchange position of selected objects”:
<https://bugs.launchpad.net/inkscape/+bug/171944>

Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
su_v (suv-lp) wrote :

Emergency-saved file, causes same crash when opened in Inkscape.

tags: added: crash
Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Ubuntu 10.04, Inkscape trunk revision 9575.
It doesn't happen all the time, and I haven't found what triggers the crash.

Is there a point in taking connectors into account when aligning/rotating objects?
IMHO, they should be ignored.

Changed in inkscape:
importance: Undecided → High
milestone: none → 0.49
status: New → Confirmed
Revision history for this message
Michael Wybrow (mjwybrow) wrote :

I've tried a few times, and I can't reproduce this at all. Any further thoughts on how to trigger this bug?

Changed in inkscape:
assignee: nobody → Michael Wybrow (mjwybrow)
Revision history for this message
su_v (suv-lp) wrote :

Still present and reproduced in Inkscape 0.48+devel r9854 on OS X 10.5.8, steps as originally described (tested with r9854, default preferences and default template)

In the attached file select the red and green rectangle, open the 'Align&Distribute' dialog and click on the first of the three 'Exchange position' buttons in the 'Rearrange' section.

(crashes consistently using a local debug build -- r9854 compiled with CFLAGS="-g -O3 -Wall" -- but also e.g. with r9841 from modevia)

Revision history for this message
su_v (suv-lp) wrote :

Same console message and backtrace in Bug #700298 “File with connector crashes on load”.

Revision history for this message
su_v (suv-lp) wrote :

Same console message and backtrace in Bug #705382 “A file I created in inkscape caused it crash and crashes each time immediately after opening file.”

Revision history for this message
lippj (j-lipp) wrote :

I can also trigger this error on Win7, with Inkscape 0.48.0 r9645. attempting to open attached file causes error every time. Full error message given:
Microsoft visual C++ Runtime Library

Assertion failed!

Program: C:\Program Files (x86)\Inkscape.exe
File: src/libavoid/orthogonal.cpp
Line: 1747

Expression: displayRoute.at(indexLow)[altDim] < displayRoute.at(indexHigh)[altDim]

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts

(Press Retry to debug the application - JIT must be enabled)

Revision history for this message
lippj (j-lipp) wrote :

I have managed to rescue my file by text editing the .svg. I removed all <path... entries which referred to connectors which had been translated. Inkscape could then open it. I then had to manually add the connections back in (but this time I used the bezier/straight line tool rather than conmnectors). Hope this info helps pin it down a bit further.

Revision history for this message
su_v (suv-lp) wrote :

> I then had to manually add the connections back in

This should not necessary. As described in previously mentioned related bug #705382 comment #3, changing the value "orthogonal" of the path attribute 'inkscape:connector-type' to "polyline" allows to reopen the file without crash - with the connectors still in place (though no longer orthogonally routed).

Revision history for this message
su_v (suv-lp) wrote :

Same console message and backtrace in Bug #716057 in Inkscape: “Node tool causes inkscape crash”.

Revision history for this message
su_v (suv-lp) wrote :

Same console message and similar backtrace in Bug #771738 in Inkscape: “Connector tool crash Inkscape ” (trigger: coinciding begin and end nodes of a new orthogonal connector by double-clicking a highlighted connector point).

Revision history for this message
David Menasce (zaprime) wrote :

I have managed to trigger the error twice (and unfortunately don't know what I did so can't replicate it). Now I have to uncorrupt my file and emergency save file :(

"Microsoft visual C++ Runtime Library

Assertion failed!

Program: C:\Program Files (x86)\Inkscape.exe
 File: src/libavoid/orthogonal.cpp
 Line: 1747

Expression: displayRoute.at(indexLow)[altDim] < displayRoute.at(indexHigh)[altDim]

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts

(Press Retry to debug the application - JIT must be enabled)"

Clicking either button crashes Inkscape.

Interestingly enough, the files open fine in IE and Opera although the text is missing.

Revision history for this message
su_v (suv-lp) wrote :

Attaching fixed version of 'Systems Diagram V2.svg.2011_06_04_22_49_26.0.svg'
(opens in 0.48.1 and current trunk without crash)

Revision history for this message
su_v (suv-lp) wrote :

Crash no longer reproduced with patch attached to bug #771738
tested with Inkscape 0.48+devel r10268+patch on Mac OS X 10.5.8 (i386)

ScislaC (scislac)
Changed in inkscape:
assignee: Michael Wybrow (mjwybrow) → Gellule (gellule-xg)
milestone: 0.49 → 0.48.2
status: Confirmed → Fix Committed
Ted Gould (ted)
Changed in inkscape:
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.