I am seeing a segfault because of a NULL pointer in State::addChunks.
--------------------------
bool State::addChunk(StateChunk *chunk, Int32 index)
{
if(index > 0 && index > chunk->getClass()->getNumSlots())
{
SWARNING << "addChunk: index "
<< index
<< " > Numslots "
<< chunk->getClass()->getNumSlots()
<< ", ignored!"
<< std::endl;
return true;
}
UInt32 cindex = chunk->getClassId(); <--- This line
UInt32 csize = _mfChunks.size();
const State *pThis = this;
--------------------------
The arguments are:
chunk: NULL
index: -2
Is it ever valid for addChunk to be called with a NULL chunk?
The stack trace is shown below. The long and short of it is that a
background thread is creating a new geometry node and then immediately
after that is complete it calls OSG::commitChanges() to update the
graph and force everything to update. (this has been a good way for
us to isolate crashes like this one in the past)
Any ideas?
-Allen
#0 0x00007fdddd4efda8 in OSG::StateChunk::getClassId (this=0x0) at
.../Source/System/State/Base/OSGStateChunk.inl:82
#1 0x00007fdddbb87f7e in OSG::State::addChunk (this=0x7fddb18c6fd0,
chunk=0x0, index=-2) at.../Source/System/State/Base/OSGState.cpp:429
#2 0x00007fdddbb0015c in OSG::ChunkMaterial::addChunks
(this=0x7fddb5345650, state=0x7fddb18c6fd0) at
.../Source/System/Material/Base/OSGChunkMaterial.cpp:347
#3 0x00007fdddbb002bd in OSG::ChunkMaterial::rebuildState
(this=0x7fddb5345650) at
.../Source/System/Material/Base/OSGChunkMaterial.cpp:370
#4 0x00007fdddbafcc67 in OSG::PrimeMaterial::changed
(this=0x7fddb5345650, whichField=18446744073709551615, origin=8,
details=0) at .../Source/System/Material/Base/OSGPrimeMaterial.cpp:115
#5 0x00007fdddbb009a3 in OSG::ChunkMaterial::changed
(this=0x7fddb5345650, whichField=18446744073709551615, origin=8,
details=0) at .../Source/System/Material/Base/OSGChunkMaterial.cpp:193
#6 0x00007fdddb1a2e9d in OSG::ContainerChangeEntry::commitChanges
(this=0x7fddb4671858) at
.../Source/Base/FieldContainer/Base/OSGChangeList.cpp:183
#7 0x00007fdddb1aafec in
OSG::ChangeList::doCommitChanges<&(OSG::ContainerChangeEntry::commitChanges())>
(this=0x445d460)
at.../Source/Base/FieldContainer/Base/OSGChangeList.cpp:393
#8 0x00007fdddb1a31b5 in OSG::ChangeList::commitChanges
(this=0x445d460) at
.../Source/Base/FieldContainer/Base/OSGChangeList.cpp:416
#9 0x00007fdddba7ff4b in OSG::commitChanges () at
.../Source/Base/FieldContainer/Base/OSGChangeList.inl:201
#10 0x00007fddce357d02 in OSG::BackgroundLoaderBase::loadProc
(arg=0x43ada10) at src/osgext/BackgroundLoader.cpp:205
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users