Problem with Critter::RenderSystem::destroyFluid()

Karan

04-04-2011 14:21:31

Hi,

the destroyFluid method doesn't seem to clean up properly:
void OgreWidget::createFluid() {
if (mFluid) {
mPhysicsRenderSystem->destroyFluid(mFluid);
mFluid = 0;
}

mFluid = mPhysicsRenderSystem->createFluid(mFluidDescription, "SpherePointSprites", Critter::Enums::FluidType_OgreParticle);
mEmitter = mFluid->createEmitter(mEmitterDescription);
}

After the second call to this method (-> fluid is recreated with changed settings), I get an
"Unhandled exception at 0x6bda2095 (NxOgreDebug.dll) in ParticleFluids.exe: 0xC0000005: Access violation reading location 0x00000000",
supposedly in NxOgre::TimeListenerGroup:68 (method advance()). I don't see a null pointer in the debugger though, so I don't know if thats entirely correct.

Any ideas? I'm using the latest Buggyswires code. Worked fine with Detritus (I think commit Outliver, maybe one before or after).

Karan

05-04-2011 15:36:21

Solved for me - the error doesn't occur with FluidType_Position and I don't need the Ogre particle system anymore since I just replaced it with a geometry shader...

EDIT: I take that back - sometimes it works and sometimes it doesn't...doesn't seem deterministic.