MaFi-Games / Captain-of-Industry-issues

Public issue tracker for Captain of Industry video game
22 stars 4 forks source link

Failed to save the game #539

Closed NEOK80 closed 1 year ago

NEOK80 commented 2 years ago

Issue description

System does not want to save the game anymore. It always comes back with the message that it's either the read/write access of the folder or the firewall settings. Both are in my opinion ok, so I don't know what is wrong... yet I am unable to save my games. Highly frustrating. This work perfectly in the past. It suddenly stopped working when I deleted all the save games from the save folder. (at least I think that was the starting point).

Thanks for having a look, because I can't play your fantastic game anymore :-<

--> UnauthorizedAccessException: Access to the path is denied. at System.IO.File.Move (System.String sourceFileName, System.String destFileName) at Mafi.Core.SaveGame.ASyncSaver.doWork (System.Object o, System.ComponentModel.DoWorkEventArgs args) X 20:18:31,049 S000030 ~Mai: Exception when checking file size ---> FileNotFoundException: Could not find file 'C:\Users\KoenVanAntenhove\Documents\Captain of Industry\Saves\save_22-07-05_22-18-29.save'. at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x000c4] at System.IO.FileInfo.get_Length () [0x0003f] at Mafi.Core.SaveGame.SaveManager.sync () [0x0004a] I 20:19:12,279 S000073 ~Mai: GameSaver: Saving took: 28,1 ms X 20:19:12,305 S000073 ~Thr: Failed to write save file. Please refer to logs. ---> UnauthorizedAccessException: Access to the path is denied. at System.IO.File.Move (System.String sourceFileName, System.String destFileName) at Mafi.Core.SaveGame.ASyncSaver.doWork (System.Object o, System.ComponentModel.DoWorkEventArgs args) X 20:19:12,353 S000073 ~Mai: Exception when checking file size ---> FileNotFoundException: Could not find file 'C:\Users\KoenVanAntenhove\Documents\Captain of Industry\Saves\save_22-07-05_22-19-10.save'. at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x000c4] at System.IO.FileInfo.get_Length () [0x0003f] at Mafi.Core.SaveGame.SaveManager.sync () [0x0004a] W 20:19:18,380 S------ ~Mai: Can not play a disabled audio source I 20:19:18,625 S------ ~Mai: Game was initialized in 1 steps and took 0,244 seconds to complete. I 20:19:20,717 S------ ~Mai: Requesting game quit. W 20:19:20,717 S------ ~Mai: Can not play a disabled audio source I 20:19:20,742 S------ ~Mai: Requesting game quit. I 20:19:20,742 S------ ~Mai: Closing file logging

Expected behavior

system should save the game

Reproduction steps

1/ try to save the game 2/ system throws error.

Game version

latest patch

Attachments

22-07-05_22-17-22_8069.log

