Inkscape-0.92.1-x64 crashes when printing - requested the Runtime to terminate it in an unusual way

Bug #1665768 reported by William Spinney
50
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Patrick Storz

Bug Description

Inkscape-0.92.1-x64 on Windows 10 Pro 64-bit, Intel i5-2410M CPU @ 2.30GHz, RAM 4 GB (3.82 GB usuable). When printing an imported .ai file or a .svg file, program crashes Popup read: "This application has requested the runtime to terminate in an unusual way please contact the applications support team for more".

I uninstalled and installed both the Inkscape-0.92.1 MSI and EXE installers but the same problem occurred.

I finally uninstalled Inkscape-0.92.1 and installed Inkscape-0.91 and now the programs prints without any problem.

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

could you attach the file that caused the crash, for testing purposes?

Revision history for this message
William Spinney (sailor349) wrote : RE: [Bug 1665768] Re: Inkscape-0.92.1-x64 crashes when printing - requested the Runtime to terminate it in an unusual way

3 files are attached. These crashed Inkscape-0.92.1 but printed perfectly when using Inkscape-0.91.

Bill

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Alvin Penner
Sent: Friday, February 17, 2017 3:43 PM
To: <email address hidden>
Subject: [Bug 1665768] Re: Inkscape-0.92.1-x64 crashes when printing - requested the Runtime to terminate it in an unusual way

could you attach the file that caused the crash, for testing purposes?

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1665768

Title:
  Inkscape-0.92.1-x64 crashes when printing - requested the Runtime to
  terminate it in an unusual way

Status in Inkscape:
  New

Bug description:
  Inkscape-0.92.1-x64 on Windows 10 Pro 64-bit, Intel i5-2410M CPU @
  2.30GHz, RAM 4 GB (3.82 GB usuable). When printing an imported .ai
  file or a .svg file, program crashes Popup read: "This application has
  requested the runtime to terminate in an unusual way please contact
  the applications support team for more".

  I uninstalled and installed both the Inkscape-0.92.1 MSI and EXE
  installers but the same problem occurred.

  I finally uninstalled Inkscape-0.92.1 and installed Inkscape-0.91 and
  now the programs prints without any problem.

To manage notifications about this bug go to:
https://bugs.launchpad.net/inkscape/+bug/1665768/+subscriptions

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Revision history for this message
colin (caanderson) wrote :

I Have the same problem with .92.1 and win10. I have attached the file causing the problem

su_v (suv-lp)
tags: added: crash printing regression win64
Revision history for this message
Kathy Smith (kathys) wrote :

Same problem. Just downloaded .92 64 bit (running Windows 7 Pro 64 bit with Intel processor and 3 GB RAM) hoping there was a fix for printing issues I was having in .91 (transparent part of images print black). Simply trying to print gets me the same runtime error as above.

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

testing the file Poster AAUW-16.ai from comment 2, on Windows 10.

- crash not reproduced on Inkscape 0.92.0 r15299 (32 bit, exe build)
- crash reproduced on Inkscape 0.92+devel 15536 (64 bit build). DOS exit message is:

(inkscape.exe:8572): Gtk-WARNING **: Allocating size to GtkWin32EmbedWidget 00000000112736A0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?

(inkscape.exe:8572): Gtk-WARNING **: gtkmm__GtkVBox 000000000CAD0F60 is mapped but visible=1 child_visible=1 parent GtkWin32EmbedWidget 00000000112736A0 mapped=0
Assertion failed!

Program: C:\Users\penne_000\AppData\Roaming\InkscapeBZR\build\inkscape\inkscape.exe
File: cairo-recording-surface.c, Line 599

Expression: ! surface->unbounded

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.
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Alvin Penner (apenner) wrote :

apparently I can avoid the crash if I use the XML editor to delete the clip path

Revision history for this message
pinman cimorelli (pinman) wrote :

This same thing is happening to me. If I import an .ai file and try to print - it will crash with a call to the C++ run time library. I am attaching a bad file and good file after ungrouping and releasing the clips. perhaps this will assist in fixing the problem. I can take the exact same bad file and print from Fedora 25 to the same printer with no problem so it is Windows specific. AI will also import the svg and print it.

Revision history for this message
pinman cimorelli (pinman) wrote :

This file will print after ungrouping and releasing clip set.

Revision history for this message
phiscribe (dcbevins) wrote :

I see people having problems printing from Windows with an imported AI file that has a clip.

I think the problem is more basic and doesn't really involve AI files. I can draw a circle in Inkscape, clip a bitmap of a cloud into it. Try to print and it crashes. It seems anything with a clip won't print, native or imported.

Attached file. Win 8.1

Revision history for this message
phiscribe (dcbevins) wrote :

