C++, Message": "ERRORED! Response received (if any):


#1

I got a weird bug in my C++ bot. (happens randomly).
"Error": {
"Message": "ERRORED! Response received (if any): ",
"Turn": 110

I print turns to a file, it only print 55 turns (where the bot crashed at turn 110 and the game is longer than this)

and here is the timers (first column: turn, ship count, last column: turn time).
0 , ship count: 3 , 0 , 3 , 0 , 0 , 0 , 2 , 0 , 0 , 0 , 6 milliseconds
1 , ship count: 3 , 0 , 3 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 8 milliseconds
2 , ship count: 3 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
3 , ship count: 3 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
4 , ship count: 3 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
5 , ship count: 3 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
6 , ship count: 3 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
7 , ship count: 3 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
8 , ship count: 3 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
9 , ship count: 3 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
10 , ship count: 3 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
11 , ship count: 3 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
12 , ship count: 3 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
13 , ship count: 3 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
14 , ship count: 3 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
15 , ship count: 3 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
16 , ship count: 4 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
17 , ship count: 4 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
18 , ship count: 4 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
19 , ship count: 4 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
20 , ship count: 5 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
21 , ship count: 5 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
22 , ship count: 5 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
23 , ship count: 5 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
24 , ship count: 6 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
25 , ship count: 6 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
26 , ship count: 6 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
27 , ship count: 7 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
28 , ship count: 7 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
29 , ship count: 7 , 0 , 1 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 5 milliseconds
30 , ship count: 8 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
31 , ship count: 8 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
32 , ship count: 8 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
33 , ship count: 9 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
34 , ship count: 9 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
35 , ship count: 9 , 0 , 3 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 7 milliseconds
36 , ship count: 11 , 0 , 3 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
37 , ship count: 11 , 0 , 3 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 7 milliseconds
38 , ship count: 11 , 0 , 3 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 7 milliseconds
39 , ship count: 12 , 0 , 3 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 7 milliseconds
40 , ship count: 12 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
41 , ship count: 12 , 0 , 2 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 6 milliseconds
42 , ship count: 14 , 0 , 3 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 7 milliseconds
43 , ship count: 14 , 0 , 3 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 7 milliseconds
44 , ship count: 14 , 0 , 3 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 7 milliseconds
45 , ship count: 13 , 0 , 3 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 7 milliseconds
46 , ship count: 14 , 0 , 3 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 7 milliseconds
47 , ship count: 14 , 0 , 3 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 7 milliseconds
48 , ship count: 15 , 0 , 4 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 8 milliseconds
49 , ship count: 15 , 0 , 4 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 8 milliseconds
50 , ship count: 16 , 0 , 4 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 8 milliseconds
51 , ship count: 18 , 0 , 4 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 8 milliseconds
52 , ship count: 18 , 0 , 5 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 9 milliseconds
53 , ship count: 18 , 0 , 4 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 9 milliseconds
54 , ship count: 20 , 0 , 5 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 9 milliseconds
55 , ship count: 21 , 0 , 5 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 9 milliseconds


#2

more info, when I uploaded the bot to test online:
"Error": {
"Message": "ERRORED! Got Exception (if any): ERROR: Bot #0: Received invalid character 'terminate called after throwing an instance of 'std::out_of_range'e'. (at character 2.)\nInput received from bot:\nterminate called after throwing an instance of 'std::out_of_range'\n ^; Response received (if any): terminate called after throwing an instance of 'std::out_of_range' what(): Mapbase::at",
"Turn": 80

how to get the crashing line? there is an out of range map (and they are so many), the error is useless without debugging (which I have no idea how to do with this engine, I tried but it didn't work).


#3

NVM, I found the bug.
I debugged in release mode with debug info.