Last week I upgraded from from 1.7.1 to 1.8.0 and have encountered a number of serious issues which are:
- Crash when Dragging the windowed application from one monitor to the other
- Crash when locking and unlocking the computer while running the application
- Crash when resizing the Application in windowed mode
- Crash when entering and exiting full screen
After some debugging I found that at times in the D3D9HardwareVertexBuffer.cpp file in the lockImpl function the source buffers are null which is causing the crash. See the commented code below.
Code: Select all
// Case we use system memory buffer -> just return it
if (mSystemMemoryBuffer != NULL)
{
return mSystemMemoryBuffer + offset;
}
else
{
// Crashing here with mSourceBuffer or mSourceBuffer->mBuffer being null.
// Lock the source buffer.
mSourceLockedBytes = _lockBuffer(mSourceBuffer, mSourceBuffer->mLockOffset, mSourceBuffer->mLockLength);
return mSourceLockedBytes;
}
Code: Select all
// Case we use system memory buffer -> just return it
if (mSystemMemoryBuffer != NULL)
{
return mSystemMemoryBuffer + offset;
}
else
{
if( mSourceBuffer == 0 || ( mSourceBuffer->mOutOfDate && mSourceBuffer->mBuffer == 0 ) )
{
for (uint i = 0; i < D3D9RenderSystem::getResourceCreationDeviceCount(); ++i)
{
IDirect3DDevice9* d3d9Device = D3D9RenderSystem::getResourceCreationDevice(i);
createBuffer( d3d9Device, mBufferDesc.Pool );
}
}
// Lock the source buffer.
mSourceLockedBytes = _lockBuffer(mSourceBuffer, mSourceBuffer->mLockOffset, mSourceBuffer->mLockLength);
return mSourceLockedBytes;
}
I believe this is indicative of an issue where the D3D9 Render System in some circumstances is not regenerating necessary buffers when the device changes or resets. I've spent the last two days trying to track this down and am having a lot of trouble so any assistance would be greatly appreciated. Ive attached some images below to show the issue with assets not reloading correctly.
Thanks in advance!
Loading screen. Assets for the loading screen are stored in a bootstrap zip file.


In Scene. In this scene everything seems to be ok however my dynamic ambient and environment cubemaps have failed to be regenerated leading to the scene looking dull. This is a test scene, which explains the giant fish swimming in the air



Ogre Sample Browser. This is after my hack and dragging the window from one monitor to the other. The sample browser displays similar problems to my application.

