Crash application without any message after saving image as Windows Metafile .wmf

Bug #1534833 reported by Ololuki
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
David Mathog

Bug Description

I try to save attached file "diody.svg" as Windows Metafile .wmf and then Inkscape crashes
windows 7
Inkscape 0.91 r13725

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

Please provide details about
1) the installer used for Inkscape 0.91: 32bit or 64bit?
2) the chosen WMF export settings

tags: added: exporting win32
removed: save seven windows windows7
Changed in inkscape:
importance: Undecided → High
status: New → Incomplete
Revision history for this message
su_v (suv-lp) wrote :

Crash not reproduced with Inkscape 0.91 r13725 on OS X 10.7.5 using default WMF export settings (new prefs), see attached WMF file.

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

- crash reproduced on Windows 7 (32 bit), Inkscape 0.91 r13725 (Jan 30 2015)
- file save type was Windows Metafile, export options all unchecked
- no DOS error messages

- crash not reproduced if I use the export option "Convert text to Paths", result attached here.

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

- exactly same behavior seen on Windows XP, Inkscape 0.91+devel r14569 (Jan 9 2016)
- in this case, I get the backtrace below, when leaving all options unchecked

Program received signal SIGSEGV, Segmentation fault.
0x00760606 in U_WMREXTTEXTOUT_set ()
(gdb) bt
#0 0x00760606 in U_WMREXTTEXTOUT_set ()
#1 0xf75cb90b in ?? ()
#2 0x40b85c81 in ?? ()
#3 0x0023c570 in ?? ()
#4 0x00000001 in ?? ()
#5 0x00000000 in ?? ()
(gdb)

Changed in inkscape:
status: Incomplete → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

Crash reproduced on OS X 10.7.5 with 0.91 r13725 and 0.91+devel r14584 as described by Alvin (i.e. if all WMF export options are unchecked).

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

Backtrace with debug build 0.91+devel r14556 attached.

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

attached is a reduced test case which produces the same crash. The crash may be related to some non-Ascii text characters in a tspan element. The relevant hex code is shown below.

000830 20 20 20 20 69 64 3D 22-74 73 70 61 6E 34 31 36 id="tspan416
000840 32 22 3E EF A3 A9 3C 2F-74 73 70 61 6E 3E 0A 20 2">´ú®</tspan>?

The three non-Ascii codes are 'EF A3 A9'.

Revision history for this message
David Mathog (mathog) wrote :

I could not reproduce the crash on my test system. Could not update and build the current release on 12.04 because it failed the requirement for bdw-gc 7.2. Currently updating to 14.04, but that is going to take a while. In the meantime, can somebody with a "crashable" configuration please do the following:

1. move the text into the drawing and see if it makes a difference. On my system diody_reduced has the text far outside
the drawing area.
2. list the WMF save options that are checked, especially the "Map Unicode" options. (I tried a bunch of combinations but
none of them crashed.)
3. Change the font to something other than "Symbol" and see if it makes a difference.

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

attached is a modified file with the text moved so that it is visible. The text is an 'a' with a tilde symbol.
this crashes whenever the option "convert text to paths' is unchecked.

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

attached is a modified file with the text modified so that it is a normal 'a'.
 this does not crash when exported as wmf

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

fwiw, the corresponding emf output does not crash under any circumstances as far as I can tell, so it might be worthwhile to just duplicate the emf procedure in the wmf code.

Revision history for this message
David Mathog (mathog) wrote :

I still cannot get this to crash on my system!

Just upgraded to Ubuntu 14.04 (32 bit)

In Inkscape build directory:

bzr revert
bzr update
bzr revno
#14593
./configure
make clean
make
src/inkscape /tmp/diody_visible_crash.wmf
# save as, WMF "text to paths" checked, everything else unchecked.

No problem. Also no problem opening the wmf file that was created.

The character shown on my system is "copyright" though, not a with a tilde. Modified the no crash
one with U00E3 as the sole character. save svg. save as WMF, still no problem.

If you have a copy of inkscape compiled with -g, please try setting a breakpoint at wmf-print.emf:1517, load diody_visible_crash.svg, save it as wmf. On my system
with only option "text to paths" checked it never hits that point. With nothing checked it does,
and rtl=1,xpos=319,ypos (optimized out), ndx=1, *adx=66

IF "text to path" is set it isn't ever supposed to call PrintWmf::text(), which holds line 1517. Far upstream it is supposed
to convert the glyphs to strokes and call other routines. My best guess is that for some reason that upstream conversion
is failing, perhaps because of differences in fonts on our systems, and this case is unhandled so it does call text() but with invalid parameters.

Revision history for this message
David Mathog (mathog) wrote :

Sorry, typo, that was supposed to be:

src/inkscape /tmp/diody_visible_crash.svg

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

as stated above, you need to uncheck all options

Revision history for this message
David Mathog (mathog) wrote :

I'm shooting blind here, but somebody who can reproduce the problem please give this patch a try.

Revision history for this message
David Mathog (mathog) wrote :

The patch of the last message was committed as revision 14594. Worst case, it should be harmless, best case it fixes this bug.

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

fix confirmed on rev 14600, thanks David!

Changed in inkscape:
status: Confirmed → Fix Committed
su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.92
assignee: nobody → David Mathog (mathog)
tags: added: backport-proposed
Revision history for this message
Martin Owens (doctormo) wrote :

Already backported

tags: added: backported
removed: backport-proposed
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
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.