Crash on OgreCEGUIRenderer construction

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Taldor
Just popping in
Just popping in
Posts: 8
Joined: Sun Aug 19, 2007 18:33

Crash on OgreCEGUIRenderer construction

Postby Taldor » Mon Aug 20, 2007 19:18

I'm trying to use CEGUI with Ogre, but so far, it didn't work for me. As the program crashes on the construction of OgreCEGUIRenderer:

Code: Select all

renderer = new CEGUI :: OgreCEGUIRenderer (& window);

The full source code can be found here.

I have the impression (but I'm not fully sure) that the this crash occurs on some systems and not on others.

However the program doesn't crash when I use valgrind, a debugging tool.
Here are the errors logged by valgrind, concerning CEGUI:
==6844== Invalid write of size 4
==6844== at 0x468CF30: CEGUI::OgreCEGUIRenderer::OgreCEGUIRenderer(Ogre::RenderWindow*, unsigned char, bool, unsigned) (stl_list.h:308)
==6844== by 0x80EF499: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:29)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== by 0x811040C: main (main.cpp:37)
==6844== Address 0x61007A8 is 8 bytes after a block of size 496 alloc'd
==6844== at 0x4021D7B: operator new(unsigned) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6844== by 0x80EF470: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:29)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== by 0x811040C: main (main.cpp:37)
==6844==
==6844== Invalid write of size 4
==6844== at 0x468CF3A: CEGUI::OgreCEGUIRenderer::OgreCEGUIRenderer(Ogre::RenderWindow*, unsigned char, bool, unsigned) (stl_list.h:347)
==6844== by 0x80EF499: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:29)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== by 0x811040C: main (main.cpp:37)
==6844== Address 0x61007A4 is 4 bytes after a block of size 496 alloc'd
==6844== at 0x4021D7B: operator new(unsigned) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6844== by 0x80EF470: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:29)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== by 0x811040C: main (main.cpp:37)
==6844==
==6844== Invalid write of size 4
==6844== at 0x468CF40: CEGUI::OgreCEGUIRenderer::OgreCEGUIRenderer(Ogre::RenderWindow*, unsigned char, bool, unsigned) (stl_list.h:348)
==6844== by 0x80EF499: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:29)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== by 0x811040C: main (main.cpp:37)
==6844== Address 0x61007A8 is 8 bytes after a block of size 496 alloc'd
==6844== at 0x4021D7B: operator new(unsigned) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6844== by 0x80EF470: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:29)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== by 0x811040C: main (main.cpp:37)
==6844==
==6844== Invalid write of size 4
==6844== at 0x468B893: CEGUI::OgreCEGUIRenderer::constructor_impl(Ogre::RenderWindow*, unsigned char, bool, unsigned) (OgreCEGUIRenderer.cpp:699)
==6844== by 0x468CF68: CEGUI::OgreCEGUIRenderer::OgreCEGUIRenderer(Ogre::RenderWindow*, unsigned char, bool, unsigned) (OgreCEGUIRenderer.cpp:98)
==6844== by 0x80EF499: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:29)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== by 0x811040C: main (main.cpp:37)
==6844== Address 0x61007A0 is 0 bytes after a block of size 496 alloc'd
==6844== at 0x4021D7B: operator new(unsigned) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6844== by 0x80EF470: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:29)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== by 0x811040C: main (main.cpp:37)
--6844-- Reading syms from /usr/lib/libCEGUILibxmlParser.so.0.0.0 (0x7D76000)
--6844-- Reading syms from /usr/lib/libxml2.so.2.6.28 (0x7D7B000)
--6844-- object doesn't have a symbol table
==6844==
==6844== Invalid read of size 4
==6844== at 0x48B6A27: std::_List_node_base::hook(std::_List_node_base*) (in /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6.0.8)
==6844== by 0x468B38B: CEGUI::OgreCEGUIRenderer::createTexture() (stl_list.h:1140)
==6844== by 0x468ACF1: CEGUI::OgreCEGUIRenderer::createTexture(CEGUI::String const&, CEGUI::String const&) (OgreCEGUIRenderer.cpp:381)
==6844== by 0x45130D4: CEGUI::Imageset_xmlHandler::elementImagesetStart(CEGUI::XMLAttributes const&) (CEGUIImageset_xmlHandler.cpp:120)
==6844== by 0x45134A6: CEGUI::Imageset_xmlHandler::elementStart(CEGUI::String const&, CEGUI::XMLAttributes const&) (CEGUIImageset_xmlHandler.cpp:74)
==6844== by 0x7D781E3: CEGUI::processXMLElement(CEGUI::XMLHandler&, _xmlNode*) (CEGUILibxmlParser.cpp:59)
==6844== by 0x7D78D38: CEGUI::LibxmlParser::parseXMLFile(CEGUI::XMLHandler&, CEGUI::String const&, CEGUI::String const&, CEGUI::String const&) (CEGUILibxmlParser.cpp:118)
==6844== by 0x450C70F: CEGUI::Imageset::load(CEGUI::String const&, CEGUI::String const&) (CEGUIImageset.cpp:157)
==6844== by 0x450C9D1: CEGUI::Imageset::Imageset(CEGUI::String const&, CEGUI::String const&) (CEGUIImageset.cpp:83)
==6844== by 0x45101E7: CEGUI::ImagesetManager::createImageset(CEGUI::String const&, CEGUI::String const&) (CEGUIImagesetManager.cpp:94)
==6844== by 0x80EFBBD: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:41)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== Address 0x61007A8 is 8 bytes after a block of size 496 alloc'd
==6844== at 0x4021D7B: operator new(unsigned) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6844== by 0x80EF470: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:29)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== by 0x811040C: main (main.cpp:37)
==6844==
==6844== Invalid read of size 4
==6844== at 0x48B6A2D: std::_List_node_base::hook(std::_List_node_base*) (in /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6.0.8)
==6844== by 0x468B38B: CEGUI::OgreCEGUIRenderer::createTexture() (stl_list.h:1140)
==6844== by 0x468ACF1: CEGUI::OgreCEGUIRenderer::createTexture(CEGUI::String const&, CEGUI::String const&) (OgreCEGUIRenderer.cpp:381)
==6844== by 0x45130D4: CEGUI::Imageset_xmlHandler::elementImagesetStart(CEGUI::XMLAttributes const&) (CEGUIImageset_xmlHandler.cpp:120)
==6844== by 0x45134A6: CEGUI::Imageset_xmlHandler::elementStart(CEGUI::String const&, CEGUI::XMLAttributes const&) (CEGUIImageset_xmlHandler.cpp:74)
==6844== by 0x7D781E3: CEGUI::processXMLElement(CEGUI::XMLHandler&, _xmlNode*) (CEGUILibxmlParser.cpp:59)
==6844== by 0x7D78D38: CEGUI::LibxmlParser::parseXMLFile(CEGUI::XMLHandler&, CEGUI::String const&, CEGUI::String const&, CEGUI::String const&) (CEGUILibxmlParser.cpp:118)
==6844== by 0x450C70F: CEGUI::Imageset::load(CEGUI::String const&, CEGUI::String const&) (CEGUIImageset.cpp:157)
==6844== by 0x450C9D1: CEGUI::Imageset::Imageset(CEGUI::String const&, CEGUI::String const&) (CEGUIImageset.cpp:83)
==6844== by 0x45101E7: CEGUI::ImagesetManager::createImageset(CEGUI::String const&, CEGUI::String const&) (CEGUIImagesetManager.cpp:94)
==6844== by 0x80EFBBD: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:41)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== Address 0x61007A8 is 8 bytes after a block of size 496 alloc'd
==6844== at 0x4021D7B: operator new(unsigned) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6844== by 0x80EF470: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:29)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== by 0x811040C: main (main.cpp:37)
==6844==
==6844== Invalid write of size 4
==6844== at 0x48B6A30: std::_List_node_base::hook(std::_List_node_base*) (in /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6.0.8)
==6844== by 0x468B38B: CEGUI::OgreCEGUIRenderer::createTexture() (stl_list.h:1140)
==6844== by 0x468ACF1: CEGUI::OgreCEGUIRenderer::createTexture(CEGUI::String const&, CEGUI::String const&) (OgreCEGUIRenderer.cpp:381)
==6844== by 0x45130D4: CEGUI::Imageset_xmlHandler::elementImagesetStart(CEGUI::XMLAttributes const&) (CEGUIImageset_xmlHandler.cpp:120)
==6844== by 0x45134A6: CEGUI::Imageset_xmlHandler::elementStart(CEGUI::String const&, CEGUI::XMLAttributes const&) (CEGUIImageset_xmlHandler.cpp:74)
==6844== by 0x7D781E3: CEGUI::processXMLElement(CEGUI::XMLHandler&, _xmlNode*) (CEGUILibxmlParser.cpp:59)
==6844== by 0x7D78D38: CEGUI::LibxmlParser::parseXMLFile(CEGUI::XMLHandler&, CEGUI::String const&, CEGUI::String const&, CEGUI::String const&) (CEGUILibxmlParser.cpp:118)
==6844== by 0x450C70F: CEGUI::Imageset::load(CEGUI::String const&, CEGUI::String const&) (CEGUIImageset.cpp:157)
==6844== by 0x450C9D1: CEGUI::Imageset::Imageset(CEGUI::String const&, CEGUI::String const&) (CEGUIImageset.cpp:83)
==6844== by 0x45101E7: CEGUI::ImagesetManager::createImageset(CEGUI::String const&, CEGUI::String const&) (CEGUIImagesetManager.cpp:94)
==6844== by 0x80EFBBD: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:41)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== Address 0x61007A4 is 4 bytes after a block of size 496 alloc'd
==6844== at 0x4021D7B: operator new(unsigned) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6844== by 0x80EF470: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:29)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== by 0x811040C: main (main.cpp:37)
==6844==
==6844== Invalid write of size 4
==6844== at 0x48B6A32: std::_List_node_base::hook(std::_List_node_base*) (in /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6.0.8)
==6844== by 0x468B38B: CEGUI::OgreCEGUIRenderer::createTexture() (stl_list.h:1140)
==6844== by 0x468ACF1: CEGUI::OgreCEGUIRenderer::createTexture(CEGUI::String const&, CEGUI::String const&) (OgreCEGUIRenderer.cpp:381)
==6844== by 0x45130D4: CEGUI::Imageset_xmlHandler::elementImagesetStart(CEGUI::XMLAttributes const&) (CEGUIImageset_xmlHandler.cpp:120)
==6844== by 0x45134A6: CEGUI::Imageset_xmlHandler::elementStart(CEGUI::String const&, CEGUI::XMLAttributes const&) (CEGUIImageset_xmlHandler.cpp:74)
==6844== by 0x7D781E3: CEGUI::processXMLElement(CEGUI::XMLHandler&, _xmlNode*) (CEGUILibxmlParser.cpp:59)
==6844== by 0x7D78D38: CEGUI::LibxmlParser::parseXMLFile(CEGUI::XMLHandler&, CEGUI::String const&, CEGUI::String const&, CEGUI::String const&) (CEGUILibxmlParser.cpp:118)
==6844== by 0x450C70F: CEGUI::Imageset::load(CEGUI::String const&, CEGUI::String const&) (CEGUIImageset.cpp:157)
==6844== by 0x450C9D1: CEGUI::Imageset::Imageset(CEGUI::String const&, CEGUI::String const&) (CEGUIImageset.cpp:83)
==6844== by 0x45101E7: CEGUI::ImagesetManager::createImageset(CEGUI::String const&, CEGUI::String const&) (CEGUIImagesetManager.cpp:94)
==6844== by 0x80EFBBD: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:41)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== Address 0x61007A8 is 8 bytes after a block of size 496 alloc'd
==6844== at 0x4021D7B: operator new(unsigned) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6844== by 0x80EF470: Radakan::Engines::GUI_Engine::GUI_Engine(Ogre::RenderWindow&, Ogre::SceneManager&) (gui_engine.cpp:29)
==6844== by 0x8157F54: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:119)
==6844== by 0x811040C: main (main.cpp:37)
==6844==
==6844== Invalid read of size 1
==6844== at 0x50E8348: iReadLump (il_files.c:442)
==6844== Address 0x6EA4D31 is 0 bytes after a block of size 3,393 alloc'd
==6844== at 0x4021A0F: operator new[](unsigned) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6844== by 0x41459B6: Ogre::MemoryDataStream::MemoryDataStream(Ogre::SharedPtr<Ogre::DataStream>&, bool) (OgreDataStream.cpp:226)
==6844== by 0x4385DC5: Ogre::ILImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const (OgreILImageCodec.cpp:122)
==6844== by 0x419CED1: Ogre::Image::load(Ogre::SharedPtr<Ogre::DataStream>&, std::string const&) (OgreImage.cpp:409)
==6844== by 0x53B2F2A: Ogre::GLTexture::loadImpl() (OgreGLTexture.cpp:272)
==6844== by 0x42A83DC: Ogre::Resource::load(bool) (OgreResource.cpp:116)
==6844== by 0x4345A16: Ogre::TextureManager::load(std::string const&, std::string const&, Ogre::TextureType, int, float, bool, Ogre::PixelFormat) (OgreTextureManager.cpp:78)
==6844== by 0x468EEEE: CEGUI::OgreCEGUITexture::loadFromFile(CEGUI::String const&, CEGUI::String const&) (OgreCEGUITexture.cpp:102)
==6844== by 0x468AD09: CEGUI::OgreCEGUIRenderer::createTexture(CEGUI::String const&, CEGUI::String const&) (OgreCEGUIRenderer.cpp:382)
==6844== by 0x45130D4: CEGUI::Imageset_xmlHandler::elementImagesetStart(CEGUI::XMLAttributes const&) (CEGUIImageset_xmlHandler.cpp:120)
==6844== by 0x45134A6: CEGUI::Imageset_xmlHandler::elementStart(CEGUI::String const&, CEGUI::XMLAttributes const&) (CEGUIImageset_xmlHandler.cpp:74)
==6844== by 0x7D781E3: CEGUI::processXMLElement(CEGUI::XMLHandler&, _xmlNode*) (CEGUILibxmlParser.cpp:59)
==6844==
==6844== Invalid read of size 1
==6844== at 0x50E8375: iReadLump (il_files.c:442)
==6844== Address 0x6EA4D32 is 1 bytes after a block of size 3,393 alloc'd
==6844== at 0x4021A0F: operator new[](unsigned) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==6844== by 0x41459B6: Ogre::MemoryDataStream::MemoryDataStream(Ogre::SharedPtr<Ogre::DataStream>&, bool) (OgreDataStream.cpp:226)
==6844== by 0x4385DC5: Ogre::ILImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const (OgreILImageCodec.cpp:122)
==6844== by 0x419CED1: Ogre::Image::load(Ogre::SharedPtr<Ogre::DataStream>&, std::string const&) (OgreImage.cpp:409)
==6844== by 0x53B2F2A: Ogre::GLTexture::loadImpl() (OgreGLTexture.cpp:272)
==6844== by 0x42A83DC: Ogre::Resource::load(bool) (OgreResource.cpp:116)
==6844== by 0x4345A16: Ogre::TextureManager::load(std::string const&, std::string const&, Ogre::TextureType, int, float, bool, Ogre::PixelFormat) (OgreTextureManager.cpp:78)
==6844== by 0x468EEEE: CEGUI::OgreCEGUITexture::loadFromFile(CEGUI::String const&, CEGUI::String const&) (OgreCEGUITexture.cpp:102)
==6844== by 0x468AD09: CEGUI::OgreCEGUIRenderer::createTexture(CEGUI::String const&, CEGUI::String const&) (OgreCEGUIRenderer.cpp:382)
==6844== by 0x45130D4: CEGUI::Imageset_xmlHandler::elementImagesetStart(CEGUI::XMLAttributes const&) (CEGUIImageset_xmlHandler.cpp:120)
==6844== by 0x45134A6: CEGUI::Imageset_xmlHandler::elementStart(CEGUI::String const&, CEGUI::XMLAttributes const&) (CEGUIImageset_xmlHandler.cpp:74)
==6844== by 0x7D781E3: CEGUI::processXMLElement(CEGUI::XMLHandler&, _xmlNode*) (CEGUILibxmlParser.cpp:59)
--6844-- Reading syms from /usr/lib/libCEGUIFalagardWRBase.so.1.0.0 (0x7F8C000)
==6844==
==6844== Use of uninitialised value of size 4
==6844== at 0x48D4008: (within /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6.0.8)
==6844== by 0x48E3B3B: std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<unsigned long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, unsigned long) const (in /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6.0.8)
==6844== by 0x48E3E49: std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, unsigned long) const (in /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6.0.8)
==6844== by 0x48EC376: std::ostream::operator<<(unsigned) (in /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6.0.8)
==6844== by 0x815A25E: Radakan::Engines::Log::log(Radakan::Object const&) (log.cpp:65)
==6844== by 0x815A487: Radakan::Engines::Log::trace(Radakan::Object const&, std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string) (log.cpp:119)
==6844== by 0x8095460: Radakan::Singleton<Radakan::World>::Singleton() (singleton.cpp:22)
==6844== by 0x813B6A3: Radakan::World::World(Ogre::SceneManager&) (world.cpp:54)
==6844== by 0x8157F6E: Radakan::Engines::Game::Game(std::string, std::string) (game.cpp:121)
==6844== by 0x811040C: main (main.cpp:37)

