Can't run applications using OgreRenderer

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

User avatar
Spoonfork
Just popping in
Just popping in
Posts: 5
Joined: Thu Feb 11, 2010 19:09

Can't run applications using OgreRenderer

Postby Spoonfork » Thu Feb 11, 2010 19:35

I've been trying to get CEGUI to play nicely with OGRE 1.7 for the last day or so and it's not going too well I'm afraid.

I'm using CEGUI 0.7.1 (tried both stable SVN and source package) and everything compiles beautifully combined with Ogre, but whenever I start an application using CEGUIOgreRenderer, like Sample_FirstWindow, all I get is an error prompt saying "The application was unable to start correctly (0xc0150002)". I've pretty much followed this link to the letter:

http://www.cegui.org.uk/wiki/index.php/Building_CEGUI_for_Ogre_/_OgreRenderer

... and I've made sure that I'm not mixing Ogre's release-libraries with CEGUI's debug-libraries and all that, so I'm pretty sure that's not causing the problem. I've also tried mixing OGRE's stable SVN with yours and their source package with yours etc, but no luck.

I tried setting up my own OGRE-application which I know works with just OGRE alone, but as soon as I include CEGUI and its libraries it immediately throws that nasty error message in my face.

I'm on Win7 x64 using Visual Studio 2008 SP1.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Can't run applications using OgreRenderer

Postby CrazyEddie » Fri Feb 12, 2010 09:44

Hi,

Firstly I'll qualify this by saying that the majority of my time is not spent on Windows so I do not have vast amounts of experience with these issues (I've never seen these issues locally, with anything).

These issues are generally to do with service packs and other security updates (this means updates to MSVC++, not just the plain old Windows updates). So while I can't possibly recall the exact set of updates that were applied when the dependencies were generated[1], basically it would have been all updates available at the time - so the only advice I can give, based on my little knowledge of this issue, is to ensure you have all the current updates and security fixes for MSVC++ and the c/c++ runtimes.

CE.

[1] I mention the deps because if you've also built from source, the deps is where any conflict must be coming from

User avatar
Spoonfork
Just popping in
Just popping in
Posts: 5
Joined: Thu Feb 11, 2010 19:09

Re: Can't run applications using OgreRenderer

Postby Spoonfork » Fri Feb 12, 2010 11:56

A bit of googling led me to believe that it had something to do with the C/C++ runtimes (msvcr90.dll and the likes) but after having reinstalled them and even put them in the same directory as the compiled executables I think I can safely say that they are not causing the issue.

I'm think I'm gonna try to send the files to a couple of friends and see if they get the error message.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Can't run applications using OgreRenderer

Postby CrazyEddie » Fri Feb 12, 2010 12:26

I wonder which version of those files you have? I'll check mine later (maybe tomorrow) too, as well as running a test with the latest CEGUI / Ogre code...

CE

User avatar
Spoonfork
Just popping in
Just popping in
Posts: 5
Joined: Thu Feb 11, 2010 19:09

Re: Can't run applications using OgreRenderer

Postby Spoonfork » Fri Feb 12, 2010 15:41

I'm pretty sure I have the latest version. At first I tried using the ones that come with Visual Studio, but since that didn't work I tried downloading them from here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en

But that didn't really change anything.

User avatar
Spoonfork
Just popping in
Just popping in
Posts: 5
Joined: Thu Feb 11, 2010 19:09

Re: Can't run applications using OgreRenderer

Postby Spoonfork » Fri Feb 12, 2010 16:27

I have no idea what just happened.

I tried downloading CEGUI's stable SVN for like the 6th time, built everything and added the includes/libs to my own OGRE-application. But for some inexplicable reason, there was no 0xc0150002-error this time, but instead it wanted the Expartparser-module. Said and done, I built it and added that too and wham-bam my application ran just fine.

I really wish I knew what I did right this time, so that others could learn from my mistake. I'm starting to think it did have something to do with the C/C++ runtimes, just that I had to restart my computer before the correct runtimes could take effect. It's anyones guess, really.

Thanks for the help btw, CE. :)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Can't run applications using OgreRenderer

Postby CrazyEddie » Sat Feb 13, 2010 10:08

Firstly, I'm glad you managed to get the thing to run - however you managed to do it ;)

I did some checking this morning, and the information I gave above appears to be incorrect. I've checked the manifests in the dependency dlls and they were actually built with the original shipping versions of the vc9 runtimes (9.0.21022.8) - as opposed to the SP1 versions (9.0.30729.1) or versions with subsequent update applied (9.0.30729.4148). So somehow I dropped the ball here - sorry about that.

For people searching similar issues, I also add the following information: The SDKs are (correctly) built with the latest version of the runtime (the SP1 security fixed 9.0.30729.4148 version), what this likely means is that you - and your users - will actually need both runtime versions in order to be able to correctly start applications.

CE.

User avatar
Spoonfork
Just popping in
Just popping in
Posts: 5
Joined: Thu Feb 11, 2010 19:09

Re: Can't run applications using OgreRenderer

