crash on python-driven import - win32 build 0803061655.7z

Bug #201630 reported by Alvin Penner
2
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Unassigned

Bug Description

running win32 nightly build 0803061655.7z

choose either :
File | Open | Windows Metafile (.wmf)
or File | Open | Computer Graphics Metafile (.cgm)

In both cases Inkscape crashes with the DOS message :

C:\Python25\APP>python inkcl.py
return code: 3
terminate called after throwing an instance of 'Glib::SpawnError'

Both of these imports use the python module uniconv.

Revision history for this message
theAdib (theadib) wrote :

Alvin, is uniconv included in the inkscape python package? Or do you use your uniconv installed on your host-system?
Pls recheck with nightly build later than 12 march, see also my other posts.
Keep up. I really appreciate your work. Adib.

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

    sorry, I should have mentioned that, I installed uniconv myself directly from the internet. In order to get uniconv to run I had to do a bit of patching of the .inx file, as mentioned in Bug 197617.
    I should say that I don't really think uniconv is specifically the problem, in the last week or so every import or export that is python-related has been giving me trouble.

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

this is probably related to Bug 197359

Revision history for this message
Alvin Penner (apenner) wrote :
Download full text (4.0 KiB)

running win32 build Inkscape0803141639.7z
unfortunately, the behaviour is the same as before, still get 'Glib::SpawnError'

attached is trace :

C:\Program Files\Inkscape>gdb inkscape
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(no debugging symbols found)
(gdb) symbol-file inkscape.dbg
Reading symbols from C:\Program Files\Inkscape/inkscape.dbg...done.
(gdb) run
Starting program: C:\Program Files\Inkscape/inkscape.exe
Loaded symbols for C:\WINDOWS\system32\ntdll.dll
Loaded symbols for C:\WINDOWS\system32\kernel32.dll
Loaded symbols for C:\Program Files\Inkscape\libatkmm-1.6-1.dll
Loaded symbols for C:\Program Files\Inkscape\libatk-1.0-0.dll
Loaded symbols for C:\Program Files\Inkscape\libglib-2.0-0.dll
Loaded symbols for C:\Program Files\Inkscape\intl.dll
Loaded symbols for C:\WINDOWS\system32\msvcrt.dll
Loaded symbols for C:\WINDOWS\system32\advapi32.dll
Loaded symbols for C:\WINDOWS\system32\rpcrt4.dll
Loaded symbols for C:\WINDOWS\system32\ole32.dll
Loaded symbols for C:\WINDOWS\system32\gdi32.dll
Loaded symbols for C:\WINDOWS\system32\user32.dll
Loaded symbols for C:\WINDOWS\system32\shell32.dll
Loaded symbols for C:\WINDOWS\system32\shlwapi.dll
Loaded symbols for C:\WINDOWS\system32\ws2_32.dll
Loaded symbols for C:\WINDOWS\system32\ws2help.dll
Loaded symbols for C:\Program Files\Inkscape\libgobject-2.0-0.dll
Loaded symbols for C:\Program Files\Inkscape\libglibmm-2.4-1.dll
Loaded symbols for C:\Program Files\Inkscape\libgmodule-2.0-0.dll
Loaded symbols for C:\Program Files\Inkscape\libsigc-2.0-0.dll
Loaded symbols for C:\Program Files\Inkscape\libcairo-2.dll
Loaded symbols for C:\Program Files\Inkscape\libfontconfig-1.dll
Loaded symbols for C:\Program Files\Inkscape\freetype6.dll
Loaded symbols for C:\Program Files\Inkscape\libexpat.dll
Loaded symbols for C:\Program Files\Inkscape\libpng13.dll
Loaded symbols for C:\Program Files\Inkscape\zlib1.dll
Loaded symbols for C:\WINDOWS\system32\msimg32.dll
Loaded symbols for C:\Program Files\Inkscape\libcairomm-1.0-1.dll
Loaded symbols for C:\Program Files\Inkscape\libgdk-win32-2.0-0.dll
Loaded symbols for C:\Program Files\Inkscape\libgdk_pixbuf-2.0-0.dll
Loaded symbols for C:\Program Files\Inkscape\jpeg62.dll
Loaded symbols for C:\Program Files\Inkscape\libtiff3.dll
Loaded symbols for C:\Program Files\Inkscape\libpango-1.0-0.dll
Loaded symbols for C:\Program Files\Inkscape\libpangocairo-1.0-0.dll
Loaded symbols for C:\Program Files\Inkscape\libpangowin32-1.0-0.dll
Loaded symbols for C:\WINDOWS\system32\imm32.dll
Loaded symbols for C:\Program Files\Inkscape\libgdkmm-2.4-1.dll
Loaded symbols for C:\Program Files\Inkscape\libgtk-win32-2.0-0.dll
Loaded symbols for C:\WINDOWS\WinSxS\X86_Microsoft.Windows.Common-Controls_6595b
64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
Loaded symbols for C:\WINDOWS\system32\comdlg32.dll
Loaded symbols for C:\WINDOWS\system3...

Read more...

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

I am also having difficulty running uniconv from a DOS prompt outside of Inkscape, so this may not be an Inkscape problem.
I have filed a bug report with sk1project and will await the answer.

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

okay, I have received feedback from
http://sk1project.org/forum/topic.php?forum=2&topic=34
which indicates that this is not a uniconv problem , but is actually an Inkscape problem.

Revision history for this message
Marcin Floryan (mfloryan) wrote :

Actually, this seems to be the problem with the WMF files used for conversion if I read correctly? Is that the case, than we could close this bug, which does not mean - there is still problem interfacing uniconv from Inkscape.

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

I should clarify... When I first reported the bug, I was using an old .wmf file that was inappropriate because it apparently contained a bitmap. Since then I have retried the procedure using a newer .wmf file and still encounter the same problem. The new .wmf file I am using works well when I import it using the menu option to open Windows Metafiles (*.wmf), which does not use uniconv; but it crashes when I use the menu option Windows Metafile (*.wmf), which does use uniconv.
    Also, the change I made in the script file to get the uniconv utility to be recognized was to go into the .inx file and replace the word uniconv with uniconv.cmd

Revision history for this message
sas (sas-sas) wrote :

Maybe this is a stupid question, but why is there a WMF import extension if Inkscape already has native WMF import? (I'm assuming that the "Windows Metafiles (*.wmf)" option is a native import function, as it doesn't seem to be implemented as an extension.)

Changing "uniconv" to "uniconv.cmd" would break the extension on Linux and OS X, so there would have to be two versions of the .inx file. It might be better just to change the extension handling code to search for a .cmd file if no .exe is found.

Revision history for this message
Marcin Floryan (mfloryan) wrote :

It is actually a very good question. Your are right. I was just looking at the WMF import 'native' code and it seems like this is a proper implementation based on the Microsoft specs added in Nov 06 maintained by Ulf Erikson with a last update in Nov 07. However it is difficult to see which implementation is better (internal or uniconv) in terms of performance and compliance.

I am trying to look into extensions that require external dependencies under Windows. It seems like we might need a bit different approach as you are right the mentioned change would break other systems. So far the approach to windows extensions seems to have been to include all dependencies with the distribution (like perl and python) and if the same was followed with uniconv this would probably be the easiest approach.

Revision history for this message
sas (sas-sas) wrote :

Marking as fixed, as Alvin Penner reports elsewhere (https://bugs.launchpad.net/inkscape/+bug/197617/comments/23 ) that he no longer gets a crash. The crash was presumably caused by attempting to spawn a shell script under Windows, and we no longer do that.

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

sounds good to me, thanks...

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.