Coder Social home page Coder Social logo

Comments (20)

kas1e avatar kas1e commented on July 28, 2024

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.

kas1e avatar kas1e commented on July 28, 2024

Also it crashes now when trying to load "main.eldritchmastersave", in the SaveLoad_MasterDataStream->ColorGradingTexture SimpleSTring->SimpleString

from eldritch.

kas1e avatar kas1e commented on July 28, 2024

Probably when it tries to load back "main.eldritchmastersave" it needs to be "byte-swapped" read as well?

from eldritch.

ptitSeb avatar ptitSeb commented on July 28, 2024

The crash in ogles2.library: I don't see anything suspicious in the code.

from eldritch.

kas1e avatar kas1e commented on July 28, 2024

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.

kas1e avatar kas1e commented on July 28, 2024

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.

ptitSeb avatar ptitSeb commented on July 28, 2024

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.

ptitSeb avatar ptitSeb commented on July 28, 2024

maybe just the alutExit() should be placed just after alcMakeContextCurrent(nullptr)?

from eldritch.

kas1e avatar kas1e commented on July 28, 2024

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.

kas1e avatar kas1e commented on July 28, 2024

Also wbcompeldtransform.cpp:

/wbcompeldtransform.cpp:332:20: error: ‘tmp’ was not declared in this scope
   littleBigEndian(&tmp.x);

from eldritch.

kas1e avatar kas1e commented on July 28, 2024

And:

Components/wbcompeldplayer.cpp:1757: error: unterminated #else
   #ifdef __amigaos4__

from eldritch.

kas1e avatar kas1e commented on July 28, 2024

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.

kas1e avatar kas1e commented on July 28, 2024

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.

ptitSeb avatar ptitSeb commented on July 28, 2024

You probably need to erase the provious state first.

from eldritch.

kas1e avatar kas1e commented on July 28, 2024

Yeah, done that of course, still crashes :(

from eldritch.

kas1e avatar kas1e commented on July 28, 2024

Will try to rebuild the whole source from scratch from the repo just in case

from eldritch.

kas1e avatar kas1e commented on July 28, 2024

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.

ptitSeb avatar ptitSeb commented on July 28, 2024

I fixed the saving of HashedString, that may explain all those crashes.

from eldritch.

kas1e avatar kas1e commented on July 28, 2024

Thanks! Need to go for a hour, once will back will check everything

from eldritch.

kas1e avatar kas1e commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.