What could be the cause of the problem? And how do I solve it?
Last edited by Taldor on Tue Nov 20, 2007 17:21, edited 1 time in total.

daves
Home away from home
Home away from home
Posts: 253
Joined: Thu Feb 02, 2006 20:12

Postby daves » Tue Aug 21, 2007 12:30

I have no problem using cegui with ogre. The first question that comes to mind is relative to the render window and the scene manager. Are you sure that these have been correctly created?

I'm assuming that the answer to the first question is yes. This leads me to my second question. This is more of a C question. I notice that you pass window and scene_manager into GUI_Engine as references. Then you attempt to pass the window pointer and scene_manager pointer into OgreCEGUIRenderer as pointers (you take the address of the reference). Will this actually work? Try to pass window and scene_manager into your GUI_Engine as pointers to begin with. See if this helps.

Taldor
Just popping in
Just popping in
Posts: 8
Joined: Sun Aug 19, 2007 18:33

Postby Taldor » Tue Aug 21, 2007 22:27

daves wrote:I have no problem using cegui with ogre. The first question that comes to mind is relative to the render window and the scene manager. Are you sure that these have been correctly created?

I guess so. Here's the code.
daves wrote:I'm assuming that the answer to the first question is yes. This leads me to my second question. This is more of a C question. I notice that you pass window and scene_manager into GUI_Engine as references. Then you attempt to pass the window pointer and scene_manager pointer into OgreCEGUIRenderer as pointers (you take the address of the reference). Will this actually work? Try to pass window and scene_manager into your GUI_Engine as pointers to begin with. See if this helps.

