OgreNewt X error on Linux [SOLVED]

awolfe

31-12-2006 07:20:19

Decided to give OgreNewt a whack - got it compiled under linux. Integrating into an Ogre program that runs properly.

As soon as I try to create new OgreNewt BasicFrameListener as follows:

newtListener = new OgreNewt::BasicFrameListener( window, sceneMgr, newtWorld, 120 );

I get the following error (using code tag for clarity):

X Error of failed request: BadAccess (attempt to access private resource denied)
Major opcode of failed request: 2 (X_ChangeWindowAttributes)
Serial number of failed request: 7
Current serial number in output stream: 9


The corresponding strace output is as follows:

write(2, "X Error of failed request: BadA"..., 84X Error of failed request: BadAccess (attempt to access private resource denied)
) = 84
write(2, "Major opcode of failed request: "..., 34Major opcode of failed request: 2) = 34
write(2, " (X_ChangeWindowAttributes)\n", 28 (X_ChangeWindowAttributes)
) = 28
write(2, " ", 2 ) = 2
write(2, "Serial number of failed request:"..., 35Serial number of failed request: 7) = 35
write(2, "\n ", 3
) = 3
write(2, "Current serial number in output "..., 42Current serial number in output stream: 9) = 42




I've isolated it to that particular line of code.
Like I said - the program appears to work properly otherwise.

the window is created as follows:
window = ogre->createRenderWindow("Steaming Morton", 1024, 768, false, &opts);

where opts are:

opts["resolution"] = "1024x768";
opts["fullscreen"] = "false";
opts["vsync"] = "false";


Running debian with a 2.6.15 kernel. Accelerated nVidia GLX.
As I said - the Ogre program works fine until I create that frame listener.
Any suggestions would be appreciated! I'm going to try implementing my own listener next to see if I can figure out the issue.

Thanks.

awolfe

31-12-2006 07:36:43

Why is it that you find your problem within a bit of laying it out for the world?

Anyway, the BasicListener provided by OgreNewt also initialized the Ogre input system behind the scenes. I'm using OIS instead of the Ogre system - so those resources had already been grabbed!

Issue resolved!

walaber

31-12-2006 20:21:00

once Eihort is released, I will update OgreNewt to use OIS for the BasicFrameListener!

pratty70

01-01-2007 23:04:12

Hi,

Can I ambush this post briefly and just ask how you built OgreNewt on Linux and do you have a makefile you used?

Cheers