[Fixed] Crash since 1.8 (SVN)

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
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

[Fixed] Crash since 1.8 (SVN)

Post by Auria »

Hi,

when using irrlicht 1.8, code that worked fine in irrlicht 1.7 now crashes. this code is related to rendering with RTT enabled.
#0 0x15332e77 in gleRunVertexSubmitImmediate
#1 0x153324fc in gleLLVMArrayFunc
#2 0x153324b4 in gleSetVertexArrayFunc
#3 0x1531b4f3 in gleDrawArraysOrElements_ExecCore
#4 0x152a4e23 in glDrawElements_Exec
#5 0x95e37050 in glDrawElements
#6 0x00c62fac in irr::video::COpenGLDriver::renderArray at COpenGLDriver.cpp:1668
#7 0x00c67ce9 in irr::video::COpenGLDriver::drawVertexPrimitiveList at COpenGLDriver.cpp:1511
#8 0x00abff30 in irr::video::CNullDriver::drawMeshBuffer at CNullDriver.cpp:1518
#9 0x00af1cc5 in irr::scene::CMeshSceneNode::render at CMeshSceneNode.cpp:165
#10 0x00aade67 in irr::scene::CSceneManager::drawAll at CSceneManager.cpp:1505
Does anyone have any idea what can cause this crash?

EDIT: humm I disabled RTT and it still crashes, so it looks like any rendering causes issues :(
Last edited by Auria on Fri Mar 25, 2011 3:06 pm, edited 1 time in total.
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

Post by Auria »

Sorry for double-post, I have something quite interesting here.

Th Quake3Map sample shows the issue :
#5 0x000f8df2 in irr::core::array<unsigned char, irr::core::irrAllocator<unsigned char> >::operator[] at irrArray.h:308
#6 0x00202c46 in irr::video::COpenGLDriver::drawVertexPrimitiveList at COpenGLDriver.cpp:1421
#7 0x002e9658 in irr::video::IVideoDriver::drawIndexedTriangleList at IVideoDriver.h:689
#8 0x002e8f2f in irr::scene::COctreeSceneNode::render at COctreeSceneNode.cpp:208
#9 0x00060681 in irr::scene::CSceneManager::drawAll at CSceneManager.cpp:1505
#10 0x0001a1c4 in main at main.cpp:177

/Developer/svn/irrlicht trunk/source/Irrlicht/MacOSX/../../../include/irrArray.h:308: failed assertion `!(index>=used)'
The assertion failure especially seems interesting

The line is

Code: Select all

glColorPointer(4, GL_UNSIGNED_BYTE, 0, &ColorBuffer[0]);
and "ColorBuffer" appears to be empty.

When I fix this ColorBuffer issue, then the sample crashes at the same line as SuperTuxKart, in COpenGLDriver:1668

Code: Select all

case scene::EPT_TRIANGLES:
			glDrawElements(GL_TRIANGLES, primitiveCount*3, indexSize, indexList);
			break;
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Are you sure, that you did not change something in the mesh structures? Both places rely on a correctly prepared vertex and index list. The ColorBuffer could also be a strange combination of the bgra_vertex extension. But it looks more as if the SMesh is completely broken. At least for me all examples are working.
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

Post by Auria »

hybrid wrote:Are you sure, that you did not change something in the mesh structures? Both places rely on a correctly prepared vertex and index list. The ColorBuffer could also be a strange combination of the bgra_vertex extension. But it looks more as if the SMesh is completely broken. At least for me all examples are working.
Well the unmodified Quake3Map sample that comes with irrlicht has this problem, therefore I don't see what I could have done to mess it up
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Is this on Mac OsX? Just asking because your asserts seems to show that and I don't seem to have crashes when running the example 02 on Linux currently.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

Post by Auria »

Yes that's OSX, sorry I forgot to mention
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

Post by Auria »

Update : I had a debugging session with Hybrid, the cause of this issue has been found and fixed irrlicht SVN :)
doppiabeo
Posts: 2
Joined: Wed Jun 08, 2011 10:20 am

A suggestion / help

Post by doppiabeo »

Good morning guys.
Sorry if I bother you, but I'm having exactly the same problem (quite the same stacktrace), with an application that I'm developing on OSX, and I can't figure out which is its origin.
I don't know at all Irrlicht engine, so before I start to browse the whole code through all versions available in SVN, I try to ask here what was the problem and which solution you found.

Thanks in advance
G.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Just make sure you use SVN/trunk and not the official 1.7.2 SDK to have all these fixes in your sources. Otherwise, you can find the changes in the SVN log, e.g. here:
http://irrlicht.svn.sourceforge.net/vie ... ision=3624
The following changes up to 3627 could also be a fix to this issue, I'm not sure which really fixed the mentioned one.
doppiabeo
Posts: 2
Joined: Wed Jun 08, 2011 10:20 am

Thanks

Post by doppiabeo »

Thanks a lot! I'll take a look at them.
G.
Post Reply