Problem with save files on mobile devices

Ask for help with ScummVM problems

Moderator: ScummVM Team

Schnida
Posts: 7
Joined: Mon Feb 24, 2020 8:36 am

Problem with save files on mobile devices

Post by Schnida »

I use ScummVM mainly on my PS Vita and so far pretty much everything has worked flawlessly.
I mainly play games from Humongous Entertainment for nostalgia reasons. Those games don't use the ScummVM save/load function because they have an ingame save/load system which worked well so far.

Yesterday I encountered a problem with "Putt Putt Enters the race" (German version!)
When I try to save it this error pops up: "Failed to load saved game from file: puttrace-de-Töff-Töff.sg1". When I enter the save folder there's a file called "puttrace-de-temp.sgS"

Things I figured out:
- The same problem occurs on ScummVM for the 3DS and the PSP, but NOT on Windows
- The english version works fine

This lead me to the conclusion that the Umlaut in Töff-Töff might be the problem. I've tried a few things to work around the problem like copying the PC save file to the PS Vita but the same error message appeared unfortunately.

I used to latest stable version on every device (PSP, 3DS, Vita)
User avatar
criezy
ScummVM Developer
Posts: 950
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Re: Problem with save files on mobile devices

Post by criezy »

I think you may be right about the issue being related to the umlaut in the name.
Can you please create a bug report on https://bugs.scummvm.org/? Bug reports in the forum are easily lost, and also not all developers check the forum.
Schnida
Posts: 7
Joined: Mon Feb 24, 2020 8:36 am

Re: Problem with save files on mobile devices

Post by Schnida »

I've created a report now, thank you for your quick reply!
Schnida
Posts: 7
Joined: Mon Feb 24, 2020 8:36 am

Re: Problem with save files on mobile devices

Post by Schnida »

I really don't want to come across as impatient but it's been 3 months now since I reported this and haven't heard back on bugs.scummvm.org and to my knowledge it hasn't been fixed so far.

Is there anything else I can do?
digitall
ScummVM Developer
Posts: 1172
Joined: Thu Aug 02, 2012 1:40 pm

Re: Problem with save files on mobile devices

Post by digitall »

It would have been helpful to reference the ticket, but I found that here: https://bugs.scummvm.org/ticket/11366

The issue will be finding a developer who has a device to replicate the issue with and is interested to fix this. We are open source and thus you always have the option of looking into this yourself or finding a programmer either paid or otherwise to look at this for you and submit a fix.

I will see if I can spot any likely cause, but this could be specific to PSP / 3DS port load/save code... or could be an issue with SCUMM engine... or could even be in the
libraries of the ports so tricky to work out without more detailed debug information.
Schnida
Posts: 7
Joined: Mon Feb 24, 2020 8:36 am

Re: Problem with save files on mobile devices

Post by Schnida »

Thank you for your reply. Sorry about not referencing the ticket.

I was also able to test in on the Switch by now and the same problem occurs.

So to sum it up, the problem occurs on:
- Nintendo DS
- Nintendo 3DS
- Nintendo Switch
- PSP
- PS Vita

And it doesn't occur on:
- Windows

The problem doesn't occur on any version if I'm using the english version of the game.
digitall
ScummVM Developer
Posts: 1172
Joined: Thu Aug 02, 2012 1:40 pm

Re: Problem with save files on mobile devices

Post by digitall »

Hmm... That error message is from the SCUMM engine when loadState function returns not success:
https://github.com/scummvm/scummvm/blob ... .cpp#L2466
digitall
ScummVM Developer
Posts: 1172
Joined: Thu Aug 02, 2012 1:40 pm

Re: Problem with save files on mobile devices

Post by digitall »

Hmm, the loadState function is here: https://github.com/scummvm/scummvm/blob ... d.cpp#L320

That should emit a warning if it fails in most cases... Is there one before the error message?

I think the only case where it can return false without a warning is when openSaveFileForReading(slot, compat, filename) fails:
https://github.com/scummvm/scummvm/blob ... d.cpp#L324
digitall
ScummVM Developer
Posts: 1172
Joined: Thu Aug 02, 2012 1:40 pm

Re: Problem with save files on mobile devices

Post by digitall »

Right and that is defined here where it just calls openForSaving from the _saveFileMan (Save File Manager) which I think is a platform specific singleton:
https://github.com/scummvm/scummvm/blob ... d.cpp#L155
digitall
ScummVM Developer
Posts: 1172
Joined: Thu Aug 02, 2012 1:40 pm

Re: Problem with save files on mobile devices

Post by digitall »

Hmm I would suspect the issue is either in SaveFileMan when using accented characters or an issue with makeSavefileName i.e.
https://github.com/scummvm/scummvm/blob ... d.cpp#L595
digitall
ScummVM Developer
Posts: 1172
Joined: Thu Aug 02, 2012 1:40 pm

Re: Problem with save files on mobile devices

Post by digitall »

I think I would suspect that this is something to do with the SCUMM engine savegame naming code in this case...
Schnida
Posts: 7
Joined: Mon Feb 24, 2020 8:36 am

Re: Problem with save files on mobile devices

Post by Schnida »

digitall wrote: Sun May 24, 2020 3:43 pm Hmm, the loadState function is here: https://github.com/scummvm/scummvm/blob ... d.cpp#L320

That should emit a warning if it fails in most cases... Is there one before the error message?

I think the only case where it can return false without a warning is when openSaveFileForReading(slot, compat, filename) fails:
https://github.com/scummvm/scummvm/blob ... d.cpp#L324
I've never had a warning before the error message on any device
digitall
ScummVM Developer
Posts: 1172
Joined: Thu Aug 02, 2012 1:40 pm

Re: Problem with save files on mobile devices

Post by digitall »

Hmm... Try running the game with ./scummvm -d 2 or higher.

The issue looks like it might be from the HE code here... as nowhere else would allow .sg1 in the savegame suffix:
https://github.com/scummvm/scummvm/blob ... e.cpp#L172
Schnida
Posts: 7
Joined: Mon Feb 24, 2020 8:36 am

Re: Problem with save files on mobile devices

Post by Schnida »

digitall wrote: Sun May 24, 2020 6:08 pm Hmm... Try running the game with ./scummvm -d 2 or higher.

The issue looks like it might be from the HE code here... as nowhere else would allow .sg1 in the savegame suffix:
https://github.com/scummvm/scummvm/blob ... e.cpp#L172
You mean on PC, right? Because I have no idea how to do that on the Vita.

It shows this on PC when I save

Code: Select all

DEBUG: Saveload now preloaded at 100
o72_readINI: Option SaveGamePath
DEBUG: The recorded SaveLoad directory is *\
o72_createDirectory: *\
Trying to open file '*\test'
convertSavePath in: '*\test'
convertFilePath in: '*\test'
convertFilePath out: 'test'
convertSavePath out: 'puttrace-de-test'
WARNING: DefaultSaveFileManager: failed to open 'timestamps' file to load timestamps!
o72_openFile: slot 1, mode 2
o72_deleteFile(*\test)
convertSavePath in: '*\test'
convertFilePath in: '*\test'
convertFilePath out: 'test'
convertSavePath out: 'puttrace-de-test'
Trying to open file '*\temp.sgS'
convertSavePath in: '*\temp.sgS'
convertFilePath in: '*\temp.sgS'
convertFilePath out: 'temp.sgS'
convertSavePath out: 'puttrace-de-temp.sgS'
convertFilePath in: '*\temp.sgS'
convertFilePath out: 'temp.sgS'
o72_openFile: slot -1, mode 1
Trying to open file '*\temp.sgL'
convertSavePath in: '*\temp.sgL'
convertFilePath in: '*\temp.sgL'
convertFilePath out: 'temp.sgL'
convertSavePath out: 'puttrace-de-temp.sgL'
convertFilePath in: '*\temp.sgL'
convertFilePath out: 'temp.sgL'
o72_openFile: slot -1, mode 1
o72_roomOps: case 221: filename *\temp.sgS
convertSavePath in: '*\temp.sgS'
convertFilePath in: '*\temp.sgS'
convertFilePath out: 'temp.sgS'
convertSavePath out: 'puttrace-de-temp.sgS'
State saved as 'puttrace-de-temp.sgS'
Trying to open file '*\temp.sgS'
convertSavePath in: '*\temp.sgS'
convertFilePath in: '*\temp.sgS'
convertFilePath out: 'temp.sgS'
convertSavePath out: 'puttrace-de-temp.sgS'
o72_openFile: slot 1, mode 1
DEBUG: We're doing a Save.
Trying to open file '*\T÷ff-T÷ff.sg1'
convertSavePath in: '*\T÷ff-T÷ff.sg1'
convertFilePath in: '*\T÷ff-T÷ff.sg1'
convertFilePath out: 'T÷ff-T÷ff.sg1'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg1'
convertFilePath in: '*\T÷ff-T÷ff.sg1'
convertFilePath out: 'T÷ff-T÷ff.sg1'
o72_openFile: slot -1, mode 1
Trying to open file '*\T÷ff-T÷ff.sg2'
convertSavePath in: '*\T÷ff-T÷ff.sg2'
convertFilePath in: '*\T÷ff-T÷ff.sg2'
convertFilePath out: 'T÷ff-T÷ff.sg2'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg2'
convertFilePath in: '*\T÷ff-T÷ff.sg2'
convertFilePath out: 'T÷ff-T÷ff.sg2'
o72_openFile: slot -1, mode 1
Trying to open file '*\T÷ff-T÷ff.sg3'
convertSavePath in: '*\T÷ff-T÷ff.sg3'
convertFilePath in: '*\T÷ff-T÷ff.sg3'
convertFilePath out: 'T÷ff-T÷ff.sg3'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg3'
convertFilePath in: '*\T÷ff-T÷ff.sg3'
convertFilePath out: 'T÷ff-T÷ff.sg3'
o72_openFile: slot -1, mode 1
Trying to open file '*\T÷ff-T÷ff.sg4'
convertSavePath in: '*\T÷ff-T÷ff.sg4'
convertFilePath in: '*\T÷ff-T÷ff.sg4'
convertFilePath out: 'T÷ff-T÷ff.sg4'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg4'
convertFilePath in: '*\T÷ff-T÷ff.sg4'
convertFilePath out: 'T÷ff-T÷ff.sg4'
o72_openFile: slot -1, mode 1
Trying to open file '*\T÷ff-T÷ff.sg5'
convertSavePath in: '*\T÷ff-T÷ff.sg5'
convertFilePath in: '*\T÷ff-T÷ff.sg5'
convertFilePath out: 'T÷ff-T÷ff.sg5'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg5'
convertFilePath in: '*\T÷ff-T÷ff.sg5'
convertFilePath out: 'T÷ff-T÷ff.sg5'
o72_openFile: slot -1, mode 1
Trying to open file '*\T÷ff-T÷ff.sg6'
convertSavePath in: '*\T÷ff-T÷ff.sg6'
convertFilePath in: '*\T÷ff-T÷ff.sg6'
convertFilePath out: 'T÷ff-T÷ff.sg6'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg6'
convertFilePath in: '*\T÷ff-T÷ff.sg6'
convertFilePath out: 'T÷ff-T÷ff.sg6'
o72_openFile: slot -1, mode 1
Trying to open file '*\T÷ff-T÷ff.sg7'
convertSavePath in: '*\T÷ff-T÷ff.sg7'
convertFilePath in: '*\T÷ff-T÷ff.sg7'
convertFilePath out: 'T÷ff-T÷ff.sg7'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg7'
convertFilePath in: '*\T÷ff-T÷ff.sg7'
convertFilePath out: 'T÷ff-T÷ff.sg7'
o72_openFile: slot -1, mode 1
Trying to open file '*\T÷ff-T÷ff.sg8'
convertSavePath in: '*\T÷ff-T÷ff.sg8'
convertFilePath in: '*\T÷ff-T÷ff.sg8'
convertFilePath out: 'T÷ff-T÷ff.sg8'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg8'
convertFilePath in: '*\T÷ff-T÷ff.sg8'
convertFilePath out: 'T÷ff-T÷ff.sg8'
o72_openFile: slot -1, mode 1
Trying to open file '*\T÷ff-T÷ff.sg9'
convertSavePath in: '*\T÷ff-T÷ff.sg9'
convertFilePath in: '*\T÷ff-T÷ff.sg9'
convertFilePath out: 'T÷ff-T÷ff.sg9'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg9'
convertFilePath in: '*\T÷ff-T÷ff.sg9'
convertFilePath out: 'T÷ff-T÷ff.sg9'
o72_openFile: slot -1, mode 1
Trying to open file '*\T÷ff-T÷ff.sga'
convertSavePath in: '*\T÷ff-T÷ff.sga'
convertFilePath in: '*\T÷ff-T÷ff.sga'
convertFilePath out: 'T÷ff-T÷ff.sga'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sga'
convertFilePath in: '*\T÷ff-T÷ff.sga'
convertFilePath out: 'T÷ff-T÷ff.sga'
o72_openFile: slot -1, mode 1
Trying to open file '*\T÷ff-T÷ff.sgb'
convertSavePath in: '*\T÷ff-T÷ff.sgb'
convertFilePath in: '*\T÷ff-T÷ff.sgb'
convertFilePath out: 'T÷ff-T÷ff.sgb'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sgb'
convertFilePath in: '*\T÷ff-T÷ff.sgb'
convertFilePath out: 'T÷ff-T÷ff.sgb'
o72_openFile: slot -1, mode 1
Trying to open file '*\T÷ff-T÷ff.sgc'
convertSavePath in: '*\T÷ff-T÷ff.sgc'
convertFilePath in: '*\T÷ff-T÷ff.sgc'
convertFilePath out: 'T÷ff-T÷ff.sgc'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sgc'
convertFilePath in: '*\T÷ff-T÷ff.sgc'
convertFilePath out: 'T÷ff-T÷ff.sgc'
o72_openFile: slot -1, mode 1
Trying to open file '*\T÷ff-T÷ff.sg0'
convertSavePath in: '*\T÷ff-T÷ff.sg0'
convertFilePath in: '*\T÷ff-T÷ff.sg0'
convertFilePath out: 'T÷ff-T÷ff.sg0'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg0'
convertFilePath in: '*\T÷ff-T÷ff.sg0'
convertFilePath out: 'T÷ff-T÷ff.sg0'
o72_openFile: slot -1, mode 1
DEBUG: Found no file for slot 1. Entering blank in catalog.
DEBUG: Found no file for slot 2. Entering blank in catalog.
DEBUG: Found no file for slot 3. Entering blank in catalog.
DEBUG: Found no file for slot 4. Entering blank in catalog.
DEBUG: Found no file for slot 5. Entering blank in catalog.
DEBUG: Found no file for slot 6. Entering blank in catalog.
DEBUG: Found no file for slot 7. Entering blank in catalog.
DEBUG: Found no file for slot 8. Entering blank in catalog.
DEBUG: Found no file for slot 9. Entering blank in catalog.
DEBUG: Found no file for slot 10. Entering blank in catalog.
DEBUG: Found no file for slot 11. Entering blank in catalog.
DEBUG: Found no file for slot 12. Entering blank in catalog.
DEBUG: playing standard song
DEBUG: playing standard pool song 8022 out of a 27 song pool
DEBUG: Starting new song 8022
DEBUG: box-clicked = 1, number-slot = 12, x,y = 88,136
DEBUG: In drop-room-image-and-get-string, name of save file is *\T÷ff-T÷ff.sg1.
Trying to open file '*\T÷ff-T÷ff.sg1'
convertSavePath in: '*\T÷ff-T÷ff.sg1'
convertFilePath in: '*\T÷ff-T÷ff.sg1'
convertFilePath out: 'T÷ff-T÷ff.sg1'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg1'
convertFilePath in: '*\T÷ff-T÷ff.sg1'
convertFilePath out: 'T÷ff-T÷ff.sg1'
o72_openFile: slot -1, mode 1
o72_rename(*\temp.sgS to *\T÷ff-T÷ff.sg1)
convertSavePath in: '*\T÷ff-T÷ff.sg1'
convertFilePath in: '*\T÷ff-T÷ff.sg1'
convertFilePath out: 'T÷ff-T÷ff.sg1'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg1'
convertSavePath in: '*\temp.sgS'
convertFilePath in: '*\temp.sgS'
convertFilePath out: 'temp.sgS'
convertSavePath out: 'puttrace-de-temp.sgS'
Trying to open file '*\T÷ff-T÷ff.sg0'
convertSavePath in: '*\T÷ff-T÷ff.sg0'
convertFilePath in: '*\T÷ff-T÷ff.sg0'
convertFilePath out: 'T÷ff-T÷ff.sg0'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg0'
o72_openFile: slot 1, mode 2
o72_roomOps: case 221: filename *\T÷ff-T÷ff.sg1
convertSavePath in: '*\T÷ff-T÷ff.sg1'
convertFilePath in: '*\T÷ff-T÷ff.sg1'
convertFilePath out: 'T÷ff-T÷ff.sg1'
convertSavePath out: 'puttrace-de-T÷ff-T÷ff.sg1'
Save version: 99
Saved game MD5: 055ffe4f47753e47594ac67823220c54
State loaded from 'puttrace-de-T÷ff-T÷ff.sg1'
DEBUG: Song finished
DEBUG: playing standard song
DEBUG: playing standard pool song 8010 out of a 27 song pool
DEBUG: Starting new song 8010
Trying to open file '*\temp.sgS'
convertSavePath in: '*\temp.sgS'
convertFilePath in: '*\temp.sgS'
convertFilePath out: 'temp.sgS'
convertSavePath out: 'puttrace-de-temp.sgS'
convertFilePath in: '*\temp.sgS'
convertFilePath out: 'temp.sgS'
o72_openFile: slot -1, mode 1
Trying to open file '*\temp.sgL'
convertSavePath in: '*\temp.sgL'
convertFilePath in: '*\temp.sgL'
convertFilePath out: 'temp.sgL'
convertSavePath out: 'puttrace-de-temp.sgL'
convertFilePath in: '*\temp.sgL'
convertFilePath out: 'temp.sgL'
o72_openFile: slot -1, mode 1
processWizImage: processMode 1
o72_writeINI: Option ISync Value 1335
digitall
ScummVM Developer
Posts: 1172
Joined: Thu Aug 02, 2012 1:40 pm

Re: Problem with save files on mobile devices

Post by digitall »

Thanks... The PC output provides a reference, but it will be necessary to get the output from a failing platform to compare and work out the cause here. This is one of the problems with embedded ports i.e. lack of debug output channels.

Not sure about doing this with Vita: https://wiki.scummvm.org/index.php/Play ... rom_Source
The relevant section of the development wiki is a bit light in terms of various ports giving information on how to get the debug output:
https://wiki.scummvm.org/index.php?titl ... _Debugging

Best to talk to the platform porter for PSP Vita or otherwise about this...
Post Reply