Save As... -> filetype "PDF via Cairo" crashes

Bug #178803 reported by Vaughn Iverson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Critical
theAdib

Bug Description

Hi, Save As... File>Save a Copy... Both cause a crash when "PDF via Cairo" is selected as the output filetype. Note: filetype "PostScript via Cairo" appears to work correctly and is not effected by this bug.

I have consistently reproduced this on WinXP build: Inkscape0712261744

Steps to reproduce:

1) Launch Inkscape (Build 0712261744 or 0712261924)
2) Draw something. (This is optional, if you leave the document blank, the crash still happens)
3) Select: File>Save As... or File>Save a Copy...
4) "Select File to Save to" dialog appears. Choose filetype "PDF via Cairo" and type a filename. Leave everything else default. Click <Save>
5) "Cairo PDF Output" dialog appears. Changes to settings in this dialog appear to have no effect on what follows. Click <OK>

Symptoms:

Crash Dialog: Microsoft Visual C++ Runtime Library.
Runtime error! This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Click <OK>

Second crash dialog: Inkscape encountered an internal error and will close now. Click <Close>

When run under gdb the program exits with Code 03, but there is no stack backtrace, presumably because this manifests as a runtime error and not a processor exception of some type.

In looking at previous bug reports, it looks like there have been SaveAs crashes in the past, but they seemed to affect all filetypes, or are very old (pre 0.45) The fact that this effects Cairo PDF but no Cairo PS output appears to make it different.

Cheers, Vaughn

Revision history for this message
Vaughn Iverson (vsi) wrote :

Please forgive some of my grammar above. That's the "effect" (noun) that happens when multiple distractions "affect" (verb) one's writing! -V

Revision history for this message
theAdib (theadib) wrote :

confirmed. I will look at it bcs. I touched the module lately.

Changed in inkscape:
assignee: nobody → theadib-gmail
importance: Undecided → Critical
milestone: none → 0.46
status: New → Confirmed
Revision history for this message
theAdib (theadib) wrote :

ok: fixed in revision 16831
The line:
    old_blurToBitmap = ext->get_param_bool("blurToBitmap");
has trow an exception Parameter does not exists. Hm, there is this line in Parameters:
    "<param name=\"blurToBitmap\" gui-text=\"" N_("Convert blur effects to bitmaps") "\" type=\"boolean\">false</param>\n"
So I think that this parameter is there.
However I surrounded that get/set_param by try/catch blocks so Inkscape will not crash.
Adib.

Changed in inkscape:
status: Confirmed → Fix Released
Revision history for this message
Vaughn Iverson (vsi) wrote :

OK, this seems to fix this specific case, but I'm still seeing different crashes in Cairo PDF SaveAs related to the case where text is not converted to paths. I'll file a separate bug report for those. Thanks! -Vaughn

Revision history for this message
theAdib (theadib) wrote :

Vaughn, could you pls also attach SVG where it does crash. Thx Adib.

Revision history for this message
Vaughn Iverson (vsi) wrote :

Filed a new bug for the text related crashes here: https://bugs.launchpad.net/bugs/178985
The test SVG is attached there but you can also recreate a slightly different version via the Method "A" I describe in that report.
Cheers, -V

Revision history for this message
rockstar1707 (rockstar1707-gmail) wrote :

Although this was marked as released, Inkscape still crashes with the latest nightly build for Win32 (as of 12th February 2008). I tried to export simple file with only one filled rectangle. It always crashed with the following backtrace from GDB:

===============================================================
Program received signal SIGSEGV, Segmentation fault.
0x0042e3a7 in Inkscape::Extension::Extension::get_state ()
(gdb) bt
#0 0x0042e3a7 in Inkscape::Extension::Extension::get_state ()
#1 0x004e7b73 in Inkscape::Extension::Effect::effect ()
#2 0x01625245 in Gtk::Dialog_Class::response_callback (self=0x4df0718, p0=-5)
    at dialog.cc:186
#3 0x62743995 in _libmsvcrt_a_iname ()
   from c:\Program Files\Inkscape_latest\libgobject-2.0-0.dll
#4 0x04df0718 in ?? ()
#5 0xfffffffb in ?? ()
#6 0x03e7bac0 in ?? ()
#7 0x0022de20 in ?? ()
#8 0x0022dd08 in ?? ()
#9 0x016251b0 in Gtk::Dialog_Class::wrap_new () at dialog.cc:211
#10 0x62756dc6 in _libmsvcrt_a_iname ()
   from c:\Program Files\Inkscape_latest\libgobject-2.0-0.dll
#11 0x06b14148 in ?? ()
#12 0x00000000 in ?? ()
(gdb) quit
The program is running. Exit anyway? (y or n)
==========================================================

The resolution was set to 300 DPI and both options (text => paths and blur => bitmap) were marked. Though there was no text and no blurs in the file at all.

I hope the backtrace helps.

Revision history for this message
bartje (bart-deruyter) wrote :

I've got a similar problem on linux, but the file was created by a friend on a windows machine.
Printing to file 'pdf' or 'eps' gives the same result as 'save as' pdf.

Of course I can't tell if it would have been the same if the file was created with the linux version. Anyway, this is the result, using 'Inkscape 0.47 r22583, built Nov 26 2009' when trying to save as, or print as pdf or eps :

ERROR:extension/internal/cairo-render-context.cpp:898:void Inkscape::Extension::Internal::CairoRenderContext::setTransform(const Geom::Matrix*): assertion failed: (_is_valid)

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.

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.