Inkscape.org
Beginners' Questions shell mode inkscape constant crashes
  1. #1
    matteoa matteoa @matteoa

    Hello all,

    I'm converting hundreds of multipages PDF (~ 2-3-400Kbytes each) to SVG,m I firstly developed a sw that was building the commandline to convert them in batches and it was working great, but to convert ~2000 PDF it was taking many hours.

    So I decided to go with the shell mode, building a commands text file and then passing it to inkscape with the commandline "type InkcommandsREN.txt|inkscape --shell "; it works much quicker but...after some successful conversion (about 50% of the total) in the commandline I start seeing lines like this one(taken from the commandline output):
    <ExampleFile.PDF;export-type:svg;export-plain-svg;export-filename:.\Output\ExampleFile_1.svg; export-do
    Syntax Error (20634): Missing 'endstream' or incorrect stream length
    Syntax Error (30137): Missing 'endstream' or incorrect stream length

    repeatedly, but the conversion was still producing good output, after some tents of lines like the one above I start seeing lines like these:

    <Exmple1.PDF;export-type:svg;export-plain-svg;export-filename:.\Output_Ren\8726Exmple1_26.svg; export-do
    Syntax Error (283801): Missing 'endstream' or incorrect stream length
    Syntax Error (293396): Missing 'endstream' or incorrect stream length
    <Exmple1.PDF;export-type:svg;export-plain-svg;export-filename:.\Output_Ren\8726Exmple1_27.svg; export-do
    Syntax Error (283801): Missing 'endstream' or incorrect stream length
    Syntax Error (293396): Missing 'endstream' or incorrect stream length

    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:44.595: GC Warning: Failed to expand heap by 16777216 bytes
    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:44.685: GC Warning: Failed to expand heap by 16777216 bytes

    <Exmple1.PDF;export-type:svg;export-plain-svg;export-filename:.\Output_Ren\8726Exmple1_28.svg; export-do

    but the conversion were still successful, then after some more lines like this one above there is this:

    <ort-plain-svg;export-filename:.\Output_Ren\Exmple23.svg; export-do
    Syntax Error (75637): Missing 'endstream' or incorrect stream length
    Syntax Error (85300): Missing 'endstream' or incorrect stream length

    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:50.416: GC Warning: Failed to expand heap by 16777216 bytes
    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:50.477: GC Warning: Failed to expand heap by 16777216 bytes

    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:50.530: GC Warning: Failed to expand heap by 16777216 bytes
    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:50.589: GC Warning: Failed to expand heap by 16777216 bytes
    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:50.652: GC Warning: Failed to expand heap by 16777216 bytes
    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:50.918: GC Warning: Failed to expand heap by 16777216 bytes
    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:51.011: GC Warning: Failed to expand heap by 16777216 bytes

    <ort-plain-svg;export-filename:.\Output_Ren\Exmple24.svg; export-do
    Syntax Error (75637): Missing 'endstream' or incorrect stream length
    Syntax Error (85300): Missing 'endstream' or incorrect stream length

    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:51.166: GC Warning: Failed to expand heap by 16777216 bytes
    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:51.224: GC Warning: Failed to expand heap by 16777216 bytes

    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:51.285: GC Warning: Failed to expand heap by 16777216 bytes
    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:51.350: GC Warning: Failed to expand heap by 16777216 bytes
    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:51.406: GC Warning: Failed to expand heap by 16777216 bytes
    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:51.687: GC Warning: Failed to expand heap by 16777216 bytes
    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:51.694: GC Warning: Failed to expand heap by 262144 bytes
    ** (org.inkscape.Inkscape:25668): WARNING **: 09:57:51.698: GC Warning: Out of Memory! Heap size: 329 MiB. Returning NULL!


    ** (org.inkscape.Inkscape:25668): ERROR **: 09:57:51.730:
    unhandled exception (type std::exception) in signal handler:
    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 https://inkscape.org/report
    with a detailed description of the steps leading to the crash, so we can fix it.

    ** Message (recursed): Error: Inkscape encountered an internal error and will close now.
    the process tried to write in a non existing pipe

    A windows messagebox appears telling nothing but "ok" and then everything stops.

    Any idea on how to solve that?

    Thanks in advance

  2. #2
    inklinea inklinea @inklinea⛰️

    If it works for smaller batches.

    Maybe create a text file with a max number of lines, and pipe each file into a shell - closing the previous one.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions shell mode inkscape constant crashes