hiker {l Wrote}:Just to be sure: if you replay the history (use --history on the command line, in the directory where the (uncompressed) history.dat file is) - do you see the effect (note that the camera might be a bit messed up when the rescue happens)? I don't (neither windows nor linux).
When I replay the history file (wow, I didn't know that was possible

) I do see the bug too. However instead of the flickering behaviour, the kart is just displayed upside down and stays that way. See this screenshot:
http://db.tt/TQfNXGyB. I suppose that happens because the history file contains rounded values for the kart coordinates? (Just guessing...)
hiker {l Wrote}:If you see the problem, can you apply the following patch:
[...]
After applying the patch and recompiling, I tried to set the breakpoint using gdb as you described, but gdb returns
- {l Code}: {l Select All Code}
(gdb) break kart.cpp:1019
No symbol table is loaded. Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n])
I didn't know how to fix this, so instead I directed the output to a file:
- {l Code}: {l Select All Code}
bin/supertuxkart --history > stklog
and opened the resulting file in a text editor. This is the relevant part:
- {l Code}: {l Select All Code}
Rot: 0.000000 0.736886 0.000000 0.676017
Rot: 0.000000 0.736886 0.000000 0.676017
Rot: 0.000000 0.736886 0.000000 0.676017
Rot: 0.000000 0.736886 0.000000 0.676017
Rot: 0.000000 0.707107 0.000000 0.707107
Rot: 0.000000 0.707107 0.000000 0.707107
Rot: 0.000000 0.707107 0.000000 0.707107
Rot: 0.000000 0.707107 0.000000 0.707107
Afterwards, all lines printed are exactly the same (until
Replay finished). There are thus no minus signs here.
I tried replacing in history.day all occurrences of -0.000000 by 0.000000, but that unfortunately doesn't change anything, nor in the appearance (the kart is still upside-down), nor in the output.
I decided to experiment further with the history.dat file. For reference, consider this line from the original file:
- {l Code}: {l Select All Code}
0.000000 0.000000 0 70.625000 -0.990000 100.000000 0.000000 0.707107 0.000000 0.707107
Replacing all occurences of 0.707107 with 0.707000 (or any other value) also didn't change anything. For example the line would become:
- {l Code}: {l Select All Code}
0.000000 0.000000 0 70.625000 -0.990000 100.000000 0.000000 0.707000 0.000000 0.707000
But when I replaced all end-of-line occurences of 0.707107 by 0.707106 (so this only applied to the numbers in the 10th column, not in the 8th column), the problem didn't appear anymore. For example:
- {l Code}: {l Select All Code}
0.000000 0.000000 0 70.625000 -0.990000 100.000000 0.000000 0.707107 0.000000 0.707106
Replacing only
non-end-of-line instances of 0.707107 by 0.707106 also prevented the bug from happening.
- {l Code}: {l Select All Code}
0.000000 0.000000 0 70.625000 -0.990000 100.000000 0.000000 0.707106 0.000000 0.707107
I tried (from the original file) replacing the 0.000000 in the 7th column by 0.000001, and that also fixed the graphical problems.
- {l Code}: {l Select All Code}
0.000000 0.000000 0 70.625000 -0.990000 100.000000 0.000001 0.707107 0.000000 0.707107
Finally I tried (from the original file) replacing the 0.000000 in the 9th column by 0.000001, and that also fixed the bug.
- {l Code}: {l Select All Code}
0.000000 0.000000 0 70.625000 -0.990000 100.000000 0.000000 0.707107 0.000001 0.707107
Summary:
- {l Code}: {l Select All Code}
Bug triggered by:
0.000000 0.000000 0 70.625000 -0.990000 100.000000 0.000000 0.707107 0.000000 0.707107 // the original line
0.000000 0.000000 0 70.625000 -0.990000 100.000000 0.000000 0.707000 0.000000 0.707000 // 8th and 10th column changed to the same value
Bug not triggered by:
0.000000 0.000000 0 70.625000 -0.990000 100.000000 0.000000 0.707106 0.000000 0.707107 // 8th column changed
0.000000 0.000000 0 70.625000 -0.990000 100.000000 0.000000 0.707107 0.000000 0.707106 // 10th column changed
0.000000 0.000000 0 70.625000 -0.990000 100.000000 0.000001 0.707107 0.000000 0.707107 // 7th column changed
0.000000 0.000000 0 70.625000 -0.990000 100.000000 0.000000 0.707107 0.000001 0.707107 // 9th column changed
So it seems something goes wrong when the 7th column and the 9th column contain exactly 0.000000, and the 8th and the 10th column contain exactly the same value. I don't however know what these columns contain (quaternion rotation or something?) so I have no clue about how this could happen...
Sorry for the long post, but I hope it helps finding the cause of this strange behaviour
