Comments (20)
Ok, now, when we exit from a game, we have "main.eldritchmastersave" file created in the PROGDIR:.eldritch (the same as prefs.cfg), but now it crashes on exit after doing "shutting down framework", in the ogles2.library, with such stack trace:
ShaderManagerFreeShaders->ShaderProgram->crash in ogles2.library
from eldritch.
Also it crashes now when trying to load "main.eldritchmastersave", in the SaveLoad_MasterDataStream->ColorGradingTexture SimpleSTring->SimpleString
from eldritch.
Probably when it tries to load back "main.eldritchmastersave" it needs to be "byte-swapped" read as well?
from eldritch.
The crash in ogles2.library: I don't see anything suspicious in the code.
from eldritch.
Currently, I just commented out in shadermanagment.cpp:
void ShaderManager::FreeShaders() {
#ifndef __amigaos4__
FOR_EACH_MAP(ProgramIter, m_ShaderPrograms, SShaderProgramKey,
IShaderProgram*) {
SafeDelete(ProgramIter.GetValue());
}
FOR_EACH_MAP(VSIter, m_VertexShaders, HashedString, IVertexShader*) {
SafeDelete(VSIter.GetValue());
}
FOR_EACH_MAP(PSIter, m_PixelShaders, HashedString, IPixelShader*) {
SafeDelete(PSIter.GetValue());
}
#endif
}
So it works, though it brings after a more easy crash: 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"
from eldritch.
Also find out compile error from last commit:
/amiga/Eldritch/code/Libraries/Workbench/src/Components/wbcomptransform.cpp:51:10: error: redeclaration of ‘Vector tmp’
Vector tmp = m_Velocity;
from eldritch.
But you create a GPU memory leak by commenting this code, IIRC the amiga OS doesn't clean leftover stuff automatically.
For openal: all the closing code is here:
Look at Code/Libraries/Audio/src/openalaudiosystem.cpp
from line 42 to 53. The OpenALAudioSystem destructor close the context and the device properly.
from eldritch.
maybe just the alutExit() should be placed just after alcMakeContextCurrent(nullptr)
?
from eldritch.
Yeah, it at least, of course, I just comment it out currently for not crash on exit all the time for better tests until main things done.
As for compile error i change it like:
#if __amigaos4__
Vector tmp = m_Location;
littleBigEndian(&tmp.x);
littleBigEndian(&tmp.y);
littleBigEndian(&tmp.z);
Stream.Write(sizeof(Vector), &tmp);
Vector tmp2 = m_Velocity;
littleBigEndian(&tmp2.x);
littleBigEndian(&tmp2.y);
littleBigEndian(&tmp2.z);
Stream.Write(sizeof(Vector), &tmp2);
#else
Stream.Write(sizeof(Vector), &m_Location);
Stream.Write(sizeof(Vector), &m_Velocity);
#endif
And it compiles ok.
Then another typo:
wbcompeldplayer.cpp:1762:38: error: expected ‘}’ at end of input
Stream.Write(sizeof(Vector), &vtmp);
^
from eldritch.
Also wbcompeldtransform.cpp:
/wbcompeldtransform.cpp:332:20: error: ‘tmp’ was not declared in this scope
littleBigEndian(&tmp.x);
from eldritch.
And:
Components/wbcompeldplayer.cpp:1757: error: unterminated #else
#ifdef __amigaos4__
from eldritch.
wbcompeldtrapbolt.cpp:262:20: error: expected ‘;’ before ‘littleBigEndian’
, forgotten ";"
and then:
/amiga/Eldritch/code/Projects/Eldritch/src/eldritchworld.cpp:2063:24: error: ‘struct SVoxelIrradiance’ has no member named ‘x’
littleBigEndian(&tmp.x);
^
/amiga/Eldritch/code/Projects/Eldritch/src/eldritchworld.cpp:2064:24: error: ‘struct SVoxelIrradiance’ has no member named ‘y’
littleBigEndian(&tmp.y);
^
/amiga/Eldritch/code/Projects/Eldritch/src/eldritchworld.cpp:2065:24: error: ‘struct SVoxelIrradiance’ has no member named ‘z’
littleBigEndian(&tmp.z);
^
/amiga/Eldritch/code/Projects/Eldritch/src/eldritchworld.cpp:2066:24: error: ‘struct SVoxelIrradiance’ has no member named ‘w’
littleBigEndian(&tmp.w);
^
from eldritch.
Yeah, now compiles, through give the same crash when i tries to run game and it loads master-slave file (on the same SimpleString() stuff)
from eldritch.
You probably need to erase the provious state first.
from eldritch.
Yeah, done that of course, still crashes :(
from eldritch.
Will try to rebuild the whole source from scratch from the repo just in case
from eldritch.
Rebuild all from scratch, delete all content from .eldritch directory fully, run game, exit: file creates. Then run the game again and that crash :( And in the console I had that:
S/L: Flushing world files:
Assertion failed: "Iter.ISBalid()" ()
in unknown function in code/Libraries/Core/src/map.h at line 554
Assertion failed: "m_Node" ()
in unknown function in code/Libraries/Core/src/map.h at line 69
from eldritch.
I fixed the saving of HashedString, that may explain all those crashes.
from eldritch.
Thanks! Need to go for a hour, once will back will check everything
from eldritch.
Tested latest commit: yeah! Didn't crashes anymore! Now to understand why it crashes on exit when free shaders and close audio stuff (will create another ticket about)
from eldritch.
Related Issues (10)
- amigaos4 build HOT 244
- Building for GNU/Linux with GLES and no X11, possible? HOT 71
- Is this compatible with version 400+ of the game data? HOT 4
- AmigaOS4 : color issues in the game HOT 7
- AmigaOS4: crash when save preferences file HOT 2
- AmigaOS4 : Crash when trying to change language or resolution and game need to reinit screen HOT 21
- AmigaOS4: crash on exit when free shader's resources and when close audio devices HOT 5
- AmigaOS4 (or general): "Ressurect in Asylum" didn't work HOT 36
- AmigaOS4 (or general): when build with VBO support (by disabling NO_VBO) the person in the Mirror didn't moves HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eldritch.