I've tried this before, and had the same results. Tbh I don't really see a reason why this wouldn't work.

jchmack
Just popping in
Just popping in
Posts: 12
Joined: Tue Mar 27, 2007 15:13

Postby jchmack » Sun Sep 02, 2007 23:22

i am having a similar problem..........

http://www.ogre3d.org/phpBB2/viewtopic.php?t=35511

i remade my engine. Before the same code was working. The only difference is that on my old engine i always ran it in release mode. This time around i have a dual build. But it crashes using both....... sigh... I think it might be a problem in the ogre memory manager.

might i ask for more information on you crash?

what processor are you using(when i debug i use a p4 but ogre is looking at its amd_64 code...)

jchmack
Just popping in
Just popping in
Posts: 12
Joined: Tue Mar 27, 2007 15:13

Postby jchmack » Mon Sep 03, 2007 07:51

well i got mine to work... It had to do with the fact that i only had CEGUI base.dll it seems that i needed all of the ones in the ogre/samples/bin folder. Hope this helps the original poster =). Sigh i was under the impression that if I was missing a DLL i would be informed. I don't know if this is an Ogre issue or a CEGUI one. But I'm glad to have it working.

Taldor
Just popping in
Just popping in
Posts: 8
Joined: Sun Aug 19, 2007 18:33

