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: 458
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy

Direct3D Render System crash on resize?

Post by 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
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Re: Direct3D Render System crash on resize?

Post by 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).
0 x

User avatar
boyamer
Orc
Posts: 458
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy

Re: Direct3D Render System crash on resize?

Post by boyamer » Tue Nov 10, 2009 7:59 pm

Thank you very mich Sinbad :)
0 x

Post Reply