Tutorial code hangs on exit

rollingt

11-08-2007 05:16:02

Hi,

I'll skip the part where I say how great PythonOgre is. :)

I am having a problem with the tutorial code:


import ogre.renderer.OGRE as ogre
import SampleFramework as sf


class TutorialApplication(sf.Application):

def _createScene(self):
sceneManager = self.sceneManager
sceneManager.ambientLight = ogre.ColourValue(1, 1, 1)
ent1 = sceneManager.createEntity("Robot", "robot.mesh")
node1 = sceneManager.rootSceneNode.createChildSceneNode("RobotNode")
node1.attachObject(ent1)



if __name__ == '__main__':
ta = TutorialApplication()
ta.go()


This runs fine, I see the robot, can move the camera, etc.

However, when I hit escape the window does not disappear. I can ctrl-alt-del, but if I'm running in full screen mode I can't see the task manager (only the mouse cursor). (If I run in windowed mode I can kill the app using the task manager)

I am using Python 2.5 on winXP, Radeon X1900GT and get the same problem in DirectX and OpenGL.

The demos run and exit without any problems.

Any idea what the problem is?

Thanks.

SiWi

11-08-2007 09:23:14

I had the same problem a few times. I figured out it only happens if I run the game Company of Heroes before. Im working on Vista HomePremium 64bit.
Do you run any games/3d applications before?

andy

11-08-2007 14:29:18

Your test works OK on my machine, however the ATI cards (which I think you have) are known to be 'strange' at times (more so under Linux).

Could you double check you have the latest card drivers installed..

Other than that I'm confused -- especially if the demos work OK.. :?

Cheers
Andy

rollingt

12-08-2007 06:11:48

Thanks,

I updated to the latest drivers (8.391), and tried from fresh boot - no change.

Any other ideas?

andy

13-08-2007 05:25:40

Can you confirm that the standard demos work ok..

And if so are you running your test program from the same directory as the demos -- if not can you try that as perhaps you are running it from another directory with an older set of plugins/sampleframework etc

If you upgrade Python-Ogre you have to ensure that you also update any copies you've made of the plugin dlls....

Cheers
Andy

rollingt

13-08-2007 05:51:54

I have only been using Python for a couple of weeks and Python-Ogre for a few days. So basically I am running a fresh install of both.

The demos that are installed into the Windows start menu run OK from there, but now that I think about it I'm not sure if I have actually tried loading them in IDLE and running them that way - could it have something to do with the way IDLE launches programs?

I do have my sample app in a different directory, so I'll also try running from the same directory as the demos.

Anyway, I wont be able to try these for a couple of days. I must admit I feel like a bit of an idiot for not thinking of these things first.

morbiddog

13-08-2007 07:20:20

ok your problem is that if you run your application from your IDE (example is idle that comes with python) this will happen for some reason it breaks the escape button but if you run the application by double clicking on the actual icon for your source code then it should all work fine