Sorry, forgot Inkscape 0.92.1 r15371. Wish one could edit a post. Plus a picture of the crash.

jazzynico (jazzynico)
Changed in inkscape:
importance: Undecided → High
Revision history for this message
John Allen (draggindaktoa) wrote :

I'm having the same issue with Inkscape 0.92.1 r15371, EXE build. Win 7 Professional 64-bit.

Seems to only happen when a clipping mask is visible. I have a project with different views arranged as layers. I can print all layers successfully until I get to the layer containing clipped artwork. When trying to print that view I get the "This application has requested the runtime to terminate in an unusual way please contact the applications support team for more" error.

I can confirm that if I release the clip, the view prints successfully.

Windows Event Viewer shows:

Faulting application name: inkscape.exe, version: 0.92.1.0, time stamp: 0x58a340d0
Faulting module name: libcairo-2.dll, version: 0.0.0.0, time stamp: 0x569bb50e
Exception code: 0x40000015
Fault offset: 0x00000000000f4cc2
Faulting process id: 0x6108
Faulting application start time: 0x01d2c9ce78fbc812
Faulting application path: C:\Program Files\Inkscape\inkscape.exe
Faulting module path: C:\Program Files\Inkscape\libcairo-2.dll
Report Id: fe95aab5-35c2-11e7-b539-90b11c898301

Revision history for this message
Patrick Storz (ede123) wrote :

Is anybody who's experiencing this bug familiar with debugging applications using gdb? Maybe Alvin? ;-)

It might help figure out the cause of this obviously nasty bug which I'm unfortunately not able to reproduce myself, so I can't debug it.

Anybody who's interested: If you use Inkscape 0.92.x (x64) you can get a version of gdb that is known to work from
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/5.3.0/threads-win32/seh/

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

re-tested with Windows 10, Inkscape 0.92+devel 15697

both the DOS error messages and the gdb backtrace appear to be identical to Bug #1677718

Revision history for this message
Patrick Storz (ede123) wrote :

I'm still not seeing the issue on my side, but the error message pointed me towards a potential bug that was fixed in cairo 1.15.4, see [1].

devlibs64 use cairo 1.15.2 which is probably affected.
MSYS2 builds on the other hand already use cairo 1.15.4. Could someone test if printing works in those builds, e.g. [2]?

[1] https://cgit.freedesktop.org/cairo/commit/?id=90d50cd92315d6760069ad8062aba5e297370b20
[2] https://download.tuxfamily.org/inkscape/win64/inkscape_0.92.x_r15429_win64_MSYS2.7z

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

running Windows 10, and the MSYS build from comment 14, I still get a crash:
[2] https://download.tuxfamily.org/inkscape/win64/inkscape_0.92.x_r15429_win64_MSYS2.7z

DOS error message is:
C:\Windows\Temp\inkscape>inkscape
Assertion failed!

Program: C:\Windows\Temp\inkscape\inkscape.exe
File: ../../cairo-1.15.4/src/cairo-recording-surface.c, Line 608

Expression: ! surface->unbounded

Emergency save activated!

Revision history for this message
pinman cimorelli (pinman) wrote :

I also tried the MSYS build and get the same error when trying to print as I did in #7. It also skews the existing graphic I have into an oval from a circle. The same graphic will print fine from Linux (Cinnamon spin 25) to the same printers. I can reproduce the same error multiple times. It appears only the .ai converted files are problematic. I can create from scratch and they will print.

Revision history for this message
Patrick Storz (ede123) wrote :

I was finally able to reproduce the bug.

I suspect the reason for me not hitting the bug earlier was the setting "Rendering -> Backend -> Bitmap" in the print dialog:
- if backend is set to "Bitmap" the crash does not occur
  (this could be used as a workaround for the time being)
- if backend is set to "Vector" Inkscape crashes.

For an MSYS2 to build of Inkscape 0.92+devel (9f4aee7fce, 2017-07-18) which is built against mingw-w64-x86_64-cairo 1.15.6-1 the error message reads:

Assertion failed!
Program: E:\Temp\Inkscape\inkscape.git\trunk\build64\inkscape\inkscape.exe
File: ../../cairo-1.15.6/src/cairo-recording-surface.c, Line 608
Expression: ! surface->unbounded

The crash occurs at https://gitlab.com/inkscape/inkscape/blob/9f4aee7fce/src/ui/dialog/print.cpp#L134 (although uncommenting that line just moves the crash somewhere else, so there might be something fundamentally wrong with the GtkPrintContext we use in that function.

Revision history for this message
Patrick Storz (ede123) wrote :

Good news: I might be on to something!
I found a similar issue that was fixed in cairo some time ago and re-used the code in a different location.

Inkscape linked against my custom-built cairo 1.15.6 does not crash anymore and print properly!

