Direct3D Render System crash on resize?

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.

Direct3D Render System crash on resize?

Postby boyamer » Mon Nov 09, 2009 9:46 pm

Hi,i'm using DirectX9 REnder System from trunk embeded into windows forms,but i'm getting exception on resizing,maximizing the windows,seams that reseting device can't be done..here is the log when crashing:
Code: Select all
Info : D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
2009-11-09 21:51:33.7325 , Info : OGRE EXCEPTION(3:RenderingAPIException): Cannot reset device! in D3D9RenderWindow::reset at ..\..\..\RenderSystems\Direct3D9\src\OgreD3D9Device.cpp (line 419)
2009-11-09 21:51:34.0205 , Info : OGRE EXCEPTION(3:RenderingAPIException): Cannot lock D3D9 vertex buffer: Invalid call in D3D9HardwareVertexBuffer::updateBuffer at ..\..\..\RenderSystems\Direct3D9\src\OgreD3D9HardwareVertexBuffer.cpp (line 323)
2009-11-09 21:51:34.1075 , Info : OGRE EXCEPTION(3:RenderingAPIException): Cannot lock D3D9 vertex buffer: Invalid call in D3D9HardwareVertexBuffer::updateBuffer at ..\..\..\RenderSystems\Direct3D9\src\OgreD3D9HardwareVertexBuffer.cpp (line 323)
2009-11-09 21:51:34.2225 , Info : OGRE EXCEPTION(3:RenderingAPIException): Cannot lock D3D9 vertex buffer: Invalid call in D3D9HardwareVertexBuffer::updateBuffer at ..\..\..\RenderSystems\Direct3D9\src\OgreD3D9HardwareVertexBuffer.cpp (line 323)
2009-11-09 21:51:34.3175 , Info : OGRE EXCEPTION(3:RenderingAPIException): Cannot lock D3D9 vertex buffer: Invalid call in D3D9HardwareVertexBuffer::updateBuffer at ..\..\..\RenderSystems\Direct3D9\src\OgreD3D9HardwareVertexBuffer.cpp (line 323)


Anyone knows why?

Thanks
User avatar
boyamer
Orc
 
Posts: 443
Kudos: 5
Joined: 24 Jan 2009
Location: Italy

Re: Direct3D Render System crash on resize?

Postby sinbad » Tue Nov 10, 2009 6:24 pm

Stack trace at the exception? To me this looks like you have a frame loop where you're manually locking buffers, which you can't do during a device lost condition, you'll have to check for the RenderSystem lost/restore events and pause your locking in that period (Ogre already does this with its own updates).
User avatar
sinbad
OGRE Founder (Retired)
OGRE Founder (Retired)
 
Posts: 25870
Kudos: 63
Joined: 06 Oct 2002
Location: Guernsey, Channel Islands

Re: Direct3D Render System crash on resize?

Postby boyamer » Tue Nov 10, 2009 7:59 pm

Thank you very mich Sinbad :)
User avatar
boyamer
Orc
 
Posts: 443
Kudos: 5
Joined: 24 Jan 2009
Location: Italy


Return to Developer talk

Who is online

Users browsing this forum: No registered users and 5 guests