Code: Select all
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
#ifdef _IRR_WINDOWS_
#pragma comment(lib, "Irrlicht.lib")
#endif
int main() {
IrrlichtDevice* device = createDevice(EDT_DIRECT3D9, dimension2d<s32>(640, 480));
ISceneManager* smgr = device->getSceneManager();
IVideoDriver* driver = device->getVideoDriver();
ISceneNode* node = smgr->addCubeSceneNode();
node->getMaterial(0).getTextureMatrix(0); // this line causes the program not to end correctly
// main loop
SColor backgroundColor(255,128,128,150);
while( device->run() ) {
driver->beginScene(true, true, backgroundColor);
smgr->drawAll();
driver->endScene();
}
device->drop();
return EXIT_SUCCESS;
}
with the debugger showing line 124 of IReferenceCounted.hWindows has triggered a breakpoint in test_texture.exe.
This may be due to a corruption of the heap, and indicates a bug in test_texture.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information
I'm using SVN trunk, rev 1406, VC++ 2005 SP1.
Very simple to reproduce. Could somebody please try it and see if the same thing happens?