entityx icon indicating copy to clipboard operation
entityx copied to clipboard

Strange sigsev on macosx when reach the end of the programm

Open Milerius opened this issue 8 years ago • 2 comments
trafficstars

Hello, i'm not sure but i have a strange bug when i reach the end of my program using entityx.

current context :

The systems are all separate in different DLL, i load them with the function systems.add(shared_ptr) :

capture d ecran 2017-07-09 a 23 22 00

the main game loop :

capture d ecran 2017-07-09 a 23 22 39

creation of entity and assignement of a Components who represents a window :

capture d ecran 2017-07-09 a 23 23 22

update of the Window System : capture d ecran 2017-07-09 a 23 24 13

and this is what happened when i click on the cross of the SFML Window :

capture d ecran 2017-07-09 a 23 25 04

This bug dont seem's to appear on Linux, or Window, only on my macOs, (i tried on Linux this works)

Sorry for my english.

Best regards.

Milerius avatar Jul 09 '17 21:07 Milerius

Have you tried running it through valgrind with memcheck? It will tell you if you overwrite some memory at an earlier point in your code, which could be causing undefined behaviour later on.

For reference: valgrind --tool=memcheck ./<executable>

DomWilliams0 avatar Aug 18 '17 18:08 DomWilliams0

Try calling ett.reset() before you dispose of all the systems (i.e. before the entity manager goes out of scope).

ghost avatar Jan 05 '18 04:01 ghost