jmorton06 / Lumos

Cross-Platform C++ 2D/3D game engine
MIT License
1.29k stars 140 forks source link

LumosEditor segfaults #77

Closed Derailedzack closed 3 years ago

Derailedzack commented 3 years ago

Describe the bug A clear and concise description of what the bug is. The lumos editor segfaults in cereal::JSONInputArchive::LoadValue To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error Run the editor Wait for the editor to load the model Expected behavior A clear and concise description of what you expected to happen. Editor shouldn't segfault Screenshots If applicable, add screenshots to help explain your problem.

Thread 1 "LumosEditor" received signal SIGSEGV, Segmentation fault. 0x000055555568dc1c in cereal::JSONInputArchive::loadValue ( this=0x7fffffffd8d0, val=) --Type for more, q to quit, c to continue without paging-- at ../Lumos/External/cereal/include/cereal/archives/json.hpp:649 649 void loadValue(float & val) { search(); val = static_cast(itsIteratorStack.back().value().GetDouble()); ++itsIteratorStack.back(); }

Desktop (please complete the following information):

Derailedzack commented 3 years ago

Is this bug invaild? I'll check back later.When programs crash I debug them.

jmorton06 commented 3 years ago

Thanks. Ill look into it. Might be linux only

Derailedzack commented 3 years ago

I could do some testing on windows.I'm also a developer/programmer. I can confirm that it crashes on windows. devenv_EU9HxQLuhbI did update my drivers since I reported this bug.

jmorton06 commented 3 years ago

Ah okay thanks for checking on windows too. Not sure why it’s crashing. I’ve seen this type of crash when it tries to load an old scene after the saving scene has updated and loads new things

Derailedzack commented 3 years ago

Somehow the one I compiled broke so I had to recompile it. Here's the output from lldb(The clang debugger):

* thread #1, name = 'LumosEditor', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)
    frame #0: 0x000055555568d9c2 LumosEditor`cereal::JSONInputArchive::loadValue(this=0x00007fffffffd400, val=0x0000000000000010) at json.hpp:649:57
   646        //! Loads a value from the current node - uint64 overload
   647        void loadValue(uint64_t & val)    { search(); val = itsIteratorStack.back().value().GetUint64(); ++itsIteratorStack.back(); }
   648        //! Loads a value from the current node - float overload
-> 649        void loadValue(float & val)       { search(); val = static_cast<float>(itsIteratorStack.back().value().GetDouble()); ++itsIteratorStack.back(); }
   650        //! Loads a value from the current node - double overload
   651        void loadValue(double & val)      { search(); val = itsIteratorStack.back().value().GetDouble(); ++itsIteratorStack.back(); }
   652        //! Loads a value from the current node - string overload

It also segfaults in sandbox so I wonder if there is a bug in the lumos library. LumosEditor and Sandbox crashes after loading the scene. I'll try to make a program to test the lumos library.This still occurs even with the newest branch.