Ok, so I was doing some experimenting with creating textures on the fly. I ended up creating the same texture twice. Now, the documentation tells that if the resource already exists, the function fails. However it didn't mention it fails with a segmentation fault, randomly:
#0 0xb7be5032 in RendererBase::destroyRenderBuffer () libHorde3D.so #1 0xb7c097e4 in Texture2DResource::release () from libHorde3D.so #2 0xb7c09877 in Texture2DResource::~Texture2DResource () from libHorde3D.so #3 0xb7bc2871 in createTexture2D () from libHorde3D.so
To reproduce, just call it like e.g. this:
std::cout << "WORK XX " << res << std::endl; res = Horde3D::createTexture2D("norfdsfdsmal2", ResourceFlags::NoTexRepeat| ResourceFlags::NoTexCompression| ResourceFlags::NoTexMipmaps| ResourceFlags::NoTexFiltering, width, height, false); std::cout << "WORK XY " << res << std::endl; res = Horde3D::createTexture2D("norfdsfdsmal2", ResourceFlags::NoTexRepeat| ResourceFlags::NoTexCompression| ResourceFlags::NoTexMipmaps| ResourceFlags::NoTexFiltering, width, height, false); std::cout << "WORK XZ " << res << std::endl; res = Horde3D::createTexture2D("norfdsfdsmal2", ResourceFlags::NoTexRepeat| ResourceFlags::NoTexCompression| ResourceFlags::NoTexMipmaps| ResourceFlags::NoTexFiltering, width, height, false); std::cout << "WORK XW " << res << std::endl;
That could produce for example:
WORK XX 0 WORK XY 47 ./simple_run.sh: line 1: 31572 Segmentation fault
or
WORK XX 0 WORK XY 47 WORK XZ 0
depending on luck.
|