thewierdnut / endless-mobile

Space exploration, trading, and combat game.
https://endless-sky.github.io/
GNU General Public License v3.0
92 stars 6 forks source link

Importing savegame file causes blank screen #91

Closed dcmouyard closed 7 months ago

dcmouyard commented 9 months ago

Is there an existing issue for this?

Describe the bug

I saw the "Export..." and "Import..." buttons in the UI (from #6) and realized I could move savegame files between my phone and laptop. I exported the savegame file and copied it to my laptop, and was able to play that game.

After playing a bit, I then copied a newer savegame file to my phone and tried to import it. It resulted in a blank screen.

I wasn’t sure if the crash was due to how the laptop game saved the file or the mobile app, so I tried exporting a working savegame file on my phone, then tried to import that same file and got the same blank screen.

Phone: Google Pixel 6 Pro Android 13 Endless Sky 0.10.2-37 (via F-Droid)

Laptop: macOS Ventura 13.4.1 Endless Sky 0.10.2 (1)

Steps to Reproduce

  1. Go to Load/Save screen.
  2. Click on 'Export...'
  3. Save file.
  4. Click on 'Import...'
  5. Select file you just saved.
  6. Results in a blank screen.

Expected Behavior

I expected the current game to match the imported savefile.

Screenshots

No response

Link to save file

https://hastebin.skyra.pw/oyehaxayom.rust

Device type

Google Pixel 6 Pro

Game Version

0.10.2-37

Additional Information

No response

thewierdnut commented 9 months ago

I can load your save file without issue.

I'll keep an eye out for this issue with my own gameplay, but otherwise, I won't really be able to make progress unless you know how to use adb to get a log dump from your phone.

YiffLord commented 9 months ago

I have no issues importing/exporting save files, I don't understand how it got to that point.

hgwaz commented 9 months ago

I've also got that issue after moving from PC to android, weirdly it worked before. I moved my save from my phone (Xiaomi Mi10T Lite, Android 12, game 0.10.2-37 android) to my work PC (Windows 11, game version 0.10.2 from github) to my phone, from there to my home PC (Windows 10, game version 0.10.2 from steam) and everything worked. However when i try to transfer it back to my phone now all I'm getting is a black screen.

My save https://drive.google.com/file/d/1tQhac5MMVRthX-HfrFSsm2lTX3TEBRGW/view?usp=drivesdk

clawer87 commented 8 months ago

I have this problem regularly. It might have something to do with the number of save states. When I clear app data or delete a few save states, it imports normally.

MonkeyMatrix commented 7 months ago

I found that deleting the imported and/or imported-1 saves allows you to import saves for that pilot again.

thewierdnut commented 7 months ago

I found that deleting the imported and/or imported-1 saves allows you to import saves for that pilot again.

Ah, that explains it. It attempts to created pilot_name~imported.txt, then pilot_name~imported-1.txt, and then it repeatedly checks pilot_name~imported-1.txt over and over again because I forgot to increment the index.

Thanks MonkeyMatrix for finding this.