OpenTechEngine / OpenTechBFG

Engine based on (RB) Doom 3 BFG aiming to allow the creation of standalone games
Other
85 stars 11 forks source link

openal causes SIGSEGV on "crash" #108

Open kortemik opened 8 years ago

kortemik commented 8 years ago

... entered "developer 1" and "crash" on the console:

Program received signal SIGILL, Illegal instruction.
BFG::crash_f (args=...) at /home/kordex/code/OpenTechBFG/neo/framework/Common.cpp:633
633     __builtin_trap();

as expected. But later:

soundSystem->Shutdown();
[Thread 0x7fffcca3c700 (LWP 13456) exited]
AL lib: (WW) FreeDevice: (0x39e7d90) Deleting 3 Buffer(s)
[Thread 0x7fffcd23d700 (LWP 13455) exited]

Program received signal SIGSEGV, Segmentation fault.
0x000000000076ee95 in BFG::idSoundSystemLocal::StopVoicesWithSample (this=0x12b3e60 <BFG::soundSystemLocal>, sample=sample@entry=0x44dced0)
    at /home/kordex/code/OpenTechBFG/neo/sound/snd_system.cpp:551
551                 if( emitter->channels[i]->leadinSample == sample || emitter->channels[i]->loopingSample == sample )
(gdb) bt full
#0  0x000000000076ee95 in BFG::idSoundSystemLocal::StopVoicesWithSample (this=0x12b3e60 <BFG::soundSystemLocal>, sample=sample@entry=0x44dced0)
    at /home/kordex/code/OpenTechBFG/neo/sound/snd_system.cpp:551
        i = 0
        emitter = 0x3fde9d0
        e = 0
        sw = 0x3fdb430
        w = 0
#1  0x0000000000acc484 in BFG::idSoundSample_OpenAL::FreeData (this=0x44dced0) at /home/kordex/code/OpenTechBFG/neo/sound/OpenAL/AL_SoundSample.cpp:636
No locals.
#2  BFG::idSoundSample_OpenAL::~idSoundSample_OpenAL (this=0x44dced0, __in_chrg=<optimized out>)
    at /home/kordex/code/OpenTechBFG/neo/sound/OpenAL/AL_SoundSample.cpp:118
No locals.
#3  0x000000000076f030 in BFG::idSoundSample::~idSoundSample (this=0x44dced0, __in_chrg=<optimized out>)
    at /home/kordex/code/OpenTechBFG/neo/idlib/../sound/OpenAL/AL_SoundSample.h:237
No locals.
#4  BFG::idSoundSample::~idSoundSample (this=0x44dced0, __in_chrg=<optimized out>)
    at /home/kordex/code/OpenTechBFG/neo/idlib/../sound/OpenAL/AL_SoundSample.h:237
No locals.
#5  0x000000000076d13f in BFG::idList<BFG::idSoundSample*, (BFG::memTag_t)32>::DeleteContents (clear=true, this=0x12b5638 <BFG::soundSystemLocal+6104>)
    at /home/kordex/code/OpenTechBFG/neo/idlib/../idlib/containers/List.h:294
        i = 0
#6  BFG::idSoundSystemLocal::Shutdown (this=0x12b3e60 <BFG::soundSystemLocal>) at /home/kordex/code/OpenTechBFG/neo/sound/snd_system.cpp:259
No locals.
#7  0x0000000000601cb3 in BFG::idCommonLocal::Shutdown (this=0xfd7ee0 <BFG::commonLocal>) at /home/kordex/code/OpenTechBFG/neo/framework/Common.cpp:1560
        this = 0xfd7ee0 <BFG::commonLocal>
BielBdeLuna commented 8 years ago

in RBDoom3BFG I don't get that error:

]developer 1
]crash 
writing to: /home/biel/.rbdoom3bfg/base/consoleHistory.txt
signal caught: Illegal instruction
si_code 2
Trying to exit gracefully..
session->GetSaveGameManager().CancelToTerminate();
soundSystem->StopAllSounds();
Stop();
--------- Game Map Shutdown ----------
--------------------------------------
CleanupShell();
delete loadGUI;
delete renderWorld;
delete soundWorld;
delete menuSoundWorld;
session->ShutdownSoundRelatedSystems();
session->Shutdown();
game->Leaderboards_Shutdown();
uiManager->Shutdown();
soundSystem->Shutdown();
AL lib: (WW) FreeDevice: (0x7986100) Deleting 262 Buffer(s)
usercmdGen->Shutdown();
eventLoop->Shutdown();
declManager->Shutdown();
renderSystem->Shutdown();
idRenderSystem::Shutdown()
Shutting down OpenGL subsystem
commonDialog.Shutdown();
UnloadGameDLL();
------------ Game Shutdown -----------
--------- Game Map Shutdown ----------
--------------------------------------
Shutdown event system
--------------------------------------
saveFile.Clear( true );
stringsFile.Clear( true );
CloseLogFile();
fileSystem->Shutdown( false );
Sys_Shutdown();
console->Shutdown();
idKeyInput::Shutdown();
cvarSystem->Shutdown();
cmdSystem->Shutdown();
ClearWarnings( GAME_NAME " shutdown" );
warningCaption.Clear();
errorList.Clear();
idLib::ShutDown();
shutdown terminal support
biel@Biel-laptop:/usr/local/share/d3bfg$ 
DanielGibson commented 8 years ago

So you're surprised that the game crashes when you crash it? And that one crash gets it into a flakey state so other crashes follow later? ...

kortemik commented 8 years ago

I am not surprised by that, it should come down cleanly as the sig_handler is bringging the live engine down. sigill is being handled and because of that it should come down as cleanly as with sigquit. openal seems to skip some checks.

it wont happen on rbdoom3 as their assets have sounds playing from startmenu onwards we don't have that.

On Tue, Jul 19, 2016 at 5:39 PM, Daniel Gibson notifications@github.com wrote:

So you're surprised that the game crashes when you crash it? And that one crash gets it into a flakey state so other crashes follow later? ...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OpenTechEngine/OpenTechBFG/issues/108#issuecomment-233653634, or mute the thread https://github.com/notifications/unsubscribe-auth/AA19Ommwxxqum1mL2YXRCVSC94Pr7MfCks5qXOGHgaJpZM4JPxWn .

BielBdeLuna commented 8 years ago

those this happen to do with "com_smp" ?