Problem with save files on mobile devices
Moderator: ScummVM Team
Problem with save files on mobile devices
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)
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)
Re: Problem with save files on mobile devices
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.
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.
Re: Problem with save files on mobile devices
I've created a report now, thank you for your quick reply!
Re: Problem with save files on mobile devices
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?
Is there anything else I can do?
Re: Problem with save files on mobile devices
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.
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.
Re: Problem with save files on mobile devices
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.
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.
Re: Problem with save files on mobile devices
Hmm... That error message is from the SCUMM engine when loadState function returns not success:
https://github.com/scummvm/scummvm/blob ... .cpp#L2466
https://github.com/scummvm/scummvm/blob ... .cpp#L2466
Re: Problem with save files on mobile devices
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
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
Re: Problem with save files on mobile devices
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
https://github.com/scummvm/scummvm/blob ... d.cpp#L155
Re: Problem with save files on mobile devices
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
https://github.com/scummvm/scummvm/blob ... d.cpp#L595
Re: Problem with save files on mobile devices
I think I would suspect that this is something to do with the SCUMM engine savegame naming code in this case...
Re: Problem with save files on mobile devices
I've never had a warning before the error message on any devicedigitall 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
Re: Problem with save files on mobile devices
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
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
Re: Problem with save files on mobile devices
You mean on PC, right? Because I have no idea how to do that on the Vita.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
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
Re: Problem with save files on mobile devices
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...
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...