[pygtk] Fwd: pygtk-2.22.0.win32-py2.6 issue

Rafael Villar Burke (Pachi) pachi at rvburke.com
Thu Dec 16 17:57:53 WST 2010


Thanks Dieter. I hope this helps the original poster.

Another issue is, can pygobject on win32 be fixed to be more backwards compatible like in this scenario?

Regards,

Pachi

On 15/12/2010 23:45, Dieter Verfaillie wrote:
> Hi,
>
> On 15/12/2010 19:58, Rafael Villar Burke (Pachi) wrote:
>> Forwarding this message to the main pygtk list, just in case anyone
>> knows about the bug or what may be failing.
> I ran gimp-2.6.exe through dependency walker's profiler.
> This is what happens (as far as I can tell):
>
> 1) execute c:\program files\GIMP-2.0\bin\gimp-2.6.exe
> 2) while gimp-2.6.exe starts it creates a pythonw.exe process
> 3) then a script-fu.exe process
> 4) click the Filters>Python Fu>Console menu item
> 5) gimp starts another pythonw.exe process
>
> It's the pythonw.exe processes from step 2 and 5 we're interested in.
> Relevant part of the profiler output for the pythonw.exe process from
> step 2 (you might want to disable word wrapping now...):
>
> ...
> LoadLibraryExA("D:\bin\Python26\lib\site-packages\gtk-2.0\gtk\_gtk.pyd", 0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) called from "c:\windows\system32\PYTHON26.DLL" at address 0x1E02AFA9 by thread 1.
> Loaded "d:\bin\python26\lib\site-packages\gtk-2.0\gtk\_GTK.PYD" at address 0x66780000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\LIBCAIRO-2.DLL" at address 0x68DC0000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\LIBFONTCONFIG-1.DLL" at address 0x64F80000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\LIBEXPAT-1.DLL" at address 0x68F40000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\FREETYPE6.DLL" at address 0x63CC0000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\LIBPNG14-14.DLL" at address 0x61A00000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\ZLIB1.DLL" at address 0x62E80000 by thread 1.  Successfully hooked module.
> Loaded "c:\windows\system32\MSIMG32.DLL" at address 0x76380000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\LIBGDK-WIN32-2.0-0.DLL" at address 0x6C340000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\LIBGDK_PIXBUF-2.0-0.DLL" at address 0x65340000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\LIBGIO-2.0-0.DLL" at address 0x6D580000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\LIBGMODULE-2.0-0.DLL" at address 0x6DD00000 by thread 1.  Successfully hooked module.
> Loaded "c:\windows\system32\DNSAPI.DLL" at address 0x76F20000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\LIBPANGO-1.0-0.DLL" at address 0x65580000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\LIBPANGOCAIRO-1.0-0.DLL" at address 0x6D4C0000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\LIBPANGOFT2-1.0-0.DLL" at address 0x6D700000 by thread 1.  Successfully hooked module.
> Loaded "c:\program files\gimp-2.0\bin\LIBPANGOWIN32-1.0-0.DLL" at address 0x6B280000 by thread 1.  Successfully hooked module.
> Loaded "c:\windows\system32\IMM32.DLL" at address 0x76390000 by thread 1.  Successfully hooked module.
> First chance exception 0xC0000139 (DLL Not Found) occurred in "c:\windows\system32\NTDLL.DLL" at address 0x7C9666C6 by thread 1.
> Unloaded "d:\bin\python26\lib\site-packages\gtk-2.0\gtk\_GTK.PYD" at address 0x66780000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\LIBGDK-WIN32-2.0-0.DLL" at address 0x6C340000 by thread 1.
> Unloaded "c:\windows\system32\IMM32.DLL" at address 0x76390000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\LIBPANGOCAIRO-1.0-0.DLL" at address 0x6D4C0000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\LIBPANGOWIN32-1.0-0.DLL" at address 0x6B280000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\LIBPANGOFT2-1.0-0.DLL" at address 0x6D700000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\LIBPANGO-1.0-0.DLL" at address 0x65580000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\LIBGDK_PIXBUF-2.0-0.DLL" at address 0x65340000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\LIBGIO-2.0-0.DLL" at address 0x6D580000 by thread 1.
> Unloaded "c:\windows\system32\DNSAPI.DLL" at address 0x76F20000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\LIBGMODULE-2.0-0.DLL" at address 0x6DD00000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\LIBCAIRO-2.DLL" at address 0x68DC0000 by thread 1.
> Unloaded "c:\windows\system32\MSIMG32.DLL" at address 0x76380000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\LIBPNG14-14.DLL" at address 0x61A00000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\ZLIB1.DLL" at address 0x62E80000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\LIBFONTCONFIG-1.DLL" at address 0x64F80000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\FREETYPE6.DLL" at address 0x63CC0000 by thread 1.
> Unloaded "c:\program files\gimp-2.0\bin\LIBEXPAT-1.DLL" at address 0x68F40000 by thread 1.
> LoadLibraryExA("D:\bin\Python26\lib\site-packages\gtk-2.0\gtk\_gtk.pyd", 0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL by thread 1. Error: The specified procedure could not be found (127).
> ...
>
> The library that failed to load was LIBGTK-WIN32-2.0-0.DLL (not noted in
> the textual output but plainly visible in the graphical ui of dependency
> walker). Weird, huh? But thinking about it ... not that weird. You can
> easily reproduce the problem, still assuming pygtk-2.22.0,
> pygobject-2.26.0 and pycairo-1.8.10, like this (I used an msys bash
> console):
>
> $ export PATH=/d/gtk+-bundle_2.16.6-20100207_win32/bin/:$PATH
> $ python -c "import gtk"
> Traceback (most recent call last):
>    File "<string>", line 1, in<module>
>    File "d:\bin\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py", line 30, in<module>
>      import gobject as _gobject
>    File "d:\bin\Python26\lib\site-packages\gtk-2.0\gobject\__init__.py", line 26, in<module>
>      from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
>    File "d:\bin\Python26\lib\site-packages\gtk-2.0\glib\__init__.py", line 22, in<module>
>      from glib._glib import *
> ImportError: DLL load failed: The specified procedure could not be found.
>
> Conclusion:
> pygtk-2.22.0/pygobject-2.26.0 is simply not compatible with gtk+-2.16.6
> on mswindows.
>
> Possible solutions:
> - put gtk+-bundle-2.22.0 somewhere on PATH so the Python process can
>    load libraries from a gtk+-bundle version that works (this does not
>    affect or interferes with gimp itself)
> - or if you don't like putting things on system or user PATH (like me),
>    you could use the all-in-one windows installer I've been working on
>    the last couple of weeks [1]. It ensures the gtk+-bundle-2.22.0 that
>    comes with the aio installer is used for PyGTK, PyGObject, etc.
>    See [2] and [3] to discover how it's done.
>    Heh, this is also why I could not reproduce the bug at first :)
>
> Note that the last part about the aio installer is *not* yet ready for
> general consumption because:
> a) I don't have the time to support what I consider "incomplete
>     installer logic" across a plethora of windows versions
> b) well, there's a reason it's still marked "proof of concept" in
>     the README and I don't want to break people's systems (even if
>     the .msi files currently available there have proven pretty
>     stable) ;)
>
> mvg,
> Dieter
>
> [1] https://github.com/dieterv/pygtk-installer
> [2] https://github.com/dieterv/pygtk-installer/blob/master/wix/overlays/pygobject/pygtk.pth
> [3] https://github.com/dieterv/pygtk-installer/blob/master/wix/overlays/runtime/__init__.py
>


More information about the pygtk mailing list