I've just installed Ogre 1.4.5 on Gentoo Linux, and I'm having strange problems when I'm trying to use it.
First of all, the demo programs all work well.
I'm initialising OGRE using this code:
Code: Select all
Root* root = new Root((sConfigDir + "/ogre_plugins.conf").c_str());
ResourceGroupManager::getSingleton().addResourceLocation("./ogre/OgreCore.zip", "Zip", "Bootstrap");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media", "FileSystem");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/fonts", "FileSystem");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/materials/programs", "FileSystem");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/materials/scripts", "FileSystem");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/materials/textures", "FileSystem");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/models", "FileSystem");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/overlays", "FileSystem");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/particle", "FileSystem");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/gui", "FileSystem");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/DeferredShadingMedia", "FileSystem");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/packs/cubemap.zip", "Zip");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/packs/cubemapsJS.zip", "Zip");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/packs/dragon.zip", "Zip");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/packs/fresneldemo.zip", "Zip");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/packs/ogretestmap.zip", "Zip");
ResourceGroupManager::getSingleton().addResourceLocation("/home/droot/deeptown/libs/ogrenew/Samples/Media/packs/skybox.zip", "Zip");
if(!root->restoreConfig() && !root->showConfigDialog()) {
// TODO: log message
delete root;
return;
}
m_pRenderWindow = root->initialise(true);
I've checked all paths, of course.
When I'm trying to run this code, the render window appears, then immediately disappears and I've got the following in the stdout:
Code: Select all
******************************
*** Starting GLX Subsystem ***
******************************
GLRenderSystem::createRenderWindow "OGRE Render Window", 800x600 windowed miscParams: FSAA=0 title=OGRE Render Window
GLXWindow::create
Parsing miscParams
GLXWindow::create -- Best visual is 35
XIO: fatal IO error 14 (Bad address) on X server ":0.0"
after 30 requests (30 known processed) with 5 events remaining.
Segmentation fault
plugins.cfg and ogre.cfg files are equal to those used with sample programs.
Here is the valgrind output:
Code: Select all
==13702== Process terminating with default action of signal 11 (SIGSEGV)
==13702== Access not within mapped region at address 0x228
==13702== at 0x11982DB3: _nv000127gl (in /usr/lib64/opengl/nvidia/lib/libGLcore.so.100.14.19)
==13702== by 0x11330EF9: (within /usr/lib64/opengl/nvidia/lib/libGL.so.100.14.19)
==13702== by 0x11314BDE: _fini (in /usr/lib64/opengl/nvidia/lib/libGL.so.100.14.19)
==13702== by 0x400D302: (within /lib64/ld-2.6.1.so)
==13702== by 0x60889E8: exit (in /lib64/libc-2.6.1.so)
==13702== by 0xE4A1EA9: _XDefaultIOError (in /usr/lib64/libX11.so.6.2.0)
==13702== by 0xE4A1F23: _XIOError (in /usr/lib64/libX11.so.6.2.0)
==13702== by 0xE4A2D55: _XRead (in /usr/lib64/libX11.so.6.2.0)
==13702== by 0x11338DDD: (within /usr/lib64/opengl/nvidia/lib/libGL.so.100.14.19)
==13702== by 0x1131258A: (within /usr/lib64/opengl/nvidia/lib/libGL.so.100.14.19)
==13702== by 0x11333285: (within /usr/lib64/opengl/nvidia/lib/libGL.so.100.14.19)
==13702== by 0x1133317C: (within /usr/lib64/opengl/nvidia/lib/libGL.so.100.14.19)
==13702== by 0x11332CF1: (within /usr/lib64/opengl/nvidia/lib/libGL.so.100.14.19)
==13702== by 0x1130AFF9: (within /usr/lib64/opengl/nvidia/lib/libGL.so.100.14.19)
==13702== by 0x11311129: (within /usr/lib64/opengl/nvidia/lib/libGL.so.100.14.19)
==13702== by 0x1130E720: (within /usr/lib64/opengl/nvidia/lib/libGL.so.100.14.19)
==13702== by 0x11308DE7: glXCreateContext (in /usr/lib64/opengl/nvidia/lib/libGL.so.100.14.19)
==13702== by 0x10D71CA9: Ogre::GLXWindow::create(std::string const&, unsigned, unsigned, bool, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const*) (OgreGLXWindow.cpp:373)
==13702== by 0x10D6AC6B: Ogre::GLXGLSupport::newWindow(std::string const&, unsigned, unsigned, bool, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const*) (OgreGLXGLSupport.cpp:146)
==13702== by 0x10D3AB39: Ogre::GLRenderSystem::createRenderWindow(std::string const&, unsigned, unsigned, bool, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const*) (OgreGLRenderSystem.cpp:735)
==13702== by 0x10D6B630: Ogre::GLXGLSupport::createWindow(bool, Ogre::GLRenderSystem*, std::string const&) (OgreGLXGLSupport.cpp:135)
==13702== by 0x10D31AEE: Ogre::GLRenderSystem::initialise(bool, std::string const&) (OgreGLRenderSystem.cpp:195)
==13702== by 0xC45AC9C: Ogre::Root::initialise(bool, std::string const&) (OgreRoot.cpp:498)
==13702== by 0xBF3F03B: WS::CClientWorldManager::DoWork() (CClientWorldManager.cpp:119)
==13702== by 0xBF5FA0D: WS::CWorldManager::Work() (CWorldManager.cpp:33)
==13702== by 0xBF5F58F: WS::CWorldManager::WorkTP(void*) (CWorldManager.cpp:40)
==13702== by 0x56B0182: Deep::CUserDB::ChildTP_Start(void*) (CUserDB.cpp:188)
==13702== by 0x5B4516B: Thread::osa_create_thread(void*) (thread.cpp:46)
==13702== by 0x4E2C046: (within /lib64/libpthread-2.6.1.so)
==13702== by 0x611625C: clone (in /lib64/libc-2.6.1.so)
I use linux 2.6.22 kernel on x86_64 arch (AMD Athlon), NVidia GeForce 8500 GT video card.
What am I doing wrong?