py2exe loading library crash

negativegeforce

25-04-2010 05:15:50

Today was the first time I have tried py-ogre. I have initially tried the latest pyogre 1.7rc1 and have gotten the Demo_Basic.py to run without problems as long as I don't build the program into an exe.

I seem to have run into an issue when I build an exe using Py2Exe. The program executes fine until one of the plugins are attempted to be loaded. The program simply crashes after 1-2 seconds when it attempts to load the plugin.

I have tried

pyogre 1.7rc1 with python 2.6.4
pyogre 1.6.4 with python 2.6.5

I reproduced this on both a Windows XP and Windows 7 machine.

I have the example with the executable and files used to build the executable here http://impellerhead.com/tmp/py2exe_game.zip

Here is the Ogre.log...

00:37:59: Creating resource group General
00:37:59: Creating resource group Internal
00:37:59: Creating resource group Autodetect
00:37:59: SceneManagerFactory for type 'DefaultSceneManager' registered.
00:37:59: Registering ResourceManager for type Material
00:37:59: Registering ResourceManager for type Mesh
00:37:59: Registering ResourceManager for type Skeleton
00:37:59: MovableObjectFactory for type 'ParticleSystem' registered.
00:37:59: OverlayElementFactory for type Panel registered.
00:37:59: OverlayElementFactory for type BorderPanel registered.
00:37:59: OverlayElementFactory for type TextArea registered.
00:37:59: Registering ResourceManager for type Font
00:37:59: ArchiveFactory for archive type FileSystem registered.
00:37:59: ArchiveFactory for archive type Zip registered.
00:37:59: FreeImage version: 3.10.0
00:37:59: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
00:37:59: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2
00:37:59: DDS codec registering
00:37:59: Registering ResourceManager for type HighLevelGpuProgram
00:37:59: Registering ResourceManager for type Compositor
00:37:59: MovableObjectFactory for type 'Entity' registered.
00:37:59: MovableObjectFactory for type 'Light' registered.
00:37:59: MovableObjectFactory for type 'BillboardSet' registered.
00:37:59: MovableObjectFactory for type 'ManualObject' registered.
00:37:59: MovableObjectFactory for type 'BillboardChain' registered.
00:37:59: MovableObjectFactory for type 'RibbonTrail' registered.
00:37:59: Loading library ./RenderSystem_GL.dll

negativegeforce

26-04-2010 05:38:20

Anyone have a solution for this? Can plugins break when compiling with py2exe a certain way?

I am trying to compile my Ludum Dare 17 competition entry and I am still having issues with this. Multiple people have tried to run the game and the Ogre.log ends with the plugin attempting to load.

Again, the game does run fine when running the python file.

negativegeforce

26-04-2010 06:12:42

I just tried building the py2exe executable a few different ways to see if I can get any luck...

The py2exe python script I have normally used for other games using other libraries seemed to have built an exe that crashed Ogre upon plugin load.

I ended up compiling the exe using the method described here http://wiki.python-ogre.org/index.php/End-User_Distribution by using the batch file without compression. My game seems to run ok now.