Postby Spoonfork » Sat Feb 13, 2010 11:21

So it seems I popped the champagne a bit too early. But fear not, for I bring good news. :wink:

This is a bit embarrassing to be honest. The only reason it worked for me the last time was because I'd run my program in a custom configuration I'd named "DebugFast" which is basically Debug-mode with Release-libs. Why exactly this worked and Debug didn't, I have no idea, but when I later ran Debug-mode instead I got the pleasure to meet my old 0xc0150002-friend again. So in the desperation that followed I scoured the wiki and found something in the change log about downloading dependencies named "0.7.x-r1-vc9" instead of "0.7.x-vc9" and I checked whether or not I had done so. This is the embarrassing part, because it seems I had downloaded "0.7.x-r1-vc8" and used those dependencies throughout all my tests.

So to anyone out there getting that horrible 0xc0150002-error, make sure you have the right dependencies for your version of Visual Studio. :)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Can't run applications using OgreRenderer

Postby CrazyEddie » Sun Feb 14, 2010 09:15

aha :)

Embarrassing as it may be, I can confess to having done similar also - I think it's some subconscious thing with there being an 8 in there for the older version, but the 2008 label associated with the newer product release. Perhaps later this year things will be simpler since there should be the version 10 compiler released under the much less confusing product label Visual Studio (or C++) 2010 :)

CE.

NotNullGothic
Just popping in
Just popping in
Posts: 6
Joined: Mon Mar 01, 2010 20:17

Re: Can't run applications using OgreRenderer

Postby NotNullGothic » Mon Mar 01, 2010 20:28

My problem is not related to the versions (I hope ). So, I have latest Ogre code and CEGUI, I built them without no problems, I followed http://www.cegui.org.uk/wiki/index.php/Building_CEGUI_for_Ogre_/_OgreRenderer and http://www.cegui.org.uk/wiki/index.php/The_Beginner_Guide_to_Getting_CEGUI_Rendering but I can't find the correct way to create an OgreRenderer object. Did I miss something?
Can't even compile the initialization code.

Code: Select all

mRenderer = new CEGUI::OgreRenderer( mWindow );
mSystem = new CEGUI::System(mRenderer);


I had set up an ogre project (working before using CEGUI), I have also compiled CEGUIOgreRenderer and CEGUIBase libraries (in case there is any doubt). Is there any CEGUI tutorial using correct parameters, those I looked for still use the

Code: Select all

CEGUI::OgreCEGUIRenderer* myRenderer =   new CEGUI::OgreCEGUIRenderer( myRenderWindow );

And I don't have such OgreCEGUIRenderer, I just have CEGUIOgreRenderer.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Can't run applications using OgreRenderer

Postby CrazyEddie » Mon Mar 01, 2010 22:07

Hi,

This has all changed in CEGUI 0.7.x :). See the porting guide: http://cegui.org.uk/docs/current/porting6to7.html

The tutorials in the main docs have been updated for 0.7.x: http://cegui.org.uk/docs/current (See beginners tutorials part).
This topic may also be useful: viewtopic.php?f=10&t=4632&start=0

Yes, OgreCEGUIRenderer has become CEGUI::OgreRenderer. The header file to include is now <RendererModules/Ogre/CEGUIOgreRenderer.h>

For these specific errors you mention, change this:

Code: Select all

mRenderer = new CEGUI::OgreRenderer( mWindow );
mSystem = new CEGUI::System(mRenderer);

To this:

Code: Select all

mRenderer = &CEGUI::OgreRenderer::bootstrapSystem( mWindow );
mSystem = CEGUI::System::getSingletonPtr();


HTH

CE.

NotNullGothic
Just popping in
Just popping in
Posts: 6
Joined: Mon Mar 01, 2010 20:17

Re: Can't run applications using OgreRenderer

Postby NotNullGothic » Thu Mar 04, 2010 02:43

Thanks, that solved the problems and my application is running. i can inject events and must of them are working correctly. Nevertheless, I couldn't find any information on how to use in my Frame listener and a previously create scene manager. I looked here http://cegui.org.uk/docs/current

Code: Select all

void createScene()
...
mSceneMgr = mRoot->createSceneManager(ST_EXTERIOR_CLOSE);
mSceneMgr->setWorldGeometry("terrain.cfg");
mSceneMgr->setAmbientLight(ColourValue(0.25, 0.25, 0.25));
--


All signals works and can end my app correctly with a keyboard event, but my scene isn't rendered and calling mSceneMgr is always invalid. Could anyone help on this?

NotNullGothic
Just popping in
Just popping in
Posts: 6
Joined: Mon Mar 01, 2010 20:17

Re: Can't run applications using OgreRenderer

Postby NotNullGothic » Thu Mar 04, 2010 22:14

Sorry I forgot the common files included in the CEGUI structure when you get the src code, there it comes an example for each engine or API. Thanks anyway.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Can't run applications using OgreRenderer

Postby CrazyEddie » Fri Mar 05, 2010 09:42

I don't understand either of the two previous posts :lol: Is this problem fixed?

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 14 guests