View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004309 | Spring engine | General | public | 2014-02-13 01:02 | 2014-02-25 22:38 |
| Reporter | silentwings | Assigned To | abma | ||
| Priority | normal | Severity | crash | Reproducibility | have not tried |
| Status | resolved | Resolution | fixed | ||
| Product Version | 96.0 | ||||
| Target Version | 97.0 | ||||
| Summary | 0004309: crash during game in non-main thread ( [safe_element const] index 1 out of bounds! (size 1) ) | ||||
| Description | see attached infolog | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Checked infolog.txt for Errors | |||||
| related to | 0004319 | resolved | invalid handling of CMD_RECLAIM / BuilderCAI.cpp:1567 |
|
|
translated infolog looks rather odd to me C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x0096F4FE lvm.cpp:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x0096D000 ldo.cpp:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x00BACD08 unwind-sjlj.c:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x0095F2C0 lapi.cpp:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x0096C4DC ldo.cpp:0 C:\\Windows\\syswow64\\msvcrt.dll 0x76E698DA ??:0 C:\\Windows\\syswow64\\msvcrt.dll 0x76E698DA ??:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x0096D173 ldo.cpp:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x00960531 lapi.cpp:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x0095F7BD lapi.cpp:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x00961179 lauxlib.cpp:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x0096249F lbaselib.cpp:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x0096CD45 ldo.cpp:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x009700D2 lvm.cpp:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x0096D000 ldo.cpp:0 C:\\Windows\\SysWOW64\\ntdll.dll 0x77C7015D ??:0 C:\\Windows\\syswow64\\kernel32.dll 0x756E19FC ??:0 C:\\Windows\\syswow64\\kernel32.dll 0x756E41D8 ??:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x00B9D95C thread.cpp:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x00CAA664 /slave/mingwlibs/include/boost/thread/detail/thread.hpp:118 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x00B9C487 thread.cpp:0 C:\\Windows\\SysWOW64\\ntdll.dll 0x77C89F72 ??:0 C:\\Windows\\SysWOW64\\ntdll.dll 0x77C89F45 ??:0 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x008D3369 rts/System/Platform/Win/CrashHandler.cpp:178 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x008D353B rts/System/Platform/Win/CrashHandler.cpp:328 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x007EF459 rts/Sim/Units/CommandAI/MobileCAI.cpp:400 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x007E1638 rts/Sim/Units/CommandAI/CommandAI.cpp:843 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x007E9B0F rts/Sim/Units/CommandAI/MobileCAI.cpp:272 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x007D1130 rts/Sim/Units/CommandAI/BuilderCAI.cpp:467 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x0044F0EB rts/Game/SelectedUnitsHandler.cpp:634 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x005127A3 rts/Net/NetCommands.cpp:675 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x0042F3F9 rts/Game/Game.cpp:983 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x00887CA4 /slave/mingwlibs/include/boost/optional/optional.hpp:438 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x008968A4 rts/System/SpringApp.cpp:1034 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x00872956 rts/System/Main.cpp:65 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x0087376C rts/System/Main.cpp:125 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x0087398D rts/System/Main.cpp:134 C:\\Users\\Nic\\Documents\\My Games\\Spring\\engine\\96.0\\spring.exe 0x00401402 crtexe.c:0 C:\\Windows\\syswow64\\kernel32.dll 0x756E336A ??:0 C:\\Windows\\SysWOW64\\ntdll.dll 0x77C89F72 ??:0 C:\\Windows\\SysWOW64\\ntdll.dll 0x77C89F45 ??:0 |
|
|
related to this i guess: [f=0014243] Error: [safe_element const] index 1 out of bounds! (size 1) |
|
|
demo available? |
|
|
Just a note that the attached infolog corresponds to the game at: http://replays.springrts.com/replay/de08fc526b05775239af0fdd97174d8b/ Be careful in examining the infolog! It contains two different stack traces, one at [f=0007768] and one at [f=0014243]. The first trace is not replicated when playing the uploaded replay (replays.springrts.com). The second trace is replicated using this replay. I have verified this under Linux/64 and with another person running Windows. I don't know how/if the uploaded replay files differ from a player's recording in terms of their unsynced data though. The traces are also very different from each other and from the one silentwings mentions in his mantis note. As I mentioned in my forum post: [http://springrts.com/phpbb/viewtopic.php?f=12&t=31569&p=553966#p553966] the stack traces do not make sense to me. I am at a loss when it comes to interpreting them since they do not follow the call graph as I see it. |
|
|
about the broken stacktrace: very likely the same problem as 0003875 for getting an accurate stacktrace atm gdb is needed |
|
|
I don't think it would be possible to use gdb here because for me no hang/break occured when the stacktraces were generated, and I guess its very unlikely that pausing the replay would leave it paused at the exact right moment. Since the stacktraces likely point to the wrong place (many of those lines point somewhere inside the stacktracing system?), I can't add a breakpoint either. Is there a way around this? I am a VS bunny and not familiar with gcc/gdb... |
|
|
add a breakpoint to CrashHandler::OutputStacktrace() sth. like: break CrashHandler::OutputStacktrace output of gdb isn't broken! |
|
|
silentwings: the second error occurs at [f=0014243] (frame num) in the replay, so try adding this condition to abma's breakpoint. I will also try to do this on my end with gdb. I should also add that the stalling experienced during the game cause the screen to freeze momentarily. After the stall, the simulation has to "catch up" by processing frames at a high rate and updating the screen at a low rate. However, there is no such stall in the replay; only the error message and stack trace appears. |
|
|
thats what i get: (gdb) bt #0 CrashHandler::OutputStacktrace () at rts/System/Platform/Linux/CrashHandler.cpp:592 #1 0x0000000000c95f57 in safe_vector<float>::safe_element (this=0xd405060, idx=1) at rts/System/SafeVector.cpp:19 #2 0x00000000006086e4 in safe_vector<float>::operator[] (this=0xd405060, i=1) at rts/System/SafeVector.h:27 0000003 0x00000000006119e1 in Command::GetPos (this=0xd405058, idx=0) at rts/Sim/Units/CommandAI/Command.h:310 0000004 0x0000000000b93712 in CMobileCAI::ExecuteMove (this=0xa7cdd90, c=...) at rts/Sim/Units/CommandAI/MobileCAI.cpp:431 0000005 0x0000000000b93592 in CMobileCAI::Execute (this=0xa7cdd90) at rts/Sim/Units/CommandAI/MobileCAI.cpp:400 #6 0x0000000000b934e1 in CMobileCAI::SlowUpdate (this=0xa7cdd90) at rts/Sim/Units/CommandAI/MobileCAI.cpp:389 #7 0x0000000000b749ad in CBuilderCAI::SlowUpdate (this=0xa7cdd90) at rts/Sim/Units/CommandAI/BuilderCAI.cpp:506 #8 0x0000000000b81eef in CCommandAI::GiveAllowedCommand (this=0xa7cdd90, c=..., fromSynced=true) at rts/Sim/Units/CommandAI/CommandAI.cpp:843 #9 0x0000000000b92dad in CMobileCAI::GiveCommandReal (this=0xa7cdd90, c=..., fromSynced=false) at rts/Sim/Units/CommandAI/MobileCAI.cpp:272 0000010 0x0000000000b746a3 in CBuilderCAI::GiveCommandReal (this=0xa7cdd90, c=..., fromSynced=false) at rts/Sim/Units/CommandAI/BuilderCAI.cpp:467 #11 0x0000000000b80f2b in CCommandAI::GiveCommand (this=0xa7cdd90, c=..., fromSynced=false) at rts/Sim/Units/CommandAI/CommandAI.cpp:603 0000012 0x0000000000606275 in CSelectedUnitsHandler::AiOrder (this=0x192fe00 <selectedUnitsHandler>, unitid=25408, c=..., playerId=14) at rts/Game/SelectedUnitsHandler.cpp:634 0000013 0x0000000000717425 in CGame::ClientReadNet (this=0x20fb440) at rts/Net/NetCommands.cpp:674 0000014 0x00000000005a2ff7 in CGame::Update (this=0x20fb440) at rts/Game/Game.cpp:981 #15 0x0000000000c8b701 in Threading::UpdateGameController (ac=0x20fb440) at rts/System/Platform/Threading.cpp:389 #16 0x0000000000c9cc02 in SpringApp::Update (this=0x7fffffffe2a0) at rts/System/SpringApp.cpp:961 #17 0x0000000000c9ce4b in SpringApp::Run (this=0x7fffffffe2a0) at rts/System/SpringApp.cpp:1034 #18 0x0000000000c6c51d in Run (argc=2, argv=0x7fffffffe488) at rts/System/Main.cpp:65 #19 0x0000000000c6cd85 in main (argc=2, argv=0x7fffffffe488) at rts/System/Main.cpp:125 |
|
|
move order with only x position set it seems... (gdb) print c.params.size() $25 = 1 (gdb) print c.GetID() $26 = (const int &) @0x7fffffffdf70: 10 |
|
|
imo CCommandAI::AllowedCommand needs to be extended: has to check if c.params.size() == 3 for CMD_MOVE (and maybe others) not sure if this invalid command can be catched sooner. we need some fuzzy-testing maybe (write random data in netcommands and then check if something fails) :) |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2014-02-13 01:02 | silentwings | New Issue | |
| 2014-02-13 01:02 | silentwings | File Added: infolog.txt | |
| 2014-02-13 01:03 | silentwings | Note Added: 0012826 | |
| 2014-02-13 01:30 | abma | Note Added: 0012829 | |
| 2014-02-13 01:30 | abma | Note Added: 0012830 | |
| 2014-02-17 04:27 | MajorBoredom | Note Added: 0012842 | |
| 2014-02-17 04:28 | MajorBoredom | Note Edited: 0012842 | |
| 2014-02-17 04:28 | MajorBoredom | Note Edited: 0012842 | |
| 2014-02-17 09:49 | abma | Note Added: 0012843 | |
| 2014-02-17 09:59 | abma | Summary | crash during game in non-main thread => crash during game in non-main thread ( [safe_element const] index 1 out of bounds! (size 1) ) |
| 2014-02-17 10:00 | abma | Severity | major => crash |
| 2014-02-17 10:04 | silentwings | Note Added: 0012844 | |
| 2014-02-17 10:13 | silentwings | Note Edited: 0012844 | |
| 2014-02-17 10:14 | silentwings | Note Edited: 0012844 | |
| 2014-02-17 11:25 | abma | Note Added: 0012845 | |
| 2014-02-17 11:26 | abma | Note Edited: 0012845 | |
| 2014-02-17 20:23 | MajorBoredom | Note Added: 0012846 | |
| 2014-02-17 20:28 | MajorBoredom | Note Edited: 0012846 | |
| 2014-02-17 20:29 | MajorBoredom | Note Edited: 0012846 | |
| 2014-02-17 20:31 | MajorBoredom | Note Edited: 0012846 | |
| 2014-02-18 02:24 | abma | Note Added: 0012847 | |
| 2014-02-18 02:39 | abma | Note Added: 0012848 | |
| 2014-02-18 02:44 | abma | Note Edited: 0012848 | |
| 2014-02-18 02:47 | abma | Note Added: 0012849 | |
| 2014-02-18 02:48 | abma | Note Edited: 0012849 | |
| 2014-02-18 02:49 | abma | Note Edited: 0012849 | |
| 2014-02-18 02:51 | abma | Target Version | => 97.0 |
| 2014-02-23 16:07 | abma | Changeset attached | => spring develop aabd1b43 |
| 2014-02-23 16:07 | abma | Assigned To | => abma |
| 2014-02-23 16:07 | abma | Status | new => resolved |
| 2014-02-23 16:07 | abma | Resolution | open => fixed |
| 2014-02-25 22:38 | abma | Relationship added | related to 0004319 |