icculus / Serious-Engine

An open source version of a game engine developed by Croteam for the classic Serious Sam games.
GNU General Public License v2.0
164 stars 21 forks source link

Crash in asm of AnimateFire #52

Open Manuel-K opened 8 years ago

Manuel-K commented 8 years ago

The 32 bit version of the game with asm enabled crashes every time when sound is working when a level is loaded (either the demo that starts after the logo or when starting a new game). Sometimes the game starts without sound (with a "ALSA lib pcm_dmix.c:1079:(snd_pcm_dmix_open) unable to open slave" message) and it doesn't crash.

I don't see the connection between AnimateFire and sound, but it's my first look at the code.

Stacktrace:

#0  0x0824b4f0 in AnimateFire (slDensity=15) at /redacted/Serious-Engine/Sources/Engine/Graphics/TextureEffects.cpp:3033
#1  0x0824c263 in AFire () at /redacted/Serious-Engine/Sources/Engine/Graphics/TextureEffects.cpp:3296
#2  0x0824b944 in CTextureEffectGlobal::Animate (this=0xb812c20) at /redacted/Serious-Engine/Sources/Engine/Graphics/TextureEffects.cpp:3435
#3  0x08240263 in CTextureData::SetAsCurrent (this=0xb812ca8, iFrameNo=0, bForceUpload=0)
    at /redacted/Serious-Engine/Sources/Engine/Graphics/Texture.cpp:1252
#4  0x08200d96 in SetCurrentTexture (ptd=0xb812ca8, iFrame=0) at /redacted/Serious-Engine/Sources/Engine/Models/RenderModel_View.cpp:125
#5  0x08207328 in CModelObject::RenderModel_View (this=0xc789280, rm=...) at /redacted/Serious-Engine/Sources/Engine/Models/RenderModel_View.cpp:2212
#6  0x08219ee0 in CModelObject::RenderModel (this=0xc789280, rm=...) at /redacted/Serious-Engine/Sources/Engine/Models/RenderModel.cpp:601
#7  0x082c7d6c in CRenderer::RenderOneModel (this=0x8490640 <_areRenderers>, en=..., moModel=..., plModel=..., fDistanceFactor=10,7842741, bRenderShadow=1, ulDMFlags=27)
    at /redacted/Serious-Engine/Sources/Engine/Rendering/RenderModels.cpp:436
#8  0x082c89b1 in CRenderer::RenderModels (this=0x8490640 <_areRenderers>, bBackground=0)
    at /redacted/Serious-Engine/Sources/Engine/Rendering/RenderModels.cpp:652
#9  0x082cfe25 in CRenderer::DrawToScreen (this=0x8490640 <_areRenderers>) at /redacted/Serious-Engine/Sources/Engine/Rendering/Render.cpp:611
#10 0x082d0de5 in CRenderer::Render (this=0x8490640 <_areRenderers>) at /redacted/Serious-Engine/Sources/Engine/Rendering/Render.cpp:879
#11 0x082d1651 in RenderView (woWorld=..., enViewer=..., prProjection=..., dpDrawport=...)
    at /redacted/Serious-Engine/Sources/Engine/Rendering/Render.cpp:984
#12 0xf6314604 in CPlayer::RenderPlayerView (this=0xc23adb8, pdp=0xffd66884, bShowExtras=1) at /redacted/Serious-Engine/Sources/EntitiesMP/Player.es:2521
#13 0xf631549b in CPlayer::RenderGameView (this=0xc23adb8, pdp=0xf61142c0 <adpDrawPorts>, pvUserData=0x1)
    at /redacted/Serious-Engine/Sources/EntitiesMP/Player.es:2708
#14 0xf60f3cd4 in CGame::GameRedrawView (this=0x97aa030, pdpDrawPort=0x98d5890, ulFlags=1) at /redacted/Serious-Engine/Sources/GameMP/Game.cpp:2302
#15 0x0835879d in DoGame () at /redacted/Serious-Engine/Sources/SeriousSam/SeriousSam.cpp:788
#16 0x08359e83 in SubMain (hInstance=0x0, hPrevInstance=0x0, lpCmdLine=0x946b080 "", nCmdShow=0)
    at /redacted/Serious-Engine/Sources/SeriousSam/SeriousSam.cpp:1299
#17 0x0835a0e2 in CommonMainline (hInstance=0x0, hPrevInstance=0x0, lpCmdLine=0x946b080 "", nCmdShow=0)
    at /redacted/Serious-Engine/Sources/SeriousSam/SeriousSam.cpp:1374
#18 0x0835a240 in main (argc=1, argv=0xffd66eb4) at /redacted/Serious-Engine/Sources/SeriousSam/SeriousSam.cpp:1492