Windows 8: Inkscape crash when converting large .svg to raster format

Bug #1169902 reported by German Gomez-Herrero
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

When exporting a large .svg file to a raster format (e.g. .bmp or .png) Inkscape crashes. My inskcape version is 0.48.4 (r9939). I am attaching a sample.svg that should reproduce the crash. Similar but smaller .svg files do not make inkscape crash so the problem might be related to the file size.

The problem seems to be specific to Windows 8, although I am not sure of this as I don't have access to a Windows 7 machine anymore. However, I did convert in the past under Windows 7 quite a lot of very similar files to the sample that I am attaching and I never came across this problem. The same problem does not happen under Debian Linux 6.0 (running inkscape 0.47 r22583).

The crash manifests as a pop-up window that reads:

Runtime Error!
Program: C:\ProgramFiles (x86)\Inkscape\inkscape.exe

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Revision history for this message
German Gomez-Herrero (g-g-b) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

On Windows 7, Inkscape 0.48.4, I am unable to open this file, I get the following exitt message in DOS.

C:\Program Files\Inkscape>inkscape
terminate called after throwing an instance of 'std::bad_alloc'
  what(): std::bad_alloc

Does your crash occur when loading the .svg file, or only when exporting?

On Windows XP, Inkscape devel r12260, the svg file loads normally, and the export to png works normally at 300 dpi.

Revision history for this message
German Gomez-Herrero (g-g-b) wrote :

Thanks for helping out!

The crash occurs only when exporting. I can load the .svg file into Inkscape without any problems. By the way, the crash also occurs if I do the export from the command line using --export-png. For the DPI I have just used the default values (I assume 300 dpi) so far.

Just in case it helps, I tried loading the same file in Inkscape under Mac OS X 10.8.3 and it worked. But when trying to export it just hangs without any error message being produced. I had to kill Inkscape after waiting for several minutes. Under the same Mac OS X system, I can convert the .svg file to png using GIMP, suggesting that there is probably nothing terribly wrong with the .svg file itself. Although I wouldn't discard that completely since all the .svg files that I have tested are produced by the same .svg generator, plot2svg for MATLAB:

http://www.mathworks.nl/matlabcentral/fileexchange/7401-scalable-vector-graphics-svg-export-of-figures/content/plot2svg_20120915/plot2svg.m

I am making all these Mac OS X tests on my laptop which has only 8 GB of RAM while the Debian system that I tested earlier is much more powerful and has 128 GB of RAM.

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

would you be willing to try a recent development build for Windows?

http://www.oss-marketplace.com/index.php/downloads-mainmenu-63/Inkscape/Entwicklerversionen/

based on my experience this would likely solve the problem.

Revision history for this message
German Gomez-Herrero (g-g-b) wrote :

I just installed version 0.48+devel r121236 (Feb 14 2013) and this is what I found:

- I cannot load the sample.svg using the GUI anymore. If I try then Inkscape just dies without any message whatsoever. I can load similar but smaller .svg files (the boundary between success/failure seems to be somewhere around 2Mb).
- If I try the conversion using the command line, I get the following:

PS C:\Program Files (x86)\Inkscape> .\inkscape.com --export-png="C:\Users\gome
top\sample.svg"
Background RRGGBBAA: ffffff00
Area 0:0:750:468.75 exported to 750 x 469 pixels (90 dpi)
Bitmap saved as: C:\Users\gomez\Desktop\sample.png
** Message: Error: Inkscape encountered an internal error and will close now.

However, file sample.png is generated and it looks good (I am attaching it to this message).

Actually the behavior above although not perfect is fine for my purposes as I am using Inkscape only from the command line to convert batches of .svg files to .png. The fact that the Inscape error happens after the conversion is finished and without any pop-up window that requires user intervention is all I need. But of course I can make some additional tests if that helps finding the bug that seems to be hiding still. Thanks again for helping with this.

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

with respect to the crash message, could you try deleting or renaming the preferences.xml file, so it will start with a clean slate? The preferences.xml file is at (Windows 7, 32 bit):

C:\Users\username\AppData\Roaming\inkscape

Revision history for this message
German Gomez-Herrero (g-g-b) wrote :

That really solved the problem with the GUI. I can now load sample.svg and export it to .png without problems using the GUI. In fact both the loading and export operations are extremely fast. When using the command line, the conversion succeeds but I still get the same error message as before.

su_v (suv-lp)
tags: added: bitmap cli crash exporting win32
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.