I 20:17:22,849 S------ ~Mai: Started logging to file I 20:17:22,878 S------ ~Mai: Started logging to graylog I 20:17:22,880 S------ ~Mai: Unity logging registered I 20:17:22,880 S------ ~Mai: Staring game (standalone) ... I 20:17:22,896 S------ ~Mai: UTC now: 2022/07/05 20:17:22 G 20:17:22,896 S------ ~Mai: Version: 0.4.7b (Early Access) I 20:17:22,898 S------ ~Mai: Current culture: nl-BE I 20:17:22,899 S------ ~Mai: Platform: 2 I 20:17:23,107 S------ ~Mai: Steam client connected I 20:17:23,136 S------ ~Mai: Default language 'English' I 20:17:23,685 S------ ~Mai: Loaded 3 core mods: CoreMod (Mafi.Core.CoreMod) BaseMod (Mafi.Base.BaseMod) UnityMod (Mafi.Unity.UnityMod) I 20:17:23,686 S------ ~Mai: Loading mods from 'K:\SteamLibrary\steamapps\common\Captain of Industry\DLCs'. I 20:17:23,688 S------ ~Mai: Loaded 0 mods (mods loading is disabled). I 20:17:24,568 S------ ~Mai: Game was initialized in 1 steps and took 0,637 seconds to complete. W 20:17:58,046 S------ ~Mai: Can not play a disabled audio source I 20:17:58,144 S------ ~Mai: Configs instantiated: GameDifficultyConfig, StaticIslandMapProviderConfig, IslandMapDifficultyConfig, RandomSeedConfig, TerrainGeneratorConfig, IslandMapGeneratorConfig, CoreModConfig, MaintenanceConfig, BaseModConfig, StartingFactoryConfig, UnityModConfig I 20:18:00,134 S------ ~Mai: [2090 ms] Instantiated mods. I 20:18:00,206 S------ ~Mai: Registered 164 products from assembly 'Mafi.Base'. I 20:18:00,991 S------ ~Mai: [845 ms] Initialized mods. I 20:18:01,188 S------ ~Mai: Sim thread enabled: True I 20:18:01,188 S------ ~Mai: Game ID: 5914913530597618931; Session ID: 3750911858692110061 I 20:18:01,866 S------ ~Mai: [867 ms] Instantiated all dependencies. I 20:18:01,874 S000000 ~Mai: [3,19 ms] NewGameCreated: UnlockedProtosDb I 20:18:01,889 S000000 ~Mai: [4,72 ms] NewGameCreated: PopsHealthManager I 20:18:01,895 S000000 ~Mai: [1,41 ms] NewGameCreated: TerrainManager I 20:18:11,547 S000000 ~Mai: [9650 ms] Terrain generated I 20:18:11,551 S000000 ~Mai: [0,0109 ms] NewGameCreated: SimulationBackgroundTask I 20:18:11,553 S000001 ~Mai: [0,225 ms] NewGameCreated: WorldMapManager I 20:18:11,569 S000001 ~Mai: [0,349 ms] Generating new world map. I 20:18:11,638 S000001 ~Mai: [53,1 ms] World map generated. I 20:18:11,640 S000001 ~Mai: [0,0123 ms] NewGameCreated: OceanTerrainManager I 20:18:13,016 S000001 ~Mai: [1370 ms] Ocean expanded. I 20:18:13,017 S000001 ~Mai: [0,00790 ms] NewGameCreated: VirtualResourceManager I 20:18:13,021 S000001 ~Mai: [3,37 ms] NewGameCreated: EdictsManager I 20:18:13,042 S000001 ~Mai: [6,61 ms] NewGameCreated: MessagesManager I 20:18:13,057 S000001 ~Mai: [5,50 ms] NewGameCreated: StartingFactoryBuilder I 20:18:13,295 S000002 ~Mai: [226 ms] Performing init sim updates: 0, still waiting on: I 20:18:13,296 S000002 ~Mai: [0,361 ms] NewGameInitialized: Calendar I 20:18:13,297 S000002 ~Mai: [0,473 ms] RendererInitState: GameConsoleCommandsExecutor I 20:18:13,337 S000002 ~Mai: Registered 23 console commands. I 20:18:13,337 S000002 ~Mai: [35,1 ms] RendererInitState: CameraController I 20:18:13,339 S000002 ~Mai: [0,844 ms] RendererInitState: WaterRenderer I 20:18:13,652 S000002 ~Mai: [313 ms] RendererInitState: WeatherController I 20:18:13,656 S000002 ~Mai: [2,52 ms] RendererInitState: TreeRenderer I 20:18:13,905 S000002 ~Mai: [248 ms] RendererInitState: TerrainRenderer I 20:18:16,381 S000002 ~Mai: [2470 ms] RendererInitState: IoPortsRenderer I 20:18:16,387 S000002 ~Mai: [4,72 ms] RendererInitState: ConstructionCubesUpdater I 20:18:16,390 S000002 ~Mai: [0,779 ms] RendererInitState: EntitiesRenderer I 20:18:16,452 S000002 ~Mai: [60,9 ms] RendererInitState: TransportedProductsRenderer I 20:18:16,459 S000002 ~Mai: [2,25 ms] RendererInitState: TransportPillarsRenderer I 20:18:16,463 S000002 ~Mai: [1,78 ms] RendererInitState: TerrainDesignationsRenderer I 20:18:16,472 S000002 ~Mai: [0,296 ms] RendererInitState: MineTowerAreasRenderer I 20:18:16,489 S000002 ~Mai: [1,55 ms] RendererInitState: GameUiInstantiator I 20:18:16,512 S000002 ~Mai: [8,38 ms] Resolved 99 UI classes. I 20:18:16,522 S000002 ~Mai: [0,734 ms] Building UI: 1 / 10 I 20:18:16,716 S000002 ~Mai: [178 ms] Building UI: 2 / 10 I 20:18:16,763 S000002 ~Mai: [42,3 ms] Building UI: 3 / 10 I 20:18:17,455 S000002 ~Mai: [690 ms] Building UI: 4 / 10 I 20:18:17,686 S000002 ~Mai: [227 ms] Building UI: 5 / 10 I 20:18:18,019 S000002 ~Mai: [328 ms] Building UI: 6 / 10 I 20:18:18,490 S000002 ~Mai: [467 ms] Building UI: 7 / 10 I 20:18:18,949 S000002 ~Mai: [455 ms] Building UI: 8 / 10 I 20:18:19,724 S000002 ~Mai: [767 ms] Building UI: 9 / 10 I 20:18:20,156 S000002 ~Mai: [425 ms] Building UI: 10 / 10 I 20:18:22,254 S000002 ~Mai: [2090 ms] UI built I 20:18:22,266 S000002 ~Mai: [0,0115 ms] RendererInitState: TreeHarvestingDesignatorRenderer I 20:18:22,272 S000002 ~Mai: [2,44 ms] RendererInitState: GameDateView I 20:18:22,276 S000002 ~Mai: [0,312 ms] RendererInitState: LayoutEntityPreviewManager I 20:18:22,291 S000002 ~Mai: [0,998 ms] RendererInitState: PlanningModeInputController I 20:18:22,307 S000002 ~Mai: [0,152 ms] RendererInitState: NotificationsEntityIconManager I 20:18:22,324 S000002 ~Mai: [0,255 ms] RendererInitState: StaticEntityPauseIconManager I 20:18:22,341 S000002 ~Mai: [1,12 ms] RendererInitState: VehicleDepotWindowViewBase1 I 20:18:22,357 S000002 ~Mai: [0,388 ms] RendererInitState: VehicleDepotWindowViewBase1 I 20:18:22,375 S000002 ~Mai: [0,156 ms] Renderers initialized. I 20:18:24,442 S000003 ~Mai: [2050 ms] Init game step. I 20:18:24,517 S000004 ~Mai: [3,44 ms] Init game step. I 20:18:24,529 S000005 ~Mai: [1,07 ms] Init game step. I 20:18:24,565 S000006 ~Mai: [0,600 ms] Init game step. I 20:18:24,598 S000007 ~Mai: [0,370 ms] Init game step. I 20:18:24,649 S000008 ~Mai: [0,810 ms] Init game step. I 20:18:24,682 S000009 ~Mai: [0,553 ms] Init game step. I 20:18:24,715 S000010 ~Mai: [0,493 ms] Init game step. I 20:18:24,731 S000011 ~Mai: [1,23 ms] Init game step. I 20:18:24,747 S000012 ~Mai: [0,680 ms] Init game step. I 20:18:24,763 S000012 ~Mai: [0,173 ms] Game initialized! I 20:18:24,781 S000012 ~Mai: Game was initialized in 66 steps and took 26,7 seconds to complete. I 20:18:30,934 S000030 ~Mai: GameSaver: Saving took: 649 ms X 20:18:30,979 S000030 ~Thr: Failed to write save file. Please refer to logs. ---> UnauthorizedAccessException: Access to the path is denied. at System.IO.File.Move (System.String sourceFileName, System.String destFileName)
at Mafi.Core.SaveGame.ASyncSaver.doWork (System.Object o, System.ComponentModel.DoWorkEventArgs args)
X 20:18:31,049 S000030 ~Mai: Exception when checking file size ---> FileNotFoundException: Could not find file 'C:\Users\KoenVanAntenhove\Documents\Captain of Industry\Saves\save_22-07-05_22-18-29.save'. at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x000c4]
at System.IO.FileInfo.get_Length () [0x0003f]
at Mafi.Core.SaveGame.SaveManager.sync () [0x0004a]
I 20:19:12,279 S000073 ~Mai: GameSaver: Saving took: 28,1 ms X 20:19:12,305 S000073 ~Thr: Failed to write save file. Please refer to logs. ---> UnauthorizedAccessException: Access to the path is denied. at System.IO.File.Move (System.String sourceFileName, System.String destFileName)
at Mafi.Core.SaveGame.ASyncSaver.doWork (System.Object o, System.ComponentModel.DoWorkEventArgs args)
X 20:19:12,353 S000073 ~Mai: Exception when checking file size ---> FileNotFoundException: Could not find file 'C:\Users\KoenVanAntenhove\Documents\Captain of Industry\Saves\save_22-07-05_22-19-10.save'. at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x000c4]
at System.IO.FileInfo.get_Length () [0x0003f]
at Mafi.Core.SaveGame.SaveManager.sync () [0x0004a]
W 20:19:18,380 S------ ~Mai: Can not play a disabled audio source I 20:19:18,625 S------ ~Mai: Game was initialized in 1 steps and took 0,244 seconds to complete. I 20:19:20,717 S------ ~Mai: Requesting game quit. W 20:19:20,717 S------ ~Mai: Can not play a disabled audio source I 20:19:20,742 S------ ~Mai: Requesting game quit. I 20:19:20,742 S------ ~Mai: Closing file logging

MaFi-Games commented 2 years ago

From the attached logs, there is UnauthorizedAccessException: Access to the path is denied. message. This means that something is blocking the game from writing to C:\Users\KoenVanAntenhove\Documents\Captain of Industry\Saves.

This could be caused by an antivirus, or windows system. Please ensure that the game has access to that folder. Are the files not written at all, can you check contents of C:\Users\KoenVanAntenhove\Documents\Captain of Industry\Saves?