openairlinetycoon / OpenATDeluxe

The open source remake of Airline Tycoon Deluxe
GNU General Public License v3.0
104 stars 13 forks source link

Crash when starting a free game #21

Open Serphentas opened 4 years ago

Serphentas commented 4 years ago

Describe the bug When starting a new game (FREE GAME from the main menu), the game crashes with this error:

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
  at (wrapper managed-to-native) Godot.NativeCalls.godot_icall_2_378(intptr,intptr,intptr,bool)
  at Godot.Node.AddChild (Godot.Node node, System.Boolean legibleUniqueName) [0x00000] in /tmp/build_GodotSharp/GodotSharp/ObjectType/Node.cs:389 
  at RoomManager.ChangeRoom (System.String newRoomName, System.Boolean isAirport) [0x000a2] in /home/xerxes/Documents/coding/OpenATDeluxe/src/RoomManager.cs:77 
  at MainMenu+<>c.<.cctor>b__4_1 () [0x00001] in /home/xerxes/Documents/coding/OpenATDeluxe/src/Menus/MainMenu.cs:17 
  at CharacterItem._GuiInput (Godot.InputEvent e) [0x00035] in /home/xerxes/Documents/coding/OpenATDeluxe/src/CharacterItem.cs:32 

To Reproduce

Expected behavior

Screenshots n/a

Desktop (please complete the following information):

Additional context When forcing a game data import, the following warnings can be seen:

[...]
Error loading!
Error opening file: /home/xerxes/Downloads/Airline Tycoon Deluxe/data/clan.csv - Error FileCantOpen
  at BaseFileDecoder..ctor (System.String _filePath) [0x0002c] in /home/xerxes/Documents/coding/OpenATDeluxe/src/BaseFileDecoder.cs:28 
  at CSVFileDecoder..ctor (System.String _filePath) [0x00000] in /home/xerxes/Documents/coding/OpenATDeluxe/src/CSVFileDecoder.cs:10 
  at ClanCSVFile..ctor (System.String _filePath) [0x00000] in /home/xerxes/Documents/coding/OpenATDeluxe/src/ClanCSVFile.cs:17 
  at ATDGameLoader+<>c.<LoadOtherData>b__23_2 () [0x0000d] in /home/xerxes/Documents/coding/OpenATDeluxe/src/ATDGameLoader.cs:214 
  at ATDGameLoader.TryAction (System.Action action) [0x00002] in /home/xerxes/Documents/coding/OpenATDeluxe/src/ATDGameLoader.cs:178 
Error loading!
Error opening file: /home/xerxes/Downloads/Airline Tycoon Deluxe/data/brick.csv - Error FileCantOpen
  at BaseFileDecoder..ctor (System.String _filePath) [0x0002c] in /home/xerxes/Documents/coding/OpenATDeluxe/src/BaseFileDecoder.cs:28 
  at CSVFileDecoder..ctor (System.String _filePath) [0x00000] in /home/xerxes/Documents/coding/OpenATDeluxe/src/CSVFileDecoder.cs:10 
  at ATDGameLoader+<>c.<LoadOtherData>b__23_3 () [0x0000d] in /home/xerxes/Documents/coding/OpenATDeluxe/src/ATDGameLoader.cs:220 
  at ATDGameLoader.TryAction (System.Action action) [0x00002] in /home/xerxes/Documents/coding/OpenATDeluxe/src/ATDGameLoader.cs:178 
Wrong Texture Size! GFX: ZEIGER01
Wrong Texture Size! GFX: ZEIGER02
Wrong Texture Size! GFX: ZEIGER03
Wrong Texture Size! GFX: ZEIGER04
Wrong Texture Size! GFX: CONSTRUC
[...]

Excerpts from brick.csv and clan.csv (respectively):

Id;Beschreibung;RAM-Priority;opaque;Triggered;Layer;Speed;FloorDist;BaseX;BaseY;GridX;GridY;MinY;MaxY;Obstacle;TGA-Name
5000;Horizont1a;3;1;0;3;0;0;20;-18;88;1;132;132;0;BACK_A1
5001;Horizont1b;3;1;0;3;0;0;20;-18;88;1;132;132;0;BACK_A2
5002;Horizont2;4;1;0;3;0;0;20;-18;88;1;0;0;0;BACK_B
[...]
Typ;Group;Comment;Update;W'keit;Speed;Faktor;Koffer;Gimmik beim laufen oder Gimmick OffsetX;Gimmick beim warten oder Gimmick OffsetX;OffsetX;OffsetY;Palette;Norden;...;Anz;Osten;...;Anz;S<FC>den;...;Anz;Westen;...;Anz;Rennen: Norden;;Anz;Rennen: Osten;;Anz;Rennen: S<FC>den;;Anz;Rennen: Westen;;Anz;Gimmick;Anz;Winken;Anz;SitzenN;Anz;SitzenS;Anz;Stehen;Stehgimmick;Anz
10;-;Schwester Anne;0;100;3;3;-1;3;3;0;0;SCHW_PAL.LBM;SCHW_N01;SCHW_N01;3;SCHW_O01 SCHW_O02 SCHW_O03 SCHW_O04;SCHW_O01;6;SCHW_S01 SCHW_S02 SCHW_S03 SCHW_S04;SCHW_S01;3;SCHW_W01 SCHW_W02 SCHW_W03 SCHW_W04;SCHW_W01;6;SCHW_N01;SCHW_N01;3;SCHW_O01 SCHW_O02 SCHW_O03 SCHW_O04;SCHW_O01;6;SCHW_S01 SCHW_S02 SCHW_S03 SCHW_S04;SCHW_S01;3;SCHW_W01 SCHW_W02 SCHW_W03 SCHW_W04;SCHW_W01;6;SCHW_W03;-1;SCHW_W01;-1;SCHWSITN;-1;SCHWSITS;-1;SCHW_WN SCHW_WO SCHW_WS SCHW_WW;SCHW_WN;-1
-;-;-;-;-;-;-;-;-;-;0;0;-;SH_BIG;SH_BIG;1;SH_BIG;SH_BIG;1;SH_BIG;SH_BIG;1;SH_BIG;SH_BIG;1;SH_BIG;SH_BIG;1;SH_BIG;SH_BIG;1;SH_BIG;SH_BIG;1;SH_BIG;SH_BIG;1;SH_BIG;-1;SH_BIG;-1;SH_BIG;-1;SH_BIG;-1;SH_BIG SH_BIG SH_BIG SH_BIG;SH_BIG;-1
[...]
WizzardMaker commented 4 years ago

Seems like godot can't even open the file. Maybe there is a problem with file permissions?

The problem with the airport not starting is because it probably can't find the character files, but that is hard to find the exact reason for the Null exception, because a Godot bug prevents proper stack traces when loading a scene