Trying to capture with RenderDoc, but my app crash with Enable API validation

Problems building or running the engine, queries about how to use features etc.
User avatar
suny
Greenskin
Posts: 141
Joined: Thu Mar 12, 2020 5:53 pm
x 60

Trying to capture with RenderDoc, but my app crash with Enable API validation

Post by suny »

Ogre Version: 14.3
Operating System: windows
Render System: DirectX 11

Hi,
Newbie question:

I'm trying to capture my app with RenderDoc, but when I enable Enable API Validation, my app crashes on launch, probably during SDL and/or Ogre init.
From there, what can I do to know more about what is wrong with my app?

S.

User avatar
Crystal Hammer
Orc
Posts: 402
Joined: Sat Jun 23, 2007 5:16 pm
x 112

Re: Trying to capture with RenderDoc, but my app crash with Enable API validation

Post by Crystal Hammer »

Hi
I think the best or only way is to run your app in Debug mode.
If you're on Windows, using Visual Studio and you run in Debug in it, the crash will give location, call stack, variable values etc when it happened.
You will need to have Ogre and all other dependencies also built in Debug mode for this.
But good thing is if crash happens in Ogre, then in Debug it will show all need info too.
Then you could e.g. put breakpoints in your code and step run your app for even more info what happened before crash.

User avatar
suny
Greenskin
Posts: 141
Joined: Thu Mar 12, 2020 5:53 pm
x 60

Re: Trying to capture with RenderDoc, but my app crash with Enable API validation

Post by suny »

I just did, and I get:
OGRE_EXCEPT_EX(Exception::ERR_RENDERINGAPI_ERROR, hr, "Failed to create Direct3D11 device", "D3D11RenderSystem::D3D11RenderSystem");

The app seems to abort at the beginning, just when I do:
mgr.root->loadPlugin("RenderSystem_Direct3D11_d.dll");

rpgplayerrobin
Orc Shaman
Posts: 710
Joined: Wed Mar 18, 2009 3:03 am
x 391

Re: Trying to capture with RenderDoc, but my app crash with Enable API validation

Post by rpgplayerrobin »

Can you attempt to do it using the Sample Browser instead?
First, make sure the sample browser is actually using Direct3D11 by deleting the "OGRE Sample Browser" folder in the Documents folder.

Because when I try that, even with Enable API validation, it works with RenderDoc (I have it compiled currently as RelWithDebugInfo though).

Or does this issue only happen with your own application and not with the Sample Browser?