#127 assert failure (in debug build)

open
nobody
None
5
2010-05-23
2010-05-23
Alex
No

Using the test scene in Bug#2811267, the debug build produces this assertion failure.

Assertion failed: currentData.numStrings == currentData.currentString, file ../../../../src/ri/sdr.y, line 2246

The callstack is:

msvcr90d.dll!_wassert(const wchar_t * expr=0x000007fef05f0ef0, const wchar_t * filename=0x000007fef05f0eb0, unsigned int lineno=2246) Line 163 C
ri.dll!shaderCreate(const char * shaderName=0x00000000062f85e0) Line 2246 + 0x28 bytes C++
ri.dll!parseShader(const char * shaderName=0x00000000062f85e0, const char * name=0x000000000022d5b0) Line 2116 + 0xd bytes C++
> ri.dll!CRenderer::getShader(const char * name=0x00000000062f85e0, TSearchpath * path=0x00000000008306b0) Line 528 + 0x12 bytes C++
ri.dll!CRendererContext::getShader(const char * name=0x00000000062f85e0, int type=0, int np=1, const char * * params=0x0000000000823870, const void * * vals=0x0000000000823950) Line 273 + 0x1d bytes C++
ri.dll!CRendererContext::RiSurfaceV(const char * name=0x00000000062f85e0, int n=1, const char * * tokens=0x0000000000823870, const void * * params=0x0000000000823950) Line 1607 + 0x2b bytes C++
ri.dll!RiSurfaceV(const char * name=0x00000000062f85e0, int n=1, const char * * tokens=0x0000000000823870, const void * * params=0x0000000000823950) Line 1411 C++
ri.dll!ribparse() Line 1266 C++
ri.dll!ribParse(const char * fileName=0x000000000022ec20, void (const char *, <no type>)* c=0x0000000000000000) Line 2939 C++
ri.dll!CRendererContext::RiReadArchiveV(const char * filename=0x00000000008d60f0, void (const char *, <no type>)* callback=0x0000000000000000, int n=0, const char * * tokens=0x00000000008231a0, const void * * params=0x0000000000823370) Line 4455 C++
ri.dll!RiReadArchiveV(const char * filename=0x00000000008d60f0, void (const char *, <no type>)* callback=0x0000000000000000, int n=0, const char * * tokens=0x00000000008231a0, const void * * params=0x0000000000823370) Line 2737 C++
ri.dll!RiReadArchive(const char * filename=0x00000000008d60f0, void (const char *, <no type>)* callback=0x0000000000000000, ...) Line 2726 C++
rndr.exe!main(int argc=2, char * * argv=0x00000000007e6e50) Line 843 C++

Looks like the shader parser is doing something wrong.

Discussion