quadra-game / quadra

An addictive action puzzle game with single player and multiplayer capabilities (Internet or LAN).
GNU Lesser General Public License v2.1
27 stars 18 forks source link

Game crashes on start #93

Closed pphaneuf closed 10 years ago

pphaneuf commented 10 years ago

What steps will reproduce the problem?

  1. Start Single player game normal or sprint
  2. Click either "start #1", "start #2" or "start #3"
  3. Doesn't matter if quadra is running in window or fullscreen

Trunk compiled with VS08 on Windows XP SP3.

Trace:

quadra_debug.exe!std::_Debug_message(const wchar_t * message=0x00535f10,

const wchar_t * file=0x00535c58, unsigned int line=242) Zeile 24 C++ > quadra_debug.exe!std::list<Net::Net_receive_cb ,std::allocator<Net::Net_receive_cb > >::_Const_iterator<1>::operator++() Zeile 242 + 0x14 Bytes C++ quadra_debug.exe!Net::packetreceived(Net_buf * nb=0x0012cb90, bool tcp=true) Zeile 1305 + 0x64 Bytes C++ quadra_debug.exe!Net::step(bool loop_only=false) Zeile 914 C++ quadra_debug.exe!Net_starter::Net_module::step() Zeile 46 C++ quadra_debug.exe!Executor::step() Zeile 130 C++ quadra_debug.exe!Overmind::step() Zeile 72 C++ quadra_debug.exe!start_game() Zeile 2314 C++ quadra_debug.exe!WinMain(HINSTANCE * hInstance=0x00400000, HINSTANCE

pphaneuf commented 10 years ago

I'll take a look to see if I can reproduce on Linux (and then valgrind it) or Mac OS X.

pphaneuf commented 10 years ago

Issue 99 has been merged into this issue.

pphaneuf commented 10 years ago

0 Net::packetreceived (this=0x8d9800, nb=0xbfffc0f0, tcp=true) at

skelton/common/net.cpp:1306

1 0x00068f9c in Net::step (this=0x8d9800, loop_only=<value temporarily unavailable,

due to optimizations>) at skelton/common/net.cpp:913

2 0x0006aef4 in Executor::step (this=0x279180) at skelton/common/overmind.cpp:127

3 0x0006a970 in Overmind::step (this=0x9de44) at skelton/common/overmind.cpp:71

4 0x00008510 in start_game () at source/quadra.cpp:2313

5 0x000701f4 in SDL_main (ARGC=2, ARGV=0xa00d0) at skelton/svgalib/main.cpp:141

pphaneuf commented 10 years ago

==504== Invalid read of size 4 ==504== at 0x80E6772: std::_List_const_iteratorNet::Net_receive_cb::operator++() (stl_list.h:224) ==504== by 0x80E1747: Net::packetreceived(Netbuf, bool) (net.cpp:1305) ==504== by 0x80E5556: Net::step(bool) (net.cpp:913) ==504== by 0x80AA1EF: Net_starter::Net_module::step() (net_stuff.cpp:45) ==504== by 0x80E93C9: Executor::step() (overmind.cpp:127) ==504== by 0x80E97D1: Overmind::step() (overmind.cpp:71) ==504== by 0x804E886: startgame() (quadra.cpp:2313) ==504== by 0x80EFE8E: main (main.cpp:141) ==504== Address 0x5495340 is 0 bytes inside a block of size 12 free'd ==504== at 0x40222EC: operator delete(void) (vg_replace_malloc.c:342) ==504== by 0x80E716C: __gnu_cxx::new_allocatorstd::_List_node<Net::Net_receive_cb

::deallocate(std::_List_nodeNet::Net_receivecb*, unsigned) (new_allocator.h:97) ==504== by 0x80E7191: std::_List_base<Net::Net_receivecb, std::allocatorNet::Net_receive_cb ::_M_put_node(std::_List_nodeNet::Net_receive_cb_) (stl_list.h:321) ==504== by 0x80E807C: std::list<Net::Net_receivecb, std::allocatorNet::Net_receive_cb ::_M_erase(std::_List_iteratorNet::Net_receive_cb) (stl_list.h:1172) ==504== by 0x80E80AE: std::list<Net::Net_receive_cb, std::allocator<Net::Net_receive_cb> ::erase(std::_List_iteratorNet::Net_receive_cb) (list.tcc:99) ==504== by 0x80E1F36: Net::removewatch(unsigned short, Netcallable) (net.cpp:1008) ==504== by 0x80EAEC0: Exec_ping::netcall(Packet) (packet.cpp:124) ==504== by 0x80E1723: Net::packetreceived(Net_buf, bool) (net.cpp:1309) ==504== by 0x80E5556: Net::step(bool) (net.cpp:913) ==504== by 0x80AA1EF: Net_starter::Net_module::step() (net_stuff.cpp:45) ==504== by 0x80E93C9: Executor::step() (overmind.cpp:127) ==504== by 0x80E97D1: Overmind::step() (overmind.cpp:71)

pphaneuf commented 10 years ago

Valgrind to the rescue, once again. Should be fixed by r719. Can you verify?

pphaneuf commented 10 years ago

Nice, r719 compiles fine and is playable again. (VS08,WinXP)

pphaneuf commented 10 years ago

Awesome, thanks!

pphaneuf commented 10 years ago

Issue 96 has been merged into this issue.