win32 crash on help menu

Bug #204779 reported by Alvin Penner
6
Affects Status Importance Assigned to Milestone
Inkscape
Fix Committed
Critical
Rygle
Nominated for Old by Rygle
0.46.x
Fix Committed
Undecided
Rygle

Bug Description

running win32 nightly build Inkscape0803141639.
Choose Help | Report a Bug
Inkscape crashes with the message :

C:\Program Files\Inkscape>python \python25\app\inkcl.py
return code: 3
** Message: Found local interpreter, 'C:\Program Files\Inkscape\python\pythonw.e
xe', Size: 24576
terminate called after throwing an instance of 'Glib::SpawnError'

Revision history for this message
prkos (prkos) wrote :

Confirmed on WinXP, 21st March build

All things python are affected (effects, help menu)

Changed in inkscape:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
joelholdsworth (joel-airwebreathe) wrote :

prkos is right, all things which require a spawn are affected

For some reason in script.cpp, Glib::spawn_async_with_pipes crashes internally, throwing the spawn error, which is never caught by the catch statement:

 1031 try {
 1032 Glib::spawn_async_with_pipes(Glib::get_current_dir(), // working directory
 1033 argv, // arg v
 1034 Glib::SPAWN_SEARCH_PATH /*| Glib::SPAWN_DO_NOT_REAP_CHILD*/,
 1035 sigc::slot<void>(),
 1036 &_pid, // Pid
 1037 NULL, // STDIN
 1038 &stdout_pipe, // STDOUT
 1039 &stderr_pipe); // STDERR
 1040 } catch (Glib::SpawnError e) {
 1041 printf("Can't Spawn!!! spawn returns: %d\n", e.code());
 1042 return 0;
 1043 }

This could be an upstream problem with Glib.

Changed in inkscape:
assignee: nobody → joel-airwebreathe
Revision history for this message
Rygle (rygle) wrote :

Is this related to https://bugs.launchpad.net/inkscape/+bug/187290 ??

This is happening for me on the latest 0.46 SVN built clean apart from the last two patches from that bug, but also on another build without them, so it's not that patch that's causing it. I get the following message with inkcl;

>return code: 3
>terminate called after throwing an instance of 'Glib::SpawnError'

Has anyone noticed when this started? Is it after some recent patch? I might start looking at recent builds.

Revision history for this message
theAdib (theadib) wrote :

Yes that is related and it started AFTER we switched from libs version 20080303 to 20080313.
Pls see my comment here https://bugs.launchpad.net/inkscape/+bug/187290/comments/22
You can doubblecheck if you use these old libs from 20080303.

HTH, Adib.

Revision history for this message
Rygle (rygle) wrote :

Not happening on 0.46pre3, so confirming Adib's comment.

I am using the new Win32 libs. Not hard to try the old ones. Many are just copied over complete in the build process, so it shouldn't be hard to swap them out.

Does anyone know exactly which dll's are involved? Is it just libglib-2.0-0.dll ?

Revision history for this message
Rygle (rygle) wrote :

Nope. Can't just swap libglib-2.0.0.dll with the pre3 version. Complains "the procedure entry point g_assertion_message_expr could not be located in the dynamic link library libglib-2.0.0.dll."

Will build another version with the old libs.

Revision history for this message
theAdib (theadib) wrote :

Rygle, no it is not about just swapping dlls. There is a manifest file (readme.txt) in devlibs-xxx.zip that tell which package is included.
The gnome libs are from ftp.gnome.org /mirror/gnome.org/binaries/win32/. There are the dlls as well as the needed dev files (include and link).
Using the latest pango-library (because of the opentype bug) there is a need to switch from glib-2.14.6 to glib-2.16.
I attach the content of the binary packages. HTH, Adib.

Revision history for this message
theAdib (theadib) wrote :
Revision history for this message
Rygle (rygle) wrote :

Yes, dependencies are a wonderful thing. Good that this is narrowed down at least.

Revision history for this message
joelholdsworth (joel-airwebreathe) wrote :

I don't know what anyone else thinks, but it seems to me that all of the effects, and several help items not working is worse than a few broken opentype fonts, so if we are forced to choose in the next 3 days, personally I'd say it's better to settle for the 3rd of March DLL bundle.

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

