Sign in to follow this  

Ogre Root

This topic is 3733 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a current class which creates the Root object for Ogre as such:
class Sample {
public:
   Sample(const string& pfile,const string& cfile,const string& lfile);
private:
   Ogre::Root* mRoot;
};

Sample::Sample(const string& pfile="plugin.cfg",const string& cfile="ogre.cfg",const string& lfile="Ogre.log") {
   mRoot=new Ogre::Root(pfile.c_str(),cfile.c_str(),lfile.c_str()); //SIGSEGV
};

The marked line compiles correctly but gives me a segmentation fault. This line worked previously (using Ogre version 1.4.3) before and even fails to work with mRoot public. All files are correctly there (and should have all of the correct data) and all of the libraries are there. What could be the problem? If you need more information than please tell me.

Share this post


Link to post
Share on other sites
The Ogre::Root constructor may be crashing. I'd recommend downloading the full Ogre sources and setting them up for debugging so that you can step inside them to see the exact location of the crash.

Share this post


Link to post
Share on other sites
Quote:
Original post by Shlaklava
I have a current class which creates the Root object for Ogre as such:

*** Source Snippet Removed ***
*** Source Snippet Removed ***

The marked line compiles correctly but gives me a segmentation fault. This line worked previously (using Ogre version 1.4.3) before and even fails to work with mRoot public.

All files are correctly there (and should have all of the correct data) and all of the libraries are there.

What could be the problem? If you need more information than please tell me.


Does it crash when you tell it to not load any files?

root = new Ogre::Root("", "", "gfx.log");

If not, then your plugins or config file is messed up (and BTW, I do not suggest using those 2 files - they've caused nothing but trouble for me).

Share this post


Link to post
Share on other sites

This topic is 3733 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this