On my Windows 7 Professional x64 system, attempting to have Irrlicht create a heightmap from an image of dimensions 4096x4096 causes a crash with the following console output:
Code: Select all
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
[Inferior 1 (process 2940) exited with code 03]
Using GDB I was able to determine that this is indeed the last call made before the crash:
Code: Select all
irr::scene::ITerrainSceneNode *terrain = smgr->addTerrainSceneNode(source); // Source is a file path to the wanted image
Full Console output:
Code: Select all
C:\Users\Robert MacGregor\Desktop\KGE\bin>rendering_test_d
Kiaro Rendering Test Suite Started ------------------
Irrlicht Engine version 1.8.0
Microsoft Windows 7 Ultimate Edition Service Pack 1 (Build 7601)
Using renderer: OpenGL 2.1
Gallium 0.4 on SVGA3D; build: RELEASE; : VMware, Inc.
OpenGL driver version is 1.2 or better.
GLSL version: 1.2
Resizing window (640 480)
Could not open file of texture: nskinbl.jpg
Could not open file of texture: nskinbl.jpg
Loaded mesh: base/models/ninja.b3d
Loaded texture: C:/Users/Robert MacGregor/Desktop/KGE/bin/base/textures/skin/nsk
inrd.jpg
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
System: LUbuntu AMD64
GCC/G++ version: 4.7.3
Linux version: 3.8.0
64bit Build
System: Crunchbang Linux x86
GCC/G++ version: 4.7.2
Linux version: 3.10.4
32bit Build
System: Windows 7 Professional x64
GCC/G++ version: 4.7.1
32bit Build
I tested using two different files, one being 4096x4096 and the other 513x513 which loads properly.
The Broken File: http://dx.no-ip.org/height_broken.jpg
Any other file works okay: http://dx.no-ip.org/height_working.jpg