WHDLoad MantisBT - WHDLoad
View Issue Details
0003355WHDLoad[All Projects] Generalpublic2016-01-14 07:522017-04-10 10:13
Assigned ToWepl 
PlatformOSOS Version
Product Version18.2 
Target Version18.3Fixed in Version18.3 
ChipMem2 MB
FastMem0 MB
WorkbenchOS 3.0
KickROM40 - Kick 3.1
Summary0003355: Broken saving/logging/dumping if slave is on read-only disk.
DescriptionIf game slave is run from read-only medium (7z archive in my case), then saving, dumping and logging will fail even if SavePath and CoreDumpPath options are set to writable locations on different disk (mapped directory on host).
No problems creating or editing files in SavePath/CoreDumpPath from shell, however.
TagsNo tags attached.
Attached Files

2016-01-17 14:28   
Please explain this more detailed.
Does WHDLoad an error message?
2016-01-17 14:36   
<j2348513@trbvm.com>: does not like recipient.
Remote host said: 550 5.1.1 <j2348513@trbvm.com>: Recipient address rejected: User unknown in virtual alias table
Giving up on
2016-01-18 01:16   
No error messages, game continues to work as if nothing happened. For example, as soon as I press Return after entering save name in Cannon Fodder, screen instantly fades back to save menu without visible disk activity and load game menu is empty afterwards.
If I save in everything-writable scenario, "--<>CannonFodder<>--" directory is created in SavePath (visible on host as "__uae___--__CannonFodder__--"), and then restart with game medium read-only, the game can load existing saves but can't rewrite them or create new ones.
(Sorry for 10minutemail.com)
2016-01-18 20:55   
You are right. That's the way it is currently implemented.
WHDLoad checks at startup if the data directory is read-only and if it is all write operations are disabled.
Please check http://whdload.de/whdload/whd183.lha .
I have disabled the read-only-check if SavePath is active.
2016-01-19 10:38   
Games can save now, thank you.
I guess logging/dumping functions better be left as-is.
2016-01-25 13:28   
Not sure if it's within this ticket's scope, but after finishing a game in Nuclear War I get a following popup (using the executable you provided):

DOS-Error #214
(disk is write protected)
on deleting "HighScores"

At that moment the only "HighScores" file (which is part of stock distribution) was in "Data" subdir inside the archive I run the game from. If I delete the file from archive and then play to the end, there's no error and highscores are saved to SaveDir, so it appears that scores are updated by deleting and rewriting the file from scratch.
PS: If no record was made during play, highscores are recreated with contents identical to stock file.

Implementation of some sort of database to keep track of "deleted" or "moved" files would help with this, but probably will clutter up the code too much for single complex non-amiga-ish use case.
2016-01-25 21:59   
This should only happen if the SaveDir was not created before.

Deletes cannot be implemented in a clear way together with the SavePath feature.
Currently (see autodocs) WHDLoad will try to delete in the first data directory. But the SavePath is only the first data directory if it exists already at startup or after creation by WHDLoad which is performed at the first write operation.

But thanks for the report, it is a bug that WHDLoad tries to delete in the non SavePath.
I have fixed it now. It now silently ignores the Delete if SavePath is used and SavePath is not yet created.
Please try http://whdload.de/whdload/whd183.lha

Besides that the game should not delete a file for rewriting it because this will cause WHDLoad to switch to the operating system. So please make also a report for the game to have the Delete removed.
2016-02-06 05:59   
Several errors pop up when saving things in Worms DC.
When saving teams, happens even if no edits were made:
    DOS-Error #203
    (object already exists)
    on writing "TWTEAMS/BJORN".

If "CLEAR TEAMS" was used before saving teams:
    DOS-Error #205
    (object not found)
    on deleting "TWTEAMS/BJORN".

When attempting to save options as "DEFAULT" (overwriting default option file):
    DOS-Error #205
    (object not found)
    on deleting "TWOPTIONS/DEFAULT.OPT".

Here's directory tree with installed game, just in case: http://pastebin.com/vtk03J9y
BTW, can't find NuclearWar in projects dropdown list.
2016-02-09 23:48   
Which WHDLoad version did you use?

2016-02-10 02:30   
WHDLoad 18.3.5741 (25.01.2016) and WormsDC install 1.2 (21.08.2011).

2016-02-11 22:17   
The third case is clear, the game tries to delete a file which is not in the savepath.
I can't reproduce case 1 and 2.
Please use option FileLog and attach the resulting .whdl_log here.
2016-02-11 23:01   
(Last edited: 2016-02-14 12:37)
Case 1: http://pastebin.com/gs9g7Le8
Case 2: http://pastebin.com/iTB5qxiv

EDIT: Updated 2nd link, pasted first log into it incidentally. Also just found out that clear-then-save error is reproducible only after doing the 1st case, in result of which "TWTEAMS\ANDY" file is created in SaveDir.

2016-02-14 17:56   
I still can't reproduce case 1/2.
Make a coredump in case 1 and attach the .whdl_register here.
Don't use pastebin, attach it to this issue.
2016-07-06 00:50   
Please try new beta at http://whdload.de/whdload/whd183.lha
This should fix all the mentioned problems.

Issue History
2016-01-14 07:52arisklapachiNew Issue
2016-01-17 14:13WeplAssigned To => Wepl
2016-01-17 14:13WeplStatusnew => assigned
2016-01-17 14:28WeplNote Added: 0004798
2016-01-17 14:28WeplStatusassigned => feedback
2016-01-17 14:36WeplNote Added: 0004799
2016-01-18 01:16arisklapachiNote Added: 0004804
2016-01-18 01:16arisklapachiStatusfeedback => assigned
2016-01-18 20:55WeplNote Added: 0004805
2016-01-18 20:56WeplProduct Version18.0 => 18.2
2016-01-18 20:59WeplFixed in Version => 18.3beta
2016-01-18 20:59WeplTarget Version => 18.3
2016-01-19 10:38arisklapachiNote Added: 0004806
2016-01-25 13:28arisklapachiNote Added: 0004820
2016-01-25 21:59WeplNote Added: 0004821
2016-02-06 05:59arisklapachiNote Added: 0004830
2016-02-09 23:48WeplNote Added: 0004851
2016-02-09 23:48WeplNote Edited: 0004851bug_revision_view_page.php?bugnote_id=4851#r741
2016-02-10 02:30arisklapachiNote Added: 0004852
2016-02-10 02:30arisklapachiNote Edited: 0004852bug_revision_view_page.php?bugnote_id=4852#r743
2016-02-11 22:17WeplNote Added: 0004853
2016-02-11 23:01arisklapachiNote Added: 0004854
2016-02-11 23:46arisklapachiNote Edited: 0004854bug_revision_view_page.php?bugnote_id=4854#r745
2016-02-14 12:37arisklapachiNote Edited: 0004854bug_revision_view_page.php?bugnote_id=4854#r746
2016-02-14 17:56WeplNote Added: 0004860
2016-07-06 00:50WeplNote Added: 0005051
2016-11-18 01:38WeplStatusassigned => resolved
2016-11-18 01:38WeplResolutionopen => fixed
2017-04-10 10:13WeplStatusresolved => closed
2017-04-10 10:13WeplFixed in Version18.3beta => 18.3