SWY1985 / CivOne

An open source implementation of Sid Meier's Civilization.
http://www.civone.org/
Creative Commons Zero v1.0 Universal
244 stars 49 forks source link

Nothing happens when trying to load game #384

Closed AlexFolland closed 7 years ago

AlexFolland commented 7 years ago

This is related to https://github.com/SWY1985/CivOne/issues/383. When highlighting any saved game and pressing Enter, nothing happens on the screen. The engine stays in the file selection menu.

-------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
Game Start
Setting Loaded - FullScreen: 0
Setting Loaded - Scale: 4
Setting Loaded - AspectRatio: 0
Setting Loaded - DebugMenu: 1
Setting Loaded - CursorType: 0
Loaded e:\games\civone\data\sp257.pic
Warning: Character width larger than bytes per character. (ID: 95, Width: 9)
Loaded e:\games\civone\data\iconpg2.pic
Loaded e:\games\civone\data\iconpg3.pic
Loaded e:\games\civone\data\iconpg6.pic
Loaded e:\games\civone\data\iconpg5.pic
Loaded e:\games\civone\data\iconpg1.pic
Loaded e:\games\civone\data\iconpg4.pic
Loaded e:\games\civone\data\iconpg8.pic
Loaded e:\games\civone\data\iconpg7.pic
Loaded e:\games\civone\data\citypix2.pic
Loaded e:\games\civone\data\sp299.pic
Loaded e:\games\civone\data\sp257.pic
Warning: Character width larger than bytes per character. (ID: 95, Width: 9)
Loaded e:\games\civone\data\birth0.pic
Loaded e:\games\civone\data\birth1.pic
Loaded e:\games\civone\data\logo.pic
Checking data files...
- Done, all files exist
Checking data files...
- Done, all files exist
Civilopedia: Preloading articles...
Loaded e:\games\civone\data\iconpg4.pic
Loaded e:\games\civone\data\sp299.pic
Loaded e:\games\civone\data\iconpg5.pic
Loaded e:\games\civone\data\iconpg8.pic
Loaded e:\games\civone\data\iconpg6.pic
Loaded e:\games\civone\data\iconpg1.pic
Loaded e:\games\civone\data\iconpg3.pic
Loaded e:\games\civone\data\iconpg2.pic
Credits: "A MICROPROSE PRESENTATION"
Loaded e:\games\civone\data\iconpg7.pic
Loaded e:\games\civone\data\iconpgd.pic
Loaded e:\games\civone\data\iconpgb.pic
Loaded e:\games\civone\data\iconpga.pic
Loaded e:\games\civone\data\iconpga.pic
Loaded e:\games\civone\data\iconpgb.pic
Loaded e:\games\civone\data\iconpge.pic
Loaded e:\games\civone\data\iconpgd.pic
Loaded e:\games\civone\data\iconpgb.pic
Loaded e:\games\civone\data\iconpgc.pic
Loaded e:\games\civone\data\iconpgd.pic
Loaded e:\games\civone\data\iconpgc.pic
Loaded e:\games\civone\data\iconpgc.pic
Loaded e:\games\civone\data\iconpga.pic
Loaded e:\games\civone\data\iconpgb.pic
Loaded e:\games\civone\data\iconpga.pic
Loaded e:\games\civone\data\iconpge.pic
Loaded e:\games\civone\data\iconpge.pic
Loaded e:\games\civone\data\iconpgc.pic
Loaded e:\games\civone\data\iconpgc.pic
Loaded e:\games\civone\data\iconpga.pic
Loaded e:\games\civone\data\iconpgd.pic
Loaded e:\games\civone\data\iconpge.pic
Loaded e:\games\civone\data\iconpgd.pic
Loaded e:\games\civone\data\iconpgb.pic
Loaded e:\games\civone\data\iconpgd.pic
Loaded e:\games\civone\data\iconpgc.pic
Loaded e:\games\civone\data\iconpga.pic
Loaded e:\games\civone\data\iconpgb.pic
Civilopedia: Preloading done!
Main Menu: Load a Saved Game
Load game: Emperor Napoleon, French/1 AD
Map instance created
Map: Loading e:\games\civone\saves\C\CIVIL8.MAP - Random seed: 0
Loaded e:\games\civone\saves\C\CIVIL8.MAP
Map: Placing goody huts
Map: Calculating land value
Map: Ready
Load game: Emperor Napoleon, French/1000 BC
Map: Loading e:\games\civone\saves\C\CIVIL7.MAP - Random seed: 0
Loaded e:\games\civone\saves\C\CIVIL7.MAP
Map: Placing goody huts
Map: Calculating land value
Map: Ready
Load game: Emperor Napoleon, French/1000 BC
Map: Loading e:\games\civone\saves\C\CIVIL7.MAP - Random seed: 0
Loaded e:\games\civone\saves\C\CIVIL7.MAP
Map: Placing goody huts
Map: Calculating land value
Map: Ready
Load game: Emperor Napoleon, French/1000 BC
Map: Loading e:\games\civone\saves\C\CIVIL7.MAP - Random seed: 0
Loaded e:\games\civone\saves\C\CIVIL7.MAP
Map: Placing goody huts
Map: Calculating land value
Map: Ready
Load game: Emperor Napoleon, French/1000 BC
Map: Loading e:\games\civone\saves\C\CIVIL7.MAP - Random seed: 0
Loaded e:\games\civone\saves\C\CIVIL7.MAP
Map: Placing goody huts
Map: Calculating land value
Map: Ready
Load game: Emperor Napoleon, French/2000 BC
Map: Loading e:\games\civone\saves\C\CIVIL6.MAP - Random seed: 0
Loaded e:\games\civone\saves\C\CIVIL6.MAP
Map: Placing goody huts
Map: Calculating land value
Map: Ready
Load game: Emperor Montezuma, Aztecs/3000 BC
Map: Loading e:\games\civone\saves\C\CIVIL5.MAP - Random seed: 7
Loaded e:\games\civone\saves\C\CIVIL5.MAP
Map: Placing goody huts
Map: Calculating land value
Map: Ready
Loaded e:\games\civone\data\slam2.pic
Game instance loaded (difficulty: 4, competition: 1)
- Player 0 is Atilla of the Barbarians
- Player 1 is Stalin of the Russians
Turn 50: 3000 BC
Load game: Prince M.Gandhi, Indians/2480 BC
ERROR: Game instance already exists
Load game: Chief Caesar, Romans/520 AD
ERROR: Game instance already exists
Load game: Chief Caesar, Romans/20 BC
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/320 BC
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/320 BC
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/320 BC
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/320 BC
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/320 BC
ERROR: Game instance already exists
Load game: Emperor Napoleon, French/1 AD
ERROR: Game instance already exists
Load game: Emperor Napoleon, French/1 AD
ERROR: Game instance already exists
Load game: Emperor Napoleon, French/1 AD
ERROR: Game instance already exists
Empty save file, cancel
Main Menu: Load a Saved Game
Load game: Chief Stalin, Russians/1470 AD
ERROR: Game instance already exists
Load game: Emperor Stalin, Russians/760 AD
ERROR: Game instance already exists
Load game: Emperor Stalin, Russians/760 AD
ERROR: Game instance already exists
Load game: Emperor Stalin, Russians/760 AD
ERROR: Game instance already exists
Load game: Emperor Stalin, Russians/760 AD
ERROR: Game instance already exists
Load game: Emperor Stalin, Russians/760 AD
ERROR: Game instance already exists
Load game: Emperor Stalin, Russians/760 AD
ERROR: Game instance already exists
Load game: Emperor Stalin, Russians/760 AD
ERROR: Game instance already exists
Load game: Emperor Stalin, Russians/760 AD
ERROR: Game instance already exists
Cancel
Main Menu: Load a Saved Game
Load game: Chief Stalin, Russians/1 AD
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1000 AD
ERROR: Game instance already exists
Load game: Prince Rico, Russians/1500 AD
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1 AD
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1000 BC
ERROR: Game instance already exists
Load game: Prince Abe Lincoln, Americans/2000 BC
ERROR: Game instance already exists
Load game: Prince Abe Lincoln, Americans/3000 BC
ERROR: Game instance already exists
Load game: Prince Rico, Russians/1974 AD
ERROR: Game instance already exists
Load game: Emperor Peter, Zulus/1600 BC
ERROR: Game instance already exists
Load game: Emperor Ri, Russians/1907 AD
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1470 AD
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1470 AD
ERROR: Game instance already exists
Load game: Prince Abe Lincoln, Americans/2000 BC
ERROR: Game instance already exists
Load game: Prince Abe Lincoln, Americans/2000 BC
ERROR: Game instance already exists
Load game: Prince Abe Lincoln, Americans/2000 BC
ERROR: Game instance already exists
Load game: Prince Abe Lincoln, Americans/2000 BC
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1000 BC
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1000 BC
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1000 BC
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1 AD
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1 AD
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1000 AD
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1000 AD
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1 AD
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1000 AD
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1000 AD
ERROR: Game instance already exists
Load game: Chief Stalin, Russians/1 AD
ERROR: Game instance already exists
Cancel
Main Menu: Start a New Game
ERROR: Map is already loaded/generated
Loaded e:\games\civone\data\birth1.pic
Loaded e:\games\civone\data\birth2.pic
Loaded e:\games\civone\data\birth3.pic
Loaded e:\games\civone\data\birth4.pic
Loaded e:\games\civone\data\birth5.pic
Loaded e:\games\civone\data\birth6.pic
Loaded e:\games\civone\data\birth7.pic
Loaded e:\games\civone\data\birth8.pic
Intro: "In the beginning,"
Loaded e:\games\civone\data\diffs.pic
Difficulty: Emperor (toughest)
Competition: 7 Civilizations
Tribe: Zulu
ERROR: Game instance already exists
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at CivOne.Screens.NewGame.HasUpdate(UInt32 gameTick) in e:\games\civone\src\Screens\NewGame.cs:line 197
   at CivOne.Window.<get_HasUpdate>b__24_2(IScreen x) in e:\games\civone\src\Window.cs:line 108
   at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source, Func`2 predicate)
   at CivOne.Window.get_HasUpdate() in e:\games\civone\src\Window.cs:line 108
   at CivOne.Window.OnUpdateFrame(FrameEventArgs args) in e:\games\civone\src\Window.cs:line 318
   at OpenTK.GameWindow.RaiseUpdateFrame(Double elapsed, Double& timestamp)
   at OpenTK.GameWindow.DispatchUpdateAndRenderFrame(Object sender, EventArgs e)
   at OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
   at CivOne.Program.Main(String[] args) in e:\games\civone\src\Program.cs:line 36
SWY1985 commented 7 years ago

I've introduced an issue and since then solved it again, that generated corrupt save games. I will add the corrupt and incorrect file size messages to the Load Game screen.

AlexFolland commented 7 years ago

As you can see in the log, the engine "successfully" loaded a game, which I had saved earlier with the same commit (the latest as of this report), but did not leave the load game screen when it did.

SWY1985 commented 7 years ago

I've added save game error messages to the load game screen, like this: image

When you select the game, you will return to the main menu. Starting a new game or loading another game will work normally after that.