Ogre 1.9 update : Segmentation fault

Problems building or running the engine, queries about how to use features etc.
Post Reply
Supermanu
Gnoblar
Posts: 2
Joined: Thu Nov 28, 2013 5:51 pm

Ogre 1.9 update : Segmentation fault

Post by Supermanu » Sat Nov 30, 2013 12:39 am

Hi all,

Since the last 1.9 update, I'm unable to launch an application with Ogre (works perfectly with 1.8 ) even the SampleBrowser crash. I've also tried this repo : http://github.com/scrawl/ogre-sdl2-test but with the same result. I'm a linux user (archlinux).

When I tried to run them with gdb, the faulty guy always seems to be Ogre::MaterialManager::MaterialManager() when we initialize a root object.
Is there something I can do or do you need more info ?

It's not big deal since I can easily downgrade, but any help might be nice.

Thanks !
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: Ogre 1.9 update : Segmentation fault

Post by masterfalcon » Sat Nov 30, 2013 5:50 am

We haven't run into this issue ourselves. Would you be able to provide a stack trace and any more information that might help us debug the issue?
0 x

Imajie
Gnoblar
Posts: 2
Joined: Sat Nov 30, 2013 3:07 pm

Re: Ogre 1.9 update : Segmentation fault

Post by Imajie » Sat Nov 30, 2013 3:16 pm

I'm also running archlinux and I hit the same issue. It only seems to actually happen when Ogre is built in Release mode. If I build Ogre in either Debug or RelWithDebInfo, the tutorial framework runs fine, however when built with Release it segfaults with the same error Supermanu had when Ogre::MaterialManager::MaterialManager() is called from Ogre::Root.
0 x

User avatar
lingfors
Hobgoblin
Posts: 505
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden

Re: Ogre 1.9 update : Segmentation fault

Post by lingfors » Sat Nov 30, 2013 4:15 pm

Is this from the tag 1-9-0? Or is it from some other revision of the source, and if so which revision? (Just saying "the last update" is about as vague as it gets, as it's very ambiguous, and also varies depending on at which time it is read...)
0 x

Supermanu
Gnoblar
Posts: 2
Joined: Thu Nov 28, 2013 5:51 pm

Re: Ogre 1.9 update : Segmentation fault

Post by Supermanu » Sat Nov 30, 2013 4:33 pm

It's from the tag 1-9-0.
And as Imajie, it also runs for me with the debug mode.
0 x

scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 2

Re: Ogre 1.9 update : Segmentation fault

Post by scrawl » Sat Nov 30, 2013 6:50 pm

Holy crap. I'm also getting this bug. Ubuntu 12.04 64 bit, GCC 4.8.
I'm amazed this wasn't noticed before. I guess no one's using the Release configuration for developing (I just always use RelWithDebInfo, which worked fine).
Might be a good idea to try out the Release configuration, before creating a release? :wink:
Since it only occurs in Release, I can't really get a meaningful backtrace. Perhaps try running Debug in valgrind and see if it complains about anything? Don't have time to do that right now.

Code: Select all

0x00007ffff787e661 in Ogre::MaterialManager::MaterialManager() () from /usr/lib/libOgreMain.so.1.10.0
(gdb) bt
#0  0x00007ffff787e661 in Ogre::MaterialManager::MaterialManager() () from /usr/lib/libOgreMain.so.1.10.0
#1  0x00007ffff788fab5 in Ogre::Root::Root(std::string const&, std::string const&, std::string const&) () from /usr/lib/libOgreMain.so.1.10.0
#2  0x0000000001173bff in OgreInit::OgreInit::init (this=0x1789380, logPath=...) at /home/scrawl/Dev/openmw/components/ogreinit/ogreinit.cpp:44
#3  0x0000000000b610b8 in OEngine::Render::OgreRenderer::configure (this=0x1789350, logPath=..., renderSystem=..., rttMode=...) at /home/scrawl/Dev/openmw/libs/openengine/ogre/renderer.cpp:53
#4  0x0000000000f6a5b9 in OMW::Engine::prepareEngine (this=0x7fffffffe2e0, settings=...) at /home/scrawl/Dev/openmw/apps/openmw/engine.cpp:341
#5  0x0000000000f6bcb4 in OMW::Engine::go (this=0x7fffffffe2e0) at /home/scrawl/Dev/openmw/apps/openmw/engine.cpp:479
#6  0x0000000000f5cdc1 in main (argc=1, argv=0x7fffffffe688) at /home/scrawl/Dev/openmw/apps/openmw/main.cpp:278
0 x

scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 2

Re: Ogre 1.9 update : Segmentation fault

Post by scrawl » Sat Nov 30, 2013 7:20 pm

Valgrind didn't have anything to say... but with some good old cout debugging, I found out that it chokes on this line in MaterialManager::MaterialManager():

Code: Select all

		OGRE_THREAD_POINTER_SET(mSerializer, OGRE_NEW MaterialSerializer());
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: Ogre 1.9 update : Segmentation fault

Post by masterfalcon » Sat Nov 30, 2013 7:28 pm

Out of curiosity, what threading library are you using?

Also, you might not be on the 1.9 branch. See this: "/usr/lib/libOgreMain.so.1.10.0"
0 x

User avatar
lingfors
Hobgoblin
Posts: 505
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden

Re: Ogre 1.9 update : Segmentation fault

Post by lingfors » Sat Nov 30, 2013 7:32 pm

I'm on 1.9, always running Release unless I run into a bug I can't nail down without debug info, and I'm not getting this... I'm on Windows, though...
0 x

scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 2

Re: Ogre 1.9 update : Segmentation fault

Post by scrawl » Sat Nov 30, 2013 8:12 pm

Yes, I'm on 1.10 right now. But it shouldn't be making a big difference atm, and since it's apparently the same bug the OP had in 1.9 ..

Threading is default (boost)

I'm running a bisect now. 5 test left.
0 x

scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 2

Re: Ogre 1.9 update : Segmentation fault

Post by scrawl » Sat Nov 30, 2013 8:50 pm

Here we go:

The first bad revision is:
changeset: 4711:2f646d7c9d83
branch: v1-9
user: David Rogers <masterfalcon@ogre3d.org>
date: Mon Jun 10 09:43:49 2013 -0500
summary: [iOS] Build fixes when enabling libc++ support.
0 x

scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 2

Re: Ogre 1.9 update : Segmentation fault

Post by scrawl » Sat Nov 30, 2013 9:29 pm

Yeah I found the issue: https://bitbucket.org/sinbad/ogre/pull- ... in-19/diff
How do you want to handle this? Re-tag 1.9.0 or create a 1.9.1 tag? I'd say that we don't need to keep a broken tag.
0 x

Imajie
Gnoblar
Posts: 2
Joined: Sat Nov 30, 2013 3:07 pm

Re: Ogre 1.9 update : Segmentation fault

Post by Imajie » Sat Nov 30, 2013 11:08 pm

Thanks, I can confirm that the patch fixes the release build issues on archlinux. It's a strange bug when building with debug info makes it go away.
0 x

Post Reply