aureliancnx / R-Type

RType-like game project made by students
https://aureliancnx.github.io/R-Type/
GNU General Public License v3.0
7 stars 1 forks source link

[Bug]: Sylph Transport Crash #193

Closed Chaika9 closed 1 year ago

Chaika9 commented 1 year ago

What happened?

Quand on CTRL+C le Serveur, le Client peu crash.

==49410== Invalid read of size 8
==49410==    at 0x4A7B3C: std::_Function_handler<void (KapMirror::Sylph::Connection&), KapMirror::Sylph::Client::connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)::{lambda(KapMirror::Sylph::Connection&)#3}>::_M_invoke(std::_Any_data const&, KapMirror::Sylph::Connection&) (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x4A9893: KapMirror::Sylph::Connection::rawInput(unsigned char*, int) (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x4A7C06: KapMirror::Sylph::Client::tickIncoming() (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x4AF2E4: KapEngine::Component::__fixedUpdate() (Component.cpp:74)
==49410==    by 0x4AF1B0: KapEngine::Component::__update(bool) (Component.cpp:48)
==49410==    by 0x4C9755: KapEngine::GameObject::__update(bool, bool) (GameObject.cpp:53)
==49410==    by 0x4DBA88: KapEngine::SceneManagement::Scene::__updateGameObjects(std::vector<std::shared_ptr<KapEngine::GameObject>, std::allocator<std::shared_ptr<KapEngine::GameObject> > >) (Scene.cpp:397)
==49410==    by 0x4DA53E: KapEngine::SceneManagement::Scene::__update() (Scene.cpp:104)
==49410==    by 0x4DF70C: KapEngine::SceneManagement::SceneManager::__update() (SceneManager.cpp:60)
==49410==    by 0x4C166B: KapEngine::KEngine::run() (Engine.cpp:82)
==49410==    by 0x416009: main (in /home/benjamin/yo/RType/build/RType)```

### What should have happened?

Il ne devrai pas crash.

### Operating System

All

### Ram

32Go

### Graphic Card

RTX 3050

### LOG

```c++
==49410== Invalid read of size 8
==49410==    at 0x4A7B3C: std::_Function_handler<void (KapMirror::Sylph::Connection&), KapMirror::Sylph::Client::connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)::{lambda(KapMirror::Sylph::Connection&)#3}>::_M_invoke(std::_Any_data const&, KapMirror::Sylph::Connection&) (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x4A9893: KapMirror::Sylph::Connection::rawInput(unsigned char*, int) (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x4A7C06: KapMirror::Sylph::Client::tickIncoming() (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x4AF2E4: KapEngine::Component::__fixedUpdate() (Component.cpp:74)
==49410==    by 0x4AF1B0: KapEngine::Component::__update(bool) (Component.cpp:48)
==49410==    by 0x4C9755: KapEngine::GameObject::__update(bool, bool) (GameObject.cpp:53)
==49410==    by 0x4DBA88: KapEngine::SceneManagement::Scene::__updateGameObjects(std::vector<std::shared_ptr<KapEngine::GameObject>, std::allocator<std::shared_ptr<KapEngine::GameObject> > >) (Scene.cpp:397)
==49410==    by 0x4DA53E: KapEngine::SceneManagement::Scene::__update() (Scene.cpp:104)
==49410==    by 0x4DF70C: KapEngine::SceneManagement::SceneManager::__update() (SceneManager.cpp:60)
==49410==    by 0x4C166B: KapEngine::KEngine::run() (Engine.cpp:82)
==49410==    by 0x416009: main (in /home/benjamin/yo/RType/build/RType)
==49410==  Address 0x270ceec8 is 136 bytes inside a block of size 184 free'd
==49410==    at 0x48438DD: operator delete(void*, unsigned long) (vg_replace_malloc.c:935)
==49410==    by 0x4A7B3B: std::_Function_handler<void (KapMirror::Sylph::Connection&), KapMirror::Sylph::Client::connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)::{lambda(KapMirror::Sylph::Connection&)#3}>::_M_invoke(std::_Any_data const&, KapMirror::Sylph::Connection&) (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x4A9893: KapMirror::Sylph::Connection::rawInput(unsigned char*, int) (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x4A7C06: KapMirror::Sylph::Client::tickIncoming() (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x4AF2E4: KapEngine::Component::__fixedUpdate() (Component.cpp:74)
==49410==    by 0x4AF1B0: KapEngine::Component::__update(bool) (Component.cpp:48)
==49410==    by 0x4C9755: KapEngine::GameObject::__update(bool, bool) (GameObject.cpp:53)
==49410==    by 0x4DBA88: KapEngine::SceneManagement::Scene::__updateGameObjects(std::vector<std::shared_ptr<KapEngine::GameObject>, std::allocator<std::shared_ptr<KapEngine::GameObject> > >) (Scene.cpp:397)
==49410==    by 0x4DA53E: KapEngine::SceneManagement::Scene::__update() (Scene.cpp:104)
==49410==    by 0x4DF70C: KapEngine::SceneManagement::SceneManager::__update() (SceneManager.cpp:60)
==49410==    by 0x4C166B: KapEngine::KEngine::run() (Engine.cpp:82)
==49410==    by 0x416009: main (in /home/benjamin/yo/RType/build/RType)
==49410==  Block was alloc'd at
==49410==    at 0x4840FF5: operator new(unsigned long) (vg_replace_malloc.c:422)
==49410==    by 0x4A8146: KapMirror::Sylph::Client::connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int) (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x4ADA10: KapMirror::SylphTransport::clientConnect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int) (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x478BE2: KapMirror::NetworkClient::connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int) (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x47ED9A: KapMirror::NetworkManager::startClient() (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x498C49: KapEngine::UI::Button::onMouseStay() (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x4BC6D9: KapEngine::MouseDetector::__callMouses(KapEngine::MouseDetector::HoverType const&) (MouseDetector.cpp:80)
==49410==    by 0x4BC560: KapEngine::MouseDetector::onUpdate() (MouseDetector.cpp:67)
==49410==    by 0x4AF191: KapEngine::Component::__update(bool) (Component.cpp:45)
==49410==    by 0x4C96CB: KapEngine::GameObject::__update(bool, bool) (GameObject.cpp:51)
==49410==    by 0x4C994F: KapEngine::GameObject::__update(bool, bool) (GameObject.cpp:83)
==49410==    by 0x4DBAB5: KapEngine::SceneManagement::Scene::__updateGameObjects(std::vector<std::shared_ptr<KapEngine::GameObject>, std::allocator<std::shared_ptr<KapEngine::GameObject> > >) (Scene.cpp:398)
==49410== 
==49410== Invalid read of size 8
==49410==    at 0x4A7C0B: KapMirror::Sylph::Client::tickIncoming() (in /home/benjamin/yo/RType/build/RType)
==49410==    by 0x518C65F: ???
==49410==    by 0x4AF2E4: KapEngine::Component::__fixedUpdate() (Component.cpp:74)
==49410==    by 0x1FFEFFF44F: ???
==49410==    by 0x1FE3600F: ???
==49410==    by 0x1FFEFFF44F: ???
==49410==    by 0x4AF1B0: KapEngine::Component::__update(bool) (Component.cpp:48)
==49410==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

I read the Code Of Conduct

aureliancnx commented 1 year ago

seems fixed with latest release?

aureliancnx commented 1 year ago

fixed!