Postby Taldor » Tue Sep 04, 2007 13:24

jchmack wrote:well i got mine to work... It had to do with the fact that i only had CEGUI base.dll it seems that i needed all of the ones in the ogre/samples/bin folder. Hope this helps the original poster =). Sigh i was under the impression that if I was missing a DLL i would be informed. I don't know if this is an Ogre issue or a CEGUI one. But I'm glad to have it working.

Well I'm not using windows, but linux, so I'm using lib*.so files instead of DLLs, but I don't believe it matters much.
The Ogre & CEGUI libraries I'm linking to are:
- libOgreMain-1.4.3.so (equivalent to OgreMain.dll/OgreMain_d.dll)
- libCEGUIBase.so.1 (equivalent to CEGUIBase.dll/CEGUIBase_d.dll)
- libCEGUIOgreRenderer-1.4.3.so (equivalent to OgreGUIRenderer.dll/OgreGUIRenderer_d.dll)
What other Ogre or CEGUI library do I need?

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Thu Sep 06, 2007 14:56

Have you tried with more parameters, such as:

Code: Select all

mRenderer = new CEGUI::OgreCEGUIRenderer(mWindow,
                                         Ogre::RENDER_QUEUE_OVERLAY,
                                         false,
                                         3000,
                                         mSceneMgr);


