Can't save game in mac (Wine + GPTk)

Fixed macOS
xldenis [github] · 3 years ago

Issue description

Hi, I know this isn't an officially supported platform but I figured I'd report this issue in case it strikes a bell.

I'm unable to save files when running the game through wine, the logs report an "Unknown error".

X 17:01:56,214 S000025 ~Thr: Failed to write save file.
 ---> IOException: Success : 'C:\users\crossover\AppData\Roaming\Captain of Industry\Saves\lkfkf.save'
  at System.IO.FileSystem.DeleteFile (System.String fullPath) [0x0001a]  
  at System.IO.File.Delete (System.String path) [0x00014]  
  at Mafi.Core.SaveGame.ASyncSaver.doWork (System.Object o, System.ComponentModel.DoWorkEventArgs args) [0x00066]  
X 17:01:56,358 S000025 ~Mai: Exception when checking file size.
 ---> IOException: Unknown error (0x87cb40) : 'C:\users\crossover\AppData\Roaming\Captain of Industry\Saves\lkfkf.save'
  at System.IO.FileSystemInfo.EnsureDataInitialized () [0x00034]  
  at System.IO.FileSystemInfo.get_Attributes () [0x00000]  
  at System.IO.FileInfo.get_Length () [0x00000]  
  at Mafi.Core.SaveGame.SaveManager.sync () [0x0004a]  
I 17:03:26,747 S000031 ~Mai: Requesting game quit.
I 17:03:26,768 S000031 ~Mai: Closing file logging

What's weirder is that the in game error message says "Success".

image

Reproduction steps

  1. Start a game on mac with wine
  2. Save

Game version and build number

v0.5.3c

Operating system

Mac OS

Attachments

23-07-01_18-53-49_4244.log

1 attachment only for registered users
Captain Filip Captain Filip · 3 years ago

Whoa, IOException: Success sounds very strange. However, we have made some improvements to the save code that will be available in the next patch.

xldenis [github] · 3 years ago

I was able to refine the issue yesterday: I can't create new save files, but if the file exists then I can overwrite it. Same goes for blueprints.

Captain Filip Captain Filip · 3 years ago

We've made some changes in v0.5.3e that is currently in experimental, could you test it and let us know?

Captain Filip Captain Filip · 3 years ago

Could you try v0.5.3e and report? If it still does not work, logs from v0.5.3e would be helpful, thanks!

Identifier [github] · 1 year ago

This issue seems to have popped up again. It was able to create the .tmp file, but then DeleteFile threw the IOException with "Success" and the non-tmp file never gets created. It happens both with autosaves and with manual saves.

Failed to save the game!:
An error occurred while moving save file to the final location, but a temporary file can be found at C:\users\crossover\AppData\Roaming\Captain of Industry\Saves\Renewed Foundry\Update 3.tmp.save: Success : 'C:\users\crossover\AppData\Roaming\Captain of Industry\Saves\Renewed Foundry\Update 3.save'

System.IO.IOException: Success : 'C:\users\crossover\AppData\Roaming\Captain of Industry\Saves\Renewed Foundry\Update 3.save'
  at System.IO.FileSystem.DeleteFile (System.String fullPath) [0x0001a] in <e19fb1224222436ca0871ff12e7fb293>:0 
  at System.IO.File.Delete (System.String path) [0x00014] in <e19fb1224222436ca0871ff12e7fb293>:0 
  at Mafi.Core.FileSystemHelper.DeleteFile (System.String filePath) [0x00078] in <893d4badfcb24024bdfdc6aea2a32ce2>:0 
  at Mafi.Core.SaveGame.ASyncSaver.doWork (System.Object _, System.ComponentModel.DoWorkEventArgs __) [0x00174] in <9df539b50b204ac7bb573dab5dd233d4>:0 

Here's how the files end up looking. (I took a 1-year hiatus from the game and just recently started it up again).

Image

Closed as ✅ Fixed

5 Showing 1–8 of 8