stroked and scaled Linked Offset text causes a crash upon open file

Bug #345371 reported by Barry Arthur
116
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Unassigned

Bug Description

I Love Inkscape - I didn't know I could be so creative! :-D

My installation of Inkscape crashes when trying to open a previously saved file containing text of a sufficient length and a Linked Offset copy that has been scaled using the Edit Paths By Nodes tool and a stroke applied.

There are two files in the attached TAR: no-crash.svg (which doesn't crash Inkscape) and crash.svg (which does :-) ). The difference between the two files is that crash.svg has a longer string of characters in the original text object than does no-crash.svg (6 vs 7). They both have the same scale and stroke changes applied.

The non-crashing file took progressively longer to open while I was testing the length of text I could get away with before a crash occurred.

My machine was idling at 6% CPU, 14% RAM usage before launching the non-crashing file in Inkscape.
(Total RAM = 1.36GB with over 1GB free, running on a crappy old AMD Sempron 3600+)

$ time inkscape no-crash.svg

real 0m27.664s
user 0m21.492s
sys 0m4.400s

CPU, RAM usage jumps to 100%, 56% while Inkscape is opening the file.
It settled down to 6%, 18% after Inkscape finished loading the file.

I am using Inkscape 0.46 (Dec 31 2008), installed from the standard debian pool
Linux: Mepis (with a lot of Debian upgrades): 2.6.22-1-mepis-smp #1 SMP PREEMPT i686 GNU/Linux

The following error-log is written to the terminal when Inkscape crashes from opening the crash.svg file:

terminate called after throwing an instance of 'std::bad_alloc'
  what(): std::bad_alloc

Emergency save activated!
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at www.inkscape.org
with a detailed description of the steps leading to the crash, so we can fix it.
terminate called recursively
Aborted

These tests were run by opening the files from the command line, however if the Open File dialog navigates to a directory containing the crash.svg file then Inkscape crashes as well. So, I guess this bug affects the preview code too.

I haven't tried this on the latest SVN version.

Tags: crash
Revision history for this message
Barry Arthur (barry-arthur) wrote :
tags: added: crash
Revision history for this message
su_v (suv-lp) wrote :

confirmed with Inkscape 0.46+devel r22436 on OS X 10.5.8: Inkscape crashes (badly) already when reading the file for the thumbnail in the GtkFileChooser, for _both_ attached files.

error messages:
(inkscape-bin:17308): Gtk-WARNING **: Unable to find default local directory monitor type
inkscape-bin(17308,0xa07f9720) malloc: *** mmap(size=1207959552) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
terminate called after throwing an instance of 'std::bad_alloc'
  what(): St9bad_alloc

Emergency save activated!

related to bug #414030 or rather: is bug #414030 a duplicate of this ;-) ?
"It looks as though the crash is related to the sequence in which svg elements are declared. The original file Ex.svg had the sequence : path, path, path, text. (where the paths all have an xlink:href reference to the text before it is declared.)"

Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

the file with reversed order of text and linked offset - opens without crash in Inkscape r22436, though it might look differently (as happened with the examples in bug #414030)

Revision history for this message
RitaL. (ritalouise2) wrote :

I have similar crash issues- not exactly the same. After twisting some text and creating linked offsets, I tried to group the text and offsets with other objects in the document, and got a Runtime Error! from Microsoft, and an internal error message from Inkscape, and a crash occurred. After the crash, I am unable to open the document again. Inkscape crashes in exactly the same way each time I try to open the crashed svg file. I am able to view the document in Firefox, but although the linked offsets don't bother it, Firefox can't read the twisted text. It straightens it out. I just tried to do a twisted text with linked offset, and no group function, and Inkscape let me save it, close it, and open it again, with no changes. If I change object to path and stroke to path, I am then able to group the linked offset and text together, close the file, and open it again.

The only remaining problem I have is how to open the files that crashed, so that I can change everything to paths.

Revision history for this message
RitaL. (ritalouise2) wrote :

I have to add to my report- my crash has nothing to do with whether or not the text or the linked offset has been stroked or not- only whether I convert the linked offset to path before trying to group it with other objects. I have the latest version of Inkscape- I downloaded it just about two days ago. Plus, if I convert the stroke to path as I said that i did, it turns white. So I checked, and am able to group the stroke of the linked offset without converting it to path first. I just select the entire linked offset and use the object to path function.

Revision history for this message
fudel (fudel-mz) wrote :

maybe a little bit late but in the last days faced the same prob and found a little tricky solution.

my problems are linked offsets to texts and linked offsets. i created a text changed it to an "unflown text" and for a better looking outline i created a linked offset to it. then i set the radius with the xml-editor to 4 and changed the color of the first linked offset. to add a shadow to the text an the 1st linked offset i made a linked the offset again to a new linked offset. i set the radius of the second offset to 2, next i set the fill color to black with an alpha value of 127 and unsharpened it.
the first time i did this to three different text objects any time after saving the changes inkscape crashed. while crashing a backup file was created. i tried to open the backup file and the original file, but i couldn't open one of the files.

the problem seem to be in the linked offset objects. today i created the linked offset objekts and changed it to a path. this stopps the crashes but whenever i try to change the text I have to create a new linked offset and so on.

while i had the feeling inkscape is running more smoothly, the app crashed again and i had a file that causes inkscape to crash while opening. the solution for me was using an editor and delete all xml-tags for offsets (i used to search for "radius"). after saving the modified file i was able to open it with inkscape again.

Revision history for this message
fudel (fudel-mz) wrote :

p.s. i forgot to mention before, at work i'm using the most current prerealese of 0.48 for windows, and at home under ubuntu linux i use the nightly build-ppa. both of them crashed.

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

From latest duplicate bug #697126:
It appears that a stroke added to the linked offset referencing the text object is the (or acts as additional) trigger for the crash on reopening the edited file.

Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
Larissa (auronsrv) wrote :

This bug also crashes Inkscape when one selects an affected file in the save/open dialog. This is especially bad, as the current work won't get saved (not even a backup).

Revision history for this message
Mark Ainsworth (mark-ainsworth) wrote :

This is still a problem with 0.48.2 Windows XP. Unfortunately this was the only feature I wanted to make use of. I'm just using it to make heading straplines for a brochure so retyping things isn't really an issue. It's just a real pain having to start from scratch each time.

The length of string doesn't seem to be an issue. Some of mine are only 5 letters long and it still crashes when trying to reload the file.

It reports an C Runtime library error.

Revision history for this message
jazzynico (jazzynico) wrote :

Crash confirmed on Windows XP, Inkscape 0.48.2, but not reproduced with the trunk revision 10761 (both on Windows XP) and Ubuntu 11.04.
Closing this report Fix Committed. Don't hesitate to reopen the report if you run into the same issue with a recent trunk revision.

Changed in inkscape:
milestone: none → 0.49
status: Triaged → Fix Committed
Revision history for this message
su_v (suv-lp) wrote :

> but not reproduced with the trunk revision 10761 (both on Windows XP) and Ubuntu 11.04.

@JazzyNico - if I open these files in current trunk, Inkscape may no longer crash, but the text art is rendered differently than expected and as in other SVG renderers (e.g. web browser):
a) in some files, the linked offsets are displaced - bug #817907 (?)
b) other files have erroneous lines drawn for the stroke of the offset (like bug #384688 (?))
   (see attachment based on example from duplicate bug #414030)

Revision history for this message
jazzynico (jazzynico) wrote :

@~suv - I've seen the b) issue recently when investigating another bug but playing with undo and redo fixed it. I'll try to find a way to reproduce it consistently and update bug #384688.
As for a), I don't remember exactly what was said on the dev list, but it seems that the current behavior has been accepted and that I should change the SVG code to reflect it in the tutorial.

Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Windows 7, Inkscape 0.47 and 0.48.2.
Not reproduced with 0.48.3.1, 0.48.5, 0.91 and lp:inkscape/0.92.x rev. 15067.

Changed in inkscape:
milestone: 0.91 → 0.48.3
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.