ptitSeb / Eldritch

Eldritch port to the OpenPandora (meaning Arm / GLES2 / OpenAL): Status Working (with latest data file from Steam)
https://boards.openpandora.org/topic/18323-eldritch/
Other
3 stars 2 forks source link

AmigaOS4: crash on exit when free shader's resources and when close audio devices #7

Open kas1e opened 3 years ago

kas1e commented 3 years ago

So there 2 crashes one coming after another when we about to shut down the game and exit from.

First one come from freeing shader resources: ShaderManagerFreeShaders->ShaderProgram->crash in ogles2.library

The second crash comes when we about to free resources of openal/alut, with output in console:

AL lib: (EE) alc_cleanup: 1 device not closed.

And have a warning window with "parent process has tried to exit before all children have". Error process "alsoft-mixer".

And stack tracepoint out on "ALCplaybackAHI_mixerProc"

kas1e commented 3 years ago

About crash in audio free stuff, interesting that if I fully comment out function OpenALAudioSystem::~OpenALAudioSystem(), it then says on exit that 2 devices not closed, and then the same crashes. While when all code in place, it says that 1 device not closed and the same crashes.

ptitSeb commented 3 years ago

There is only on alcOpenDevice(...) in the code: Code/Libraries/Audio/src/openalaudiosystem.cpp line 21. Add a printf there, to check how many time it's called?

kas1e commented 3 years ago

Strange, putting print there I only see it 1 time. But commenting out the whole free function, I got from alc_cleanup: 2 devices not closed. Probably somehow related to openal i use.. will ask the author of port about.

Maybe now better check why this one https://github.com/ptitSeb/Eldritch/issues/6 happen?

kas1e commented 3 years ago

PS. Tried the other version of openal (some older port) and it didn't show that crash. So chances are high that it's a bug in our fresh openal port, let the ticket be open for the meantime anyway

ptitSeb commented 3 years ago

Yeah, I don't think Eldritch is the culprit here, not for OpenAL stuff.