[fixed]COpenGLSLMaterialRenderer::linkProgram heap error

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
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

[fixed]COpenGLSLMaterialRenderer::linkProgram heap error

Post by xDan »

Hi, I get this error when debugging:

Code: Select all

warning: Heap block at 0DCCA910 modified at 0DCCA919 past requested size of 1


Program received signal SIGTRAP, Trace/breakpoint trap.
0x7c90120f in _libwinmm_a_iname ()
(gdb) backtrace
#0  0x7c90120f in _libwinmm_a_iname ()
#1  0x7c96e139 in _libwinmm_a_iname ()
#2  0x7c95f38c in _libwinmm_a_iname ()
#3  0x7c96e507 in _libwinmm_a_iname ()
#4  0x7c96f75e in _libwinmm_a_iname ()
#5  0x7c94bc4c in _libwinmm_a_iname ()
#6  0x7c927573 in _libwinmm_a_iname ()
#7  0x77c2c2de in _libwinmm_a_iname ()
#8  0x6a0357cd in operator delete(void*) ()
#9  0x69f74202 in irr::video::COpenGLSLMaterialRenderer::linkProgram() (
    this=0xcffc08) at COpenGLSLMaterialRenderer.cpp:288
Changing line 271 of COpenGLSLMaterialRenderer.cpp:

c8 *buf = new c8[maxlen];

to

c8 *buf = new c8[maxlen+1];

seems to fix the problem. I'm not sure exactly why :) Maybe something to do with a terminating NULL.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Hmm, the specs don't say anything about the extra null terminator at this place, but it won't hurt. So I'll add it to the service release of 1.6
Post Reply