Catch the Ogre and Cegui exceptions, what do those show?

Taldor
Just popping in
Just popping in
Posts: 8
Joined: Sun Aug 19, 2007 18:33

Postby Taldor » Thu Nov 01, 2007 01:15

Rackle wrote:Have you tried with more parameters...

Catch the Ogre and Cegui exceptions, what do those show?

Yes, I've tried more parameters. And no exceptions are thrown.

Others have reported that the code doesn't give any crash for them. So I tried to reinstall both Ogre and CEGUI several times, but to no avail.

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Thu Nov 08, 2007 20:41

So, you did not compile CEGUI yourself, but you took the libs and dll's from somewhere ? are you sure the libs are the ones that match exactly the dll's you use ?

Taldor
Just popping in
Just popping in
Posts: 8
Joined: Sun Aug 19, 2007 18:33

Postby Taldor » Fri Nov 09, 2007 21:46

Pompei2 wrote:So, you did not compile CEGUI yourself, but you took the libs and dll's from somewhere ?

I installed CEGUI through Gentoo's portage.

Pompei2 wrote:are you sure the libs are the ones that match exactly the dll's you use ?

What libraries should match exactely?

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Sat Nov 10, 2007 00:57

ah no ok i tought you were using windows.

I have been using cegui installed with portage too without problems, but I don't have any experience with ogre so I have no more idea to help you, sorry.

Taldor
Just popping in
Just popping in
Posts: 8
Joined: Sun Aug 19, 2007 18:33

Postby Taldor » Tue Nov 27, 2007 21:10

Bump.


Return to “Help”

Who is online

Users browsing this forum: Bing [Bot] and 7 guests