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.
Post Reply
User avatar
boyamer
Orc
Posts: 459
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy
x 6

Direct3D Render System crash on resize?

Post by boyamer »

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
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Re: Direct3D Render System crash on resize?

Post by sinbad »

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
boyamer
Orc
Posts: 459
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy
x 6

Re: Direct3D Render System crash on resize?

Post by boyamer »

Thank you very mich Sinbad :)
Post Reply