[fixed]Crash when open Device

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Kostya
Posts: 5
Joined: Mon May 31, 2010 9:58 am

[fixed]Crash when open Device

Post by Kostya »

When i try open device with Dx9 renderer on system not support this renderer (e.g. win2k) program crash on function createDeviceEx() or createDevice() (don`t return null).

When in file CD3D9Driver.cpp I delete line
dx9->drop();
in function IVideoDriver* createDirectX9Driver(...)
function createDeviceEx() return null,when can`t init device.

Is this bug?


I test on Irrlicht 1.7.1.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The problem is actually not the drop(), but something inside the device destructor. I never had this problem, so it's hard to debug for me. But if you could check which call inside the destructor is actually crashing here, we might be able to fix this problem.
Kostya
Posts: 5
Joined: Mon May 31, 2010 9:58 am

Post by Kostya »

hybrid wrote:The problem is actually not the drop(), but something inside the device destructor.
in destructor CD3D9Driver
program crach on line
DepthBuffers[0]->drop();

i am change this place:

Code: Select all

    if(DepthBuffers.size())
            DepthBuffers[0]->drop();
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, definitely a bug here. The init method is able to exit before the depth buffer struct is created. I've fixed this in Irrlicht 1.7 branch, will be in 1.7.2. Thanks.
Post Reply