windows msvcr80.dll crash

Hey Everyone,

So my game development is going well (its been about a year), I’m close to my first alpha testing. Anyways I’ve been doing all development in linux (this time), and now that I’m getting the game ready for windows I ran into a strange error.

My game runs along fine and then after a certain amount of time (in a certain mode of the game) python.exe itself completely crashes! I get a strange error about msvcr80.dll. Here is the error signature straight from windows for python.exe:

I did some research on the forums, but most posts about this dll had to do with compiling panda3d, not when its running (as far as I could tell). I have the latest panda3d, but this came up with 1.5.0 as well. I tried updating my video card drivers (no luck), disabling sound (no luck), I even tried installing the Microsoft Visual C++ 2005 Redistributable Package, and the 2008 one as well (just grasping at that point).

The strange thing is that my game runs fine in linux. So I’m wondering what the issue could be, I don’t think its with my code (I’m sure there are lots of bugs, but nothing that makes such a brutal crash that I cannot step through).

Any ideas would be great,

Thanks,

C

So, is this the first time you got segmentation fault ?

That info is mostly useless.

I usually take these steps :

  1. try to duplicate the problem
  2. narrow it down to the exact function call
  3. once the suspicious function is found, edit it to print out some suspicious variables to see if it gets out of bound, then compile it

Usually it’s caused by uninitialized pointer or accessing array/vector item outside its bound. Are you using some libraries other than panda’s standard ? Physics engine or so ?

Hey ynjh,

good to see you are still around helping everyone out I appreciate it. I’ll try and get more information, I can certainly duplicate the problem, I’ll do some more digging and get back to you guys with some more info.

C

Hey,

So I had a feeling it might have something to do with the particle effect I use for explosions, so I commented that out and windows worked fine! Its interesting that this causes windows to crater, but not linux, any ideas what I’m doing wrong?

    def explode(self):
        """Sim has exploded, create explosion and tidy up"""
        ival = self.sim.hprInterval((100), Vec3(360, 0, 0))
        ival.loop()
        self.p1 = ParticleEffect(  ) 
        self.p1.reset(  )
        self.p1.setPos( 0.000, 0.100, 0.000 )
        self.p1.setHpr( 0.000, 0.000, 0.000 )
        self.p1.setScale( 1, 1, 1 )
        p1 = Particles( 'particles-1' )
        p1.setFactory( "PointParticleFactory" )
        p1.setRenderer( "SpriteParticleRenderer" )
        p1.setEmitter( "SphereSurfaceEmitter" )
        p1.setPoolSize( 100 )
        p1.setBirthRate( 0.0500 )
        p1.setLitterSize( 10 )
        p1.setLitterSpread( 0 )
        p1.setSystemLifespan( 3.0000 )
        p1.setLocalVelocityFlag( 1 )
        p1.setSystemGrowsOlderFlag( 1 )
        p1.factory.setLifespanBase( 2.0000 )
        p1.factory.setLifespanSpread( 0.2500 )
        p1.factory.setMassBase( 2.0000 )
        p1.factory.setMassSpread( 0.0100 )
        p1.factory.setTerminalVelocityBase( 400.0000 )
        p1.factory.setTerminalVelocitySpread( 400.0000 )
        p1.renderer.setAlphaMode( BaseParticleRenderer.PRALPHAOUT )
        p1.renderer.setUserAlpha( 0.13 )
        p1.renderer.setTexture( loader.loadTexture( self.path + 'square_grey.png' ) )
        p1.renderer.setColor( globals.colors[self.color1] )
        p1.renderer.setXScaleFlag( 0 )
        p1.renderer.setYScaleFlag( 0 )
        p1.renderer.setAnimAngleFlag( 0 )
        p1.renderer.setInitialXScale( 0.0100 )
        p1.renderer.setFinalXScale( 0.0200 )
        p1.renderer.setInitialYScale( 0.0100 )
        p1.renderer.setFinalYScale( 0.0200 )
        p1.renderer.setNonanimatedTheta( 0.0000 )
        p1.renderer.setAlphaBlendMethod( BaseParticleRenderer.PPBLENDLINEAR )
        p1.renderer.setAlphaDisable( 0 )
        p1.emitter.setEmissionType( BaseParticleEmitter.ETRADIATE )
        p1.emitter.setAmplitude( 1.0000 )
        p1.emitter.setAmplitudeSpread( 5.0000 )
        p1.emitter.setOffsetForce( Vec3( 0.0000, 0.0000, 0.0000 ) )
        p1.emitter.setExplicitLaunchVector( Vec3( 0.0000, 1.0000, 0.0000 ) )
        p1.emitter.setRadiateOrigin( Point3( self.x, self.y, self.z ) )
        p1.emitter.setRadius( 0.5000 )
        self.p1.addParticles(p1)
        self.p1.start( self.sim )
        
    
    def cleanupExplosion(self):
        """Cleanup explosion"""
        self.p1.cleanup()

It seems to happen in the cleanup explosion, or maybe a combination of particles being removed and generated. Its hard to pin down exactly, but it must be a combination of the generation and cleanup of particle effects.

Worst case I’ll just take out particle effects, do explosions in a different way.

C