[BUG Fixed] PyCEGUI 0.7.5 for Python 2.7 calls Python26.dll

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Leftium
Just popping in
Just popping in
Posts: 12
Joined: Sat Feb 05, 2011 19:48
Contact:

[BUG Fixed] PyCEGUI 0.7.5 for Python 2.7 calls Python26.dll

Postby Leftium » Sat Feb 05, 2011 20:26

PyCEGUI-0.7.5.win32-py2.7.msi is linked to the incorrect version of Python: Python26.dll.

I got a "Fatal Python error: Interpreter not initialized (version mismatch?)" when trying this sample with Python 2.7.1. I got an "ImportError: DLL load failed: The specified module could not be found." after I uninstalled Python 2.6.5.

Dependency Walker 2.2 says PyCEGUI.pyd requires Python26.dll. This is true for every PyCEGUI.pyd on my system:
  • C:\Python26\Lib\site-packages\PyCEGUI\PyCEGUI.pyd
  • C:\Python27\Lib\site-packages\PyCEGUI\PyCEGUI.pyd
  • ...\CEGUI-SDK-0.7.5-vc10\CEGUI-SDK-0.7.5-vc10\bin\PyCEGUI.pyd

The sample works OK with PyCEGUI-0.7.5.win32-py2.6.msi + Python 2.6.6, with a few small caveats. However, I think these just need fixes to the Python script:
  • "New Note" window does not accept input.
  • Buttons/text are wrong sizes
  • One error: CEGUI::UnknownObjectException in file c:\cegui-0.7.5\cegui\include\CEGUINamedXMLResourceManager.h(279) : NamedXMLResourceManager::get: No object of type 'Imageset' named 'Backdrop-Images' is present in the collection.
    CEGUI::UnknownObjectException in file ..\..\..\cegui\src\CEGUIPropertySet.cpp(124) : There is no Property named 'WindowPosition' available in the set.

Thanks for the great GUI library!
Last edited by Leftium on Mon Jul 25, 2011 00:14, edited 2 times in total.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: [BUG] PyCEGUI 0.7.5 for Python 2.7 is linked to Python26.dll

Postby Kulik » Sat Feb 05, 2011 20:32

Thanks for the report!

I am aware that the Python 2.7 PyCEGUI is broken but I can't figure out why. I am using distutils to build the bindings which should pick up the "correct" Python version. I will look into this later to see if I can fix it by simply building it manually. Perhaps I trusted distutils too much :-)

What python script are you talking about in the second part of your post? PyCEGUI sadly lacks samples as of now :-(

User avatar
Leftium
Just popping in
Just popping in
Posts: 12
Joined: Sat Feb 05, 2011 19:48
Contact:

Re: [BUG] PyCEGUI 0.7.5 for Python 2.7 is linked to Python26.dll

Postby Leftium » Sun Feb 06, 2011 17:41

I was referring to the sample I linked from the wiki earlier in the post.

I did a little more digging: PyCEGUI.pyd for Python 2.7 depends on *both* python26.dll and python27.dll. PyCEGUI.pyd inherits the python26.dll dependency from boost_python-vc90-mt-1_44.dll. If PyCEGUI is using Boost.python as the glue between C++ and Python, the problem might be that Boost.python is calling into the wrong version of the Python library.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: [BUG] PyCEGUI 0.7.5 for Python 2.7 calls Python26.dll

Postby Kulik » Wed Feb 09, 2011 22:59

Just a note here, I am aware of the cause and fix for this but sadly have no time at the moment to fix this :-( Either somebody else could or it will have to wait a few weeks till I finish all exams this semester.

User avatar
Leftium
Just popping in
Just popping in
Posts: 12
Joined: Sat Feb 05, 2011 19:48
Contact:

Re: [BUG] PyCEGUI 0.7.5 for Python 2.7 calls Python26.dll

Postby Leftium » Wed Feb 09, 2011 23:33

Can you provide details about the cause and fix? I might try fixing it myself, although I am having problems building CEGUI with MSVC Express 2010.

I'm content with the work-around, which is just to use PyCEGUI for Python 2.6.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: [BUG] PyCEGUI 0.7.5 for Python 2.7 calls Python26.dll

Postby Kulik » Wed Feb 09, 2011 23:49

Boost python is prebuilt by boostpro.com for Python 2.6, which is what I use because building boost is just a PITA.

To make it work with python 2.7, you have to custom build boost for 2.7 and use that for the module, thus shipping a different boost python for the 2.7 package. For some reason I assumed that boost python handles this via templates and is version agnostic to python but that apparently isn't true :-( It's a few hours work of messing with various build systems.

User avatar
Leftium
Just popping in
Just popping in
Posts: 12
Joined: Sat Feb 05, 2011 19:48
Contact:

Re: [BUG Fixed] PyCEGUI 0.7.5 for Python 2.7 calls Python26.

Postby Leftium » Mon Jul 25, 2011 00:18

Yay! This bug was fixed last month.

I got PyCEGUI working with Python 2.7.2.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: [BUG Fixed] PyCEGUI 0.7.5 for Python 2.7 calls Python26.

Postby Kulik » Mon Jul 25, 2011 08:24

Yeah, sorry for the delay ;-)


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 5 guests