ProjetM1MPRI2013 / central

Repo principal
6 stars 0 forks source link

Segfault event manager #41

Open dbaelde opened 10 years ago

dbaelde commented 10 years ago

Bonjour,

Je suis peut être (de nouveau) le seul à en profiter, mais j'ai assez souvent des segfaults quand je lance le jeu. Je lance simplement, je clique sur join, et ça crashe. Parfois cela crashe mieux si je passe en mode fenetre d'abord.

La backtrace gdb:

#0  __memcmp_sse4_1 () at ../sysdeps/x86_64/multiarch/memcmp-sse4.S:798
#1  0x0000000000425095 in std::__lexicographical_compare<true>::__lc<unsigned char, unsigned char> (
    __first1=0x508bc8e830a00f80 <Address 0x508bc8e830a00f80 out of bounds>, 
    __last1=0x508bc8e830a00f90 <Address 0x508bc8e830a00f90 out of bounds>, 
    __first2=0x7ffffffcc678 "\342\064\341\237\315\063E\204\224{\277\237\352\366\315", <incomplete sequence \335>, __last2=0x7ffffffcc688 "")
    at /usr/include/c++/4.7/bits/stl_algobase.h:901
#2  0x0000000000423e49 in std::__lexicographical_compare_aux<unsigned char const*, unsigned char const*> (
    __first1=0x508bc8e830a00f80 <Address 0x508bc8e830a00f80 out of bounds>, 
    __last1=0x508bc8e830a00f90 <Address 0x508bc8e830a00f90 out of bounds>, 
    __first2=0x7ffffffcc678 "\342\064\341\237\315\063E\204\224{\277\237\352\366\315", <incomplete sequence \335>, __last2=0x7ffffffcc688 "")
    at /usr/include/c++/4.7/bits/stl_algobase.h:921
#3  0x000000000042321a in std::lexicographical_compare<unsigned char const*, unsigned char const*> (
    __first1=0x508bc8e830a00f80 <Address 0x508bc8e830a00f80 out of bounds>, 
    __last1=0x508bc8e830a00f90 <Address 0x508bc8e830a00f90 out of bounds>, 
    __first2=0x7ffffffcc678 "\342\064\341\237\315\063E\204\224{\277\237\352\366\315", <incomplete sequence \335>, __last2=0x7ffffffcc688 "")
    at /usr/include/c++/4.7/bits/stl_algobase.h:1102
#4  0x0000000000422a76 in boost::uuids::operator< (lhs=..., rhs=...)
    at /usr/include/boost/uuid/uuid.hpp:171
#5  0x00000000004335c1 in WithUuidCmp::operator() (this=0x8955a0, lhs=..., rhs=...)
    at src/simulation/withUuid.h:56
#6  0x0000000000436d45 in std::_Rb_tree<std::reference_wrapper<EventSource>, std::pair<std::reference_wrapper<EventSource> const, std::map<std::string, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > > > > > >, std::_Select1st<std::pair<std::reference_wrapper<EventSource> const, std::map<std::string, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > > >
    > > > >, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<EventSource> const, std::map<std::string, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > > > > > > > >::equal_range(std::reference_wrapper<EventSource> const&) (this=0x8955a0, __k=...)
    at /usr/include/c++/4.7/bits/stl_tree.h:1166
#7  0x0000000000434fef in std::_Rb_tree<std::reference_wrapper<EventSource>, std::pair<std::reference_wrapper<EventSource> const, std::map<std::string, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > > > > > >, std::_Select1st<std::pair<std::reference_wrapper<EventSource> const, std::map<std::string, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::alloc---Type <return> to continue, or q <return> to quit---
ator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > > > > > > >, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<EventSource> const, std::map<std::string, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > > > > > > > >::erase(std::reference_wrapper<EventSource> const&) (this=0x8955a0, __x=...)
    at /usr/include/c++/4.7/bits/stl_tree.h:1521
#8  0x0000000000434693 in std::map<std::reference_wrapper<EventSource>, std::map<std::string, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, With---Type <return> to continue, or q <return> to quit---
UuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > > > > >, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<EventSource> const, std::map<std::string, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::map<std::reference_wrapper<GenericEventListener>, std::function<void (boost::any)>, WithUuidCmp, std::allocator<std::pair<std::reference_wrapper<GenericEventListener> const, std::function<void (boost::any)> > > > > > > > > >::erase(std::reference_wrapper<EventSource> const&) (this=0x8955a0, __x=...)
    at /usr/include/c++/4.7/bits/stl_map.h:654
#9  0x000000000043351e in EventManager::remove (source=...)
    at src/simulation/eventManager.cc:59
#10 0x000000000041e712 in EventSource::~EventSource (this=0x7ffffffcc660, 
    __vtt_parm=0x576758, __in_chrg=<optimized out>)
    at src/simulation/eventSource.cc:11
#11 0x0000000000422b5e in Position::~Position (this=0x7ffffffcc660, 
    __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
    at src/simulation/position.h:23
#12 0x000000000044655a in Trajectory::pathfinding (this=0x2e0d270, map=...)
    at src/simulation/trajectory.cc:169
#13 0x0000000000445bfd in Trajectory::setTarget (this=0x2e0d270, target=..., 
    map=...) at src/simulation/trajectory.cc:50
#14 0x000000000042afcb in NPC::setTarget (this=0x2e0d230, t=..., map=...)
    at src/simulation/npc.cc:131
#15 0x0000000000420931 in Simulation::addNPC (this=0x7fffffffdf20, start=..., 
    target=..., speed=1, tex=0xcd4e40) at src/simulation/simulation.cc:140
#16 0x00000000005726d9 in dummy::createNPCs (number=500, simu=..., geo=..., 
    npcGen=...) at src/main.cc:433
#17 0x000000000057091a in clientLoop (id=1, nbPlayers=1, isFullScreen=false, 
    video_mode=..., clientPtr=0xcd3100, seed=..., window=0x7fffffffe4d0)
    at src/main.cc:75
#18 0x0000000000571fa1 in main (argc=1, argv=0x7fffffffe7c8)
    at src/main.cc:331

J'ai toujours g++ 4.7.3, avec boost 1.54. Je n'ai pas spécialement envie d'upgrader tout ça, mais si quelqun pense que ça peut aider je veux bien tester.

J'ai observé des crashes avec ce type de backtrace depuis la version de la deadlline, ie. d3a697db7af4eed4e4ac8eb63c4c7122da777254. Les versions suivantes en février ne semble rien changer. Avec 615acc6ee8c8411a6d9a364e24cc8882810be549 j'ai un crash similaire mais il semble prendre un peu plus de temps avant de se produire (je dois attendre de voir les personnages apparaitre progressivement sur la carte).

Pour l'instant je n'ai vraiment aucune piste.