I agree (I think). The performance of 0.46pre3 is superior to anything I have seen since then, despite the fact that there is a problem with printing.
   This is just a guess, but I suspect that the (recent) use of pythonw instead of python may have introduced some difficulties.

Revision history for this message
Rygle (rygle) wrote :

Tested the latest SVN with the March 3 dll's, this patch and the latest printing patch together and effects and help stuff works fine for me.

I agree with the last two comments. March 3 is good.

Revision history for this message
Rygle (rygle) wrote :

If anyone is able to patch, build and test, Adib has posted a patch in bug 187290 - https://bugs.launchpad.net/inkscape/+bug/187290/comments/34 - I will test that later today.

I have updated the wiki with my latest methods of building and testing on Windows - http://wiki.inkscape.org/wiki/index.php/Win32Port

If using gdb on Windows, I find that it will complain about xsldebugstatus just after you run, and you can type 'continue (enter)' and it will then run OK. You also can't just open a file normally, because of something with gdb, but you have to use import. Everything else works pretty normally.

Changed in inkscape:
assignee: joel-airwebreathe → nobody
Revision history for this message
Bryce Harrington (bryce) wrote :

Has Adib's patch been tested? Please let me know ASAP if it should be included in the release.

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

This bug did not exist in 0.46pre3

I believe that this bug is distinct from Bug 187290

Revision history for this message
Rygle (rygle) wrote :
Download full text (3.4 KiB)

The comments above indicate that some think this should be fixed in packaging. Not sure it's so easy, but hopefully.

Our other hope is to patch Inkscape itself. Adib's patch was posted in bug 187290 because this bug cropped up when people tried to test the patch for that bug. I have attached that to clear up some of the confusion.

Sadly, I had errors building it. Error below.

==========
Make error line 195: problem compiling: src/extension/implementation/script.cpp:
 In function 'gboolean Inkscape::Extension::Implementation::read_helper_report(i
nt, gint*, GError**)':
src/extension/implementation/script.cpp:982: warning: comparison between signed
and unsigned integer expressions
src/extension/implementation/script.cpp:1018: warning: comparison between signed
 and unsigned integer expressions
src/extension/implementation/script.cpp: In function 'gboolean Inkscape::Extensi
on::Implementation::do_spawn_directly(gint*, gboolean, GSpawnFlags, gchar**, cha
r**, char**, void (*)(void*), void*, void**, GError**)':
src/extension/implementation/script.cpp:1248: error: '_wspawnvpe' was not declar
ed in this scope
src/extension/implementation/script.cpp:1250: error: '_wspawnvp' was not declare
d in this scope
src/extension/implementation/script.cpp:1253: error: '_wspawnve' was not declare
d in this scope
src/extension/implementation/script.cpp:1255: error: '_wspawnv' was not declared
 in this scope
src/extension/implementation/script.cpp: In function 'gboolean Inkscape::Extensi
on::Implementation::do_spawn_with_pipes(gint*, gboolean, const gchar*, gchar**,
char**, GSpawnFlags, void (*)(void*), void*, void**, gint*, gint*, gint*, gint*,
 GError**)':
src/extension/implementation/script.cpp:1384: warning: deprecated conversion fro
m string constant to 'gchar*'
src/extension/implementation/script.cpp:1386: warning: deprecated conversion fro
m string constant to 'gchar*'
src/extension/implementation/script.cpp:1436: warning: deprecated conversion fro
m string constant to 'char*'
src/extension/implementation/script.cpp:1441: warning: deprecated conversion fro
m string constant to 'char*'
src/extension/implementation/script.cpp:1451: warning: deprecated conversion fro
m string constant to 'char*'
src/extension/implementation/script.cpp:1455: warning: deprecated conversion fro
m string constant to 'char*'
src/extension/implementation/script.cpp:1465: warning: deprecated conversion fro
m string constant to 'char*'
src/extension/implementation/script.cpp:1469: warning: deprecated conversion fro
m string constant to 'char*'
src/extension/implementation/script.cpp:1478: warning: deprecated conversion fro
m string constant to 'char*'
src/extension/implementation/script.cpp:1480: warning: deprecated conversion fro
m string constant to 'char*'
src/extension/implementation/script.cpp:1483: warning: deprecated conversion fro
m string constant to 'char*'
src/extension/implementation/script.cpp:1485: warning: deprecated conversion fro
m string constant to 'char*'
src/extension/implementation/script.cpp:1488: warning: deprecated conversion fro
m string constant to 'char*'
src/extension/implementation/script.cpp:1490: warning: deprecated conversion fro
m string constan...

Read more...

Revision history for this message
Rygle (rygle) wrote :

This is resolved with the attached patch. It has been tested by Rygle, Adib and Ulf Erikson - see https://bugs.launchpad.net/inkscape/+bug/187290

Please commit to 0.46 Branch.

Revision history for this message
Rygle (rygle) wrote :

Bryce, can this please be committed for the 0.46 release branch?

Changed in inkscape:
assignee: nobody → bryceharrington
status: Confirmed → Fix Released
Revision history for this message
Rygle (rygle) wrote :

Slightly updated patch to apply more cleanly. Same changes to files, just changed headers of patch sections.

Revision history for this message
Rygle (rygle) wrote :

With Tortoise this complains about a conflict at line 21. You need to keep both options! Very important.

Sorry, but I can't manage to fix this.

Revision history for this message
Rygle (rygle) wrote :

Adib committed a variation of the patch from https://bugs.launchpad.net/inkscape/+bug/204779/comments/19 to trunk.

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

running win32 nightly build Inkscape0803271719.7z

I experience exactly the same crash as before, on March 21, regardless of which path I use, either C:\Program Files\Inkscape\python or C:\Python25

Revision history for this message
Rygle (rygle) wrote :

I think Adib's variation of the above patch (https://bugs.launchpad.net/inkscape/+bug/204779/comments/19) may have problems.
I think his stuff might have assumed a newer version of MinGW than most of us are using - ie: the one from Ishmal's site - http://inkscape.modevia.com/win32libs/?C=M;O=D - His Mingw probably has all the wspawn* prototypes built in, but Ishmal's doesn't.

To put that in simpler terms, it seems the new glib is expecting things not in the old Mingw compiler. At some stage Ishmal may have to update his compiler build to match the new glib.

Will reapply the original patch to this and that should fix up the bug again I think.

Revision history for this message
Rygle (rygle) wrote :

Sorry, this will have to wait until tomorrow.

Revision history for this message
theAdib (theadib) wrote :

I confirm that it does not work in daily snapshot INkscape20080327 but I confirm that Inkscape-pre4 works on my PC.

My Configuration German WinXP professional working as limited user. HTH, Adib.

Commit 18051 put this finally to work (with the _wspawn prototypes included) http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/io/sys.cpp?view=log
This was March 28 so that the inkscape 20080327 HAS NOT THIS PATCH.
 Pls retry using inkscape-pre4 or daily after March 28 (I am not shure about all this timezone stuff).

HTH, Adib

Revision history for this message
Rygle (rygle) wrote :

Inkscape 0.46pre4 doesn't use your patch Adib. I went with a version of source I had that was patched with the version from this report, not your modified one.

Just about to try and do a patch from what's in trunk across to branch.

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

Bug #200091 with its duplicates seems to be a duplicate of this one as well.

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

BTW. I seem to recall seeing it before but can't recall where but I'll ask again would handling web links on Win32 using Win API rather than python not solve the problem?

Revision history for this message
Rygle (rygle) wrote :

The branch patches (packaging/win32/patches) are now up to date with Adib's patch in trunk. Don't forget to copy across the 3 dlls in that directory after building to avoid bad prints and a crash on printing a radial gradient.

Changed in inkscape:
assignee: bryceharrington → pittos
status: Fix Released → Fix Committed
Revision history for this message
Alvin Penner (apenner) wrote :

running win32 nightly build Inkscape0804041638.7z

I believe this bug has just been fixed, the Spawn error has disappeared, thanks

jazzynico (jazzynico)
tags: added: extensions-plugins
removed: extensions
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.