See upstream bug for details:
https://bugs.freedesktop.org/show_bug.cgi?id=101833

Revision history for this message
Patrick Storz (ede123) wrote :

Testing builds of 0.92.x with patched cairo:
https://ci.appveyor.com/api/buildjobs/xitj7u3h7dj396qg/artifacts/build%2Finkscape-0.92.x_print_bug-(2017-07-19_d11389d)-x86_64.7z
https://ci.appveyor.com/api/buildjobs/0o779os8hahnune9/artifacts/build%2Finkscape-0.92.x_print_bug-(2017-07-19_d11389d)-i686.7z

The crash is fixed but clipping actually seems to be wrong in some cases, so maybe the crash in cairo was triggered by an actual bug in our clipping code (which I unfortunately have very little knowledge of).

That being said results by 0.91 are not really better (they seem to have even more issues than 0.92.x).

Revision history for this message
pinman cimorelli (pinman) wrote :

I ran the patched version on a Lenovo laptop 8GB RAM W10x64Pro.
It now prints - I am attaching the errors from the "stable" version and also from the patch.
I have rebooted and tested on 3 brother printers with success. MFC7860DW, MFC9340CDW, and HL3170CDW.
In the past I would design on Windows and then print using Fedora 25 Cinnamon as Fedora would always print the images. It was diagnosed as a problem with clipping from AI exported SVGs. Now they work.
Thanks!

Revision history for this message
Patrick Storz (ede123) wrote :

Attached are PDF prints from Ubuntu 15.04 using Inkscape 0.92+devel 15680.

The prints all seem fine, so I'm afraid there's in fact an issue with clipping in Windows code of either Inkscape or cairo. (On Windows I tested PDF Creator (attached above) as well as Windows 10's built-in PDF printer and both produce the same result, so an issue with the PDF printer can likely be ruled out)

Patrick Storz (ede123)
Changed in inkscape:
milestone: none → 0.92.2
status: Confirmed → In Progress
assignee: nobody → Eduard Braun (eduard-braun2)
Revision history for this message
pinman cimorelli (pinman) wrote :

While this fix is working great, Bitdefender just found 4 instances of a virus. It is flagging for gen.variant.graftor.395973 on inkscape/lib/python2.7/site-packages/coverage/tracer.pyd and gen.variant.graftor.396166 on inkscape.exe and inkscape.com.
Would you please check your machine?

Revision history for this message
Patrick Storz (ede123) wrote :

Thanks for the report! I'm pretty sure this is a false positive (see scan results by Virustotal [1,2]). Gen:Variant.Graftor.* is "A Generic Detection of a file that appears to have trojan-like features or behavior." [3], i.e. an heuristic match.

That being said feel free to send those files to you virus scanners creator for detailed investigation to rule out any doubt (likely they'll just update their heuristics).

Also note, that those files were never on *my* machine. They are CI builds by AppVeyor, so if a virus were to be contained it comes from either one of the MSYS2 binaries or one of their virtual machines (both not completely impossible, but unlikely)

[1] https://www.virustotal.com/de/file/01cffbbb68d93c9b3adb710b348e167cd381903bfc20f0391c526af1d2a75604/analysis/1501325433/
[2] https://www.virustotal.com/de/file/e5088575cccdc17e3cfd6044fa8b2c5baa411d8005cc7799e387d078d08471fd/analysis/1501327904/
[3] https://www.f-secure.com/v-descs/trojan_w32_graftor.shtml

Revision history for this message
Patrick Storz (ede123) wrote :

CI builds now use a patched version of cairo by default, so should work, too:
https://gitlab.com/inkscape/inkscape/commit/c0c3ce16341256fedf249bdc0325ddc57fa4b598

jazzynico (jazzynico)
Changed in inkscape:
milestone: 0.92.2 → 0.92.3
Revision history for this message
Patrick Storz (ede123) wrote :

Actually fixed in 0.92.2 but I can not re-target it...

@jazzynico: Could you have a look?

Changed in inkscape:
status: In Progress → Fix Released
Mc (mc...)
Changed in inkscape:
milestone: 0.92.3 → none
milestone: none → 0.92
milestone: 0.92 → 0.92.3
Patrick Storz (ede123)
Changed in inkscape:
milestone: 0.92.3 → 0.92.2
Revision history for this message
FooFighter (neocray) wrote :

Still affected with 0.92.4 x64 on Windows 10 1809.
Fixes above seem not available anymore…

Revision history for this message
Patrick Storz (ede123) wrote :

The patch is still included in official builds.

I recommend to file a new issue (we're now using GitLab for issue tracking, see [1]) with a sample file attached.
Since this is likely a platform-specific cairo issue, though, I'm afraid it might take some time before somebody comes up with a fix...

[1] https://gitlab.com/inkscape/inbox/issues

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.