Inkscape crashes when png-files are imported

Bug #441777 reported by Jan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Undecided
Unassigned

Bug Description

Importing not corrupted png-files causes occasionally a crash, especially having many layers. (around 11 or 12).
Importing the same png-file to a new inkscape file is possible and works.
Importing another png file to already imported 10 png files (in different layers) causes one of already imported files to be kicked out and "linked image not found" is displayed.

I am using Windows XP and Inkscape 0.46, built Apr 1 2008.

Revision history for this message
Alvin Penner (apenner) wrote :

- could you attach an svg file and png file to allow this experiment to be reproduced?
- would you be willing to try a more recent build, available at :
http://sourceforge.net/projects/inkscape/files/
- the latest version is 0.47pre3-1

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

possibly related bugs:
Bug #221202 “big raster images are not displayed.”
Bug #369105 “[WIN32] JPG-handling error on more than 16 pictures”

tags: added: bitmap importing
Revision history for this message
Jan (jmkopy) wrote :

First screenshot after the error occurred.

Revision history for this message
Jan (jmkopy) wrote :
Revision history for this message
Jan (jmkopy) wrote :

The SVG file causing errors. The png files will be attached after it. I tried to embed them in the svg file unfortunately a crash occurred, however I was able to send error report from the application to you.

Revision history for this message
Jan (jmkopy) wrote :
Revision history for this message
Jan (jmkopy) wrote :
Revision history for this message
Jan (jmkopy) wrote :
Revision history for this message
Jan (jmkopy) wrote :
Revision history for this message
Jan (jmkopy) wrote :
Revision history for this message
Jan (jmkopy) wrote :

png file 01 is produced out of a ps file, using GSView.
png files 02 to 04 are produced the same way however they transparency is being done by GIMP.

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

Did you test it as recommended with the latest prerelease build 0.47pre3?

I cannot reproduce the crash with Inkscape 0.46+devel r22384 on OS X 10.5.8 (2 GB RAM), all 4 images load and display correctly as far as I can tell, after I re-adjusted the linked paths.

I still think that it is more a performance issue than a bug (as probably in above listed other bug reports) because
- file 01 is quite large and
- files 02, 03, 04 open and render slowly in the default OS X image viewer app compared to their file size and file 01

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

screenshot of map with all 4 bitmaps loaded

Revision history for this message
Jan (jmkopy) wrote :

I did test with with the latest prerelease build 0.47pre3? The same error occurs.
See the attached files. Also info about my system is attached in a screenshot.
After you have relinked the files, try to remove one of the imported files, and then import another one, it is at this time, when the error occurs.
What do I do wrong with the files 02, 03, 04 that they render slowly in the default OS X image viewer?

Revision history for this message
Jan (jmkopy) wrote :
Revision history for this message
Jan (jmkopy) wrote :

I just got this empty window when it crashed.

Revision history for this message
Jan (jmkopy) wrote :
Revision history for this message
Jan (jmkopy) wrote :

My system details

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

win32 issue only?

I'm attaching my SVG test file with all image links changed to relative paths (any tester: put it in the same directory as the other images file 01-04)

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

> What do I do wrong with the files 02, 03, 04 that they render slowly in the default OS X image viewer?
I guess nothing is wrong - it might be the transparency combined with the image size (5100 × 6600 pixels)? I think they are ok - just need more processing time than expected from the plain file size. But I'm not an expert myself ;-)

Will test removing and adding back one of the bitmaps (though iirc I had to add one initially - the one with the location names wasn't inserted in your SVG yet).

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

I delete one, added it back, deleted all of them and added them back (not in the same order as before) - no crash. But slow overall, when selecting in the import dialog and importing, and draws a lot of memory from all running processes…

Revision history for this message
Alvin Penner (apenner) wrote :

if you are experiencing a crash in Windows, then you may be able to trap the exit messages using the utility program inkscapec, available from:
http://kaioa.com/node/63

this will involve copying inkscapec into the same directory as inkscape, and then running it from a DOS prompt.

Revision history for this message
Alvin Penner (apenner) wrote :

it looks like there is a problem associated with the preview option (Windows XP).

- load the file 41777-MAP_02_B_Israel_layered_02-LeWitt-relpath.svg, with preview disabled
- file loads normally with a number of missing links "Sinai_150_Test_03.png", "Jordan_04.png", "Jordan_03.png", "Israel_South.png".
- however, it looks like the 4 attached png files loaded okay.

- load the same file with preview enabled, and get a crash with Window popups referring to memory addressed at address 0, and the exit messages:

error : Memory allocation failed : building attribute
parser error : Memory allocation failed
Entity: line 88: parser error : Memory allocation failed : xmlSAX2AttributeNs
 flatness="0" cap_rounding="0.0" tracebackground="1" usepressure="1" usetilt="1"

              ^
error : Memory allocation failed : building attribute
error : Memory allocation failed : building attribute
error : Memory allocation failed : building attribute
error : Memory allocation failed : building attribute
parser error : Memory allocation failed
Entity: line 89: parser error : Extra content at the end of the document
    </group>
    ^

@ ~suv, thanks for the modified links!
@ Jan, could you try disabling preview to see if this helps. In the File->Open dialog box there is an icon at the top right that allows you to toggle the preview on/off.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Jan (jmkopy) wrote :

After switching off the preview:
0.46 still crashes.
0.47pre3 does not crash any more, however it does not load the selected file. See the attached screenshot (sorry, in German) (can I switch it to English on the fly somewhere? My OS in Eng.)

I have resized all my png files (from 600 dpi to 300 dpi) and it seems to work, no crashes, I can import all the files to whatever layer I need. It will mean redoing some of the maps .... uffff.

Revision history for this message
Alvin Penner (apenner) wrote :

if switching the resolution from 600dpi to 300dpi solves the problem, would you be willing to consider this bug to be closed?

Revision history for this message
Jan (jmkopy) wrote :

I think there is a serious issue with memory management when importing files. I for instance need a couple of png files of size 20 MB each just to use them temporarily for reference in order to draw the necessary svg paths. 20 MB for a high resolution png file is not that much.
In the meantime I also tried with much smaller pdf files and the 0.47pre3 does not display the second pdf file loaded. See the pdf files attached.Also added the screenshots of settings, when importing the pdf file and the reaction of inkscape.

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

PDF import related: bug #367779 “Out of memory crash while importing large pdf”

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.