Opened 8 months ago
Closed 7 days ago
#15013 closed defect (outdated)
COMMON: Invalid save path leads to crash/debugger coming up
Reported by: | raziel- | Owned by: | sev- |
---|---|---|---|
Priority: | blocker | Component: | Common |
Version: | Keywords: | timestamps, crash | |
Cc: | Game: |
Description (last modified by )
ScummVM 2.9.0git (Mar 11 2024 21:02:00)
Using SDL backend with SDL 2.30.1
Features compiled in: Vorbis MP3 RGB zLib MPEG2 MikMod Theora VPX AAC A/52 FreeType2 FriBiDi JPEG PNG GIF cloud (servers, local) ENet SDL2 TinyGL OpenGL (with shaders)
Having a missing or invalid savepath set leads to a crash and/or the debugger coming up.
Case a:
Windows version
Setting the savepath manually to "H:" (a partition that doesn't exist) will bring up the debugger (on starting the game), telling me
ERROR: Invalid attempt to create file - /saves/goldenwake-prog.agw!
Case b:
AmigaOS version
Leaving the savepath at default (saves/) without actually having such subdirectory (e.g. on a completely fresh start with no .ini file present) will lead to a crash during start of the game, because "timestamps" could not be written (see crashlog)
Maybe the easiest solution would be to silently create the subdirectory the game asks for and move on (maybe with a debug warning about the missing directory)?
A Golden Wake (English)
AmigAOS4 - BE - SDL - PPC
gcc (adtools build 11.3.0) 11.3.0
Attachments (2)
Change History (11)
by , 8 months ago
Attachment: | timestamps crash.txt added |
---|
by , 8 months ago
Attachment: | Crashlog_scummvm_2024-03-11_19-47-47.txt added |
---|
comment:1 by , 8 months ago
comment:2 by , 8 months ago
Description: | modified (diff) |
---|
comment:3 by , 12 days ago
Priority: | normal → blocker |
---|
If these are the defaults, then we must fix this for the 2.9.0 release (at least fix the Packaging for AmigaOS if needed)
comment:4 by , 8 days ago
The crash seems to be a bug in AmigaOS backend.
The DefaultSaveFileManager::saveTimestamps opens the file with the createPath argument set to true.
So, it's expected that the filesystem backend creates the path.
This means there is a bug in the AmigaOS backend.
On Windows, specifying a non-existent drive is not expected to work so there is no way to fix this.
comment:5 by , 7 days ago
I have a clarifying question. How do you set the savepath? When it is done via GUI, then the following code is executed:
`
Common::FSNode dir(browser.getResult());
if (dir.isWritable()) {
_savePath->setLabel(dir.getPath());
} else {
MessageDialog error(_("The chosen directory cannot be written to. Please select another one."));
error.runModal();
return;
`
E.g. the user is presented with a warning if the specified path is not writeable.
If you set it directly in the scummvm.ini, first of all, you are shooting yourself in the foot.
But well, what could be done is that we test that the path is not writeable at start of any engine and error out.
comment:7 by , 7 days ago
I am working with Raziel now on helping to fix the Amiga code. E-mail sent.
comment:8 by , 7 days ago
what did you mean with "shooting yourself in the foot"
is there something obvious wrong in the backend code?
please advise
thank you
comment:9 by , 7 days ago
Owner: | set to |
---|---|
Resolution: | → outdated |
Status: | new → closed |
We found out that the Amiga backend is not crashing anymore and gracefully errors out like it is intended in the code.
Closing as outdated.
added two logs, one is the Grim Reaper log from AmigaOS4, the "timestamps crash.txt" is the serial log, which "may" hold more information.