alain-bkr / freeciv

Freeciv is a Free and Open Source empire-building strategy game inspired by the history of human civilization. Upstream repository for the standalone Freeciv client and server. Report bugs and submit patches at https://osdn.net/projects/freeciv/ticket/
https://www.freeciv.org/
GNU General Public License v2.0
0 stars 0 forks source link

reproducibility vs save/load #2

Open alain-bkr opened 1 year ago

alain-bkr commented 1 year ago

Errors seemed so far reproducible from a saved games.

Until run05_clang-15/loop.230511-030425/Sz5-Ai004-Lm84-230511_061643.done :

  1. Civil war at turn 301 302 in original game is not reproducible when reloading from 300.
    > 
    Game saved as Sz5-Ai004-Lm84-230511_061643-T0300-auto.sav.xz
    > 
    Game saved as Sz5-Ai004-Lm84-230511_061643-T0301-auto.sav.xz
    > 
    Player 'Kazimierz I Kujawski' now has AI skill level 'Easy'.
    > 
    Game saved as Sz5-Ai004-Lm84-230511_061643-T0302-auto.sav.xz
    >  
    Game saved as Sz5-Ai004-Lm84-230511_061643-T0303-auto.sav.xz
    > 
    Game saved as Sz5-Ai004-Lm84-230511_061643-T0304-auto.sav.xz
    > 
    Game saved as Sz5-Ai004-Lm84-230511_061643-T0305-auto.sav.xz
    > 
    
    Le joueur 'Alaric' a maintenant le niveau IA 'Facile'.
    > ../../../ai/default/daimilitary.c:1795:20: runtime error: signed integer overflow: 100 * 61591104 cannot be represented in type 'int'
    SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../ai/default/daimilitary.c:1795:20 in 

Partie sauvegardée sous Sz5-Ai004-Lm84-230511_061643-T0301-auto.sav.xz

Partie sauvegardée sous Sz5-Ai004-Lm84-230511_061643-T0302-auto.sav.xz

Partie sauvegardée sous Sz5-Ai004-Lm84-230511_061643-T0303-auto.sav.xz ../../common/city.c:2872:21: runtime error: signed integer overflow: -999999960 100 cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../common/city.c:2872:21 in ../../common/city.c:2879:25: runtime error: signed integer overflow: -999999966 100 cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../common/city.c:2879:25 in ../../common/city.c:2886:37: runtime error: signed integer overflow: -999999960 * 100 cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../common/city.c:2886:37 in

Partie sauvegardée sous Sz5-Ai004-Lm84-230511_061643-T0304-auto.sav.xz

Partie sauvegardée sous Sz5-Ai004-Lm84-230511_061643-T0305-auto.sav.xz


3. Save seems to be done during the turn, not at the end

4. save/load is not idem potent