-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mount zip file doesn't work since version 0.83.23 ? #3535
Comments
I confirm does not work from the moment of introducing these changes #3347. |
The issue seems to be resolved in version 0.84.1. Thanks a lot! |
I have not noticed any improvement. It still does not work.
After undoing these unfortunate code changes #3347, it works. |
Well, that's strange... The issue seems to persist on some programs, and not others... For example, "Elite" in a zip file works, whereas "Elite plus" in a zip file doesn't. |
I have the same issue with an old Dynamix title 'Stellar 7' happy to supply zip if needed. |
I am surprised by the long lack of response to reporting this bug from developers. For those who need this functionality and are able to compile on their own, I suggest undoing these unfortunate changes to the code. |
Hi, I'd also like to confirm that this problem persists. An example to trigger this bug is to use (in DosBox-X) "edit somefile.txt" where "somefile.txt" is a file inside a mounted zip file as drive (with an overlay mount on top of it). DosBox-X will hang while spawning the interrupt 6 error on console as described in this issue. Moreover, I was reviewing merge #3347 and I believe that there is also a mistake made (but I might be wrong): on dos.cpp:line1895 there is now a call to MEM_BlockRead which seems wrong (I think it should be MEM_BlockWrite) as it is the code for 0x3f (File Read) which reads from file (writing) into a memory block. |
Looking forward to seeing this fixed, I'm trying to compile the code with @grapeli patch but it's been a while since I did some basic compiling and things are much more complicated now. The .zip thing has been one of the great things added to DosBox, the ability to enjoy a program or game freely without harm to the original install is ideal for both preserving and running multiple copies of a base install (Say Win 3.1) but with different driver/software combinations as required, any issues occur you can simply delete the overlay directory for that run and start again. With modern systems the speed difference is barely appreciable. |
Just seen this was merged last night and tested with build dosbox-x-vsbuild-win64-20220901051309, My copy of Stellar 7 now plays from inside a regular .zip and my stupidly high compressed .7z without issue. Big thumbs up to @tbr for the fix. 👍😁 |
While this is now fixed, I'm seeing still some issues when combining ZIP/7Z drive mounts with an overlay folder (for writing changes, like save games). So, more debugging is probably advised. |
I |
Seems to work very well! Thanks a lot for the fix. I will test some games to see if i can find issues. |
I think I've found another zip related issue. Z by the Bitmap Bros. Installing from an .iso of my own CD and running it from a mounted folder is fine, however the moment you try to run it from a .zip your get file missing errors on load. I've also tested this using a copy found at Z @ myabandonware it runs just a treat in their browser dosbox version (it unpacks to a directory) and if you download/unpack it to a folder on your own system, however try running their .zip as a mounted drive again gives files errors. |
@NebularNerd Although this is a regression. Works fine to version dosbox-x 0.83.13. The game stopped starting exactly with this code change dc798b5. edit: After restoring an unnecessarily deleted semicolon from drive_physfs.cpp, the game starts correctly from the archive. |
I believe the line 2883 should state: The semicolon fix was correct (or at least makes sense), but the += needs to be =. The fileseek from end calculates position as "file_length" minus the provided "mypos". |
It was certainly not correct.
After undoing this unfortunate commit dc798b5, starts without error. |
@grapeli I tried your Z_DOS_EN.zip with the provided command. On my system, it fails (with or without the unfortunate commit). |
Found another couple that have .zip issues (again likely different from the others). From #2577 the two Holiday Hare versions inside Elkjøp (2).zip both produce the same error. Unpack to a folder, run setup (I used Soundblaster 16 for audio while testing) and both work as they should. Run from the .zip and you get When you exit the game you may get a There is a write overlay set which works as I can save a config file by adjusting the volume via the ingame menu. |
@NebularNerd This version works flawlessly.
|
@grapeli I've been playing heavily with .zip mounting (from way back in the early days when it was announced on VOGONS) so I know there is always going to be some weirdness with a pretend filesystem. As you say it would be awesome if everything just worked, but then there would be no fun in it. |
@NebularNerd You can't really count on using an overlay as this layer is not entirely physfs compatible. I recommend that you read this #3355 bug report carefully. |
@grapeli I use the same method to test each game/program. Download & unpack to a folder / Install from images of my original media, setup, test and patch as needed. Once it's all running as it should, repack to a .7z or .zip then run from a bat file with the following script.
This mounts the .zip plus an overlay for write access, test again, if all works, excellent, the game runs from the .zip and saves/additional files live in the overlay. Where it does not I'm mentioning them here where those with the skills to identify the issues may wish to investigate. As @tbr mentioned, some things do not behave as they should even after the recent commit. As we see in the case of Z, another commit lays behind that issue rather than the initial one that this thread was about. Testing the following using the original files, we see that a change occurred in the code between JAZZ.zip (from #2577) and the later Holiday Hare versions in the Elkjop.zip's that makes them .zip unfriendly. I did not bother running the game in each case, as mentioned further up the jazz.exe's will run and save a config file to the overlay if you tweak the audio volume via the ingame menu, this shows the overlay is setup correctly in all instances, however the setup's in the HH versions produce the errors as shown here and simply do not run. Unlike the Z issue, the jazz.exe's are still playable so it's more of a 'that's weird' rather than a 'it don't work at all'. If you perform the setup then rezip as you state, the game will play with your preferred settings albeit displaying the errors. Personally I will still run from the .zip versions and just ignore the error messages. JAZZ.zip Command.003-1.mp4Elkjop.2.zip Command.001-1.mp4Elkjop.3.zip Command.002-1.mp4Regarding #3355, while this is true it should not prevent the setup.exe from running. The only issue in the case of using these .zip's 'as is' should be that running setup would either give a write error (with no overlay, although in the case of JAZZ.zip if you delete SOUNDCRD.INF from the .zip then mount without the overlay it simply exits without any error) OR the overlay copy of the file is ignored until the copy inside the .zip is replaced or deleted. Ideally the overlay should take preference as @thesnable has raised in #3355 and here icculus/physfs#18, I have also asked about it in the plans for PhyFS 4.0 here icculus/physfs#41 |
@NebularNerd dosbox-x.zip.mount.mp4 |
Cool so it's the same bug that prevents Z running inside a .zip, I wonder what else is out there it fixes... |
An identical segmentation fault occurs when trying to run a Barney Splat.
|
@NebularNerd Circuit Racer (1997).zip I suspect that there may be many more such "cases". edit: Claas - Der Erntespezialist (1996).zip |
Can confirm the Circuit Racer and Claas behave as above. Where do I need to look for the seg faults? Also BarneySplat is a very disturbed 'text adventure' Found one that refuses to play even with the patches, cyberboxdlx.tar.gz from #3090. Unpacked it runs fine, repacked into a .zip, it complains about |
For me, it follows this command that I pasted. Only the first time writing to the overlay directory. Not the next time you run it. Without the fix on mount overlay does not occur. Although she herself does not seem to have any influence on it.
I can confirm. |
I tried placing the |
@NebularNerd This program runs without any problems if you mount the directory with this game in read-only mode and use the overlay mount additionally. Then the attributes of the files in the overlay directory are properly changed.
The game starts. dosbox-x.cyberbox.mount.overlay.mp4 |
Interesting, so that would point to PhyFS being the issue as it works with your test. I copied your method to test WordPerfect 5.0 as that has some weird issues where you cannot save a file when inside a .zip and it produces similar results. Inside a .zip it starts writing a mix of files when you try to save a document but you just get write errors. With your method the file saves just fine. |
Exactly. |
DOOM 2D is a very interesting case. Well, straight from the zip archive it does not start (also with overlay). Even if it started correctly, it would be dramatically slow that this way of starting it is disqualifying. When loading the Sometimes dosbox-x exits with a message - Surprisingly, with the 7z (lzma2) archive, doom2d boots up and it runs quite smoothly. Unpacked and mounted directory in read-only mode does not start. With the help of an additional overlay directory - starts up. |
The .zip copy really has some weird performance issues, I tried using
I also tried repacking the .zip to see if that would help but still the same fault, repacking to .7z (even my crazy solid archive setting) does cure the issue. I also managed to figure the setup options and set to Soundblaster from Adlib, just need to figure out the keys bindings as I can't seem to trigger the door switches. I tested with my own test build and the new autobuild from my PR #3723 (64bit Visual Studio) EDIT |
I added them permanently five days ago. They remove faults without generating new ones. edit: I will summarize the discussion about the semicolon like this. I am not a programmer. You have to move from theory to practice. Test these four examples: The probable reason for removing this semicolon was a warning during compilation, and only it.
It is possible that even tests have not been performed. |
@joncampbell123 looked into the code and found the whole The new versions moving forward will have both the |
Has anyone tried my suggested change to the famous line with the ";"? I believe the line should state: This actually contains two changes: 1) the ; removed and 2) the There is also a reason why putting back the ; in the line makes some programs work. In that case, PHYSFS_fileLength(fhandle) gets added to mypos, and a few lines later the mypos is clipped to maximum PHYSFS_fileLength(fhandle). This means that for any DOS program using this DOS_SEEK_END with offset 0, the file pointer will be set at the end of the file (just as requested). However, if offset is too large, it will not end up at the correct position. If fixing this line still makes certain programs fail, then there is another place in the code that is bugged. |
Then this program does not start. |
@tbr I might run up a build with You mentioned you had some games that were still misbehaving after your PR, were they from the lack of overlay files taking preference over .zip contents (which they now will) or something else? |
@tbr If you are to change += to = then you must delete -mypos. |
Found another while testing games in #2377, Fallout runs fine outside a .zip but once compressed suffers initially very slow loading and then more of less a total lockup when you try to enter the game or load a save. This is the same for a lightly compressed .zip or my ridiculous solid .7z archives. I imagine the 500mb+ zip with two large .dat files (one about 100mb and the other 300mb+) is the issue in this case 🤣 My personal solution to this would be to unpack the game to my Ram drive, mount the unpacked folder read only, use my regular overlay folder and play that way. |
Well. I have mixed observations regarding the built-in support for mounting ZIP/7Z archives as drives. Is it useful? To a limited extent, yes - small or very small archives, without the need to attach floppy disk images, CDs. The built-in dosbox-x overlay doesn't always work well with the mount zip. Sometimes it is completely impossible to run the software from such a mounted archive. Poor compression with zip. Very slow decompression (with physfs). Are there better solutions. There are a lot of possibilities under linux. Other solutions. |
Fuse-zip can be used writable (no need for overlay fs, either linux or dosbox-x). Although with compressed large CD images, this solution may be too slow (even useless). Squashfs does not have this drawback. There, access to data is incredibly fast. Especially with zstd compression. |
I agree, I think PHYSFS is still a great bit of code but as you point out it does have limitations. Looking at a recent pull #3776 it's obvious that fixing things relating to PHYFS likely breaks other things. Maybe in the future when/if a later version of PHYSFS is brought into play some of these issues will be fixed. I enjoy having the ability for games to run from a tidy single file that also keeps my working installs safe and sound. However, I think moving forward I will still use it for some titles, but for larger or tempramental games such as ones we have come across here I'll switch to my other method rather than trying to keep bludgeoning PHYSFS into behaving. Squashfs is certainly an interesting choice, given how well you can run a kernel out of it, a prehistoric game would likely be just fine. Minor downer would be the lack of plug'n'play due to not being able to mount a .zip directly (not an issue for power users just need a script to do zip->squashfs or similar). Any zip based solution such as FUSE will likely suffer similar performance issues due to the whole .zip thing. Also I'm not sure about the writing back to a live .zip, I would worry about something glitching due to a wonky cycles and the whole .zip getting trashed. Overlays are far safer as you can always roll back to the working copy. |
Of course, dosbox-x's built-in solution also has advantages. Simplicity. This solution based on Squashfs + Overlay Filesystem (Linux) is intended for very advanced users. Overlayfs as a normal user can only be mounted with user namespace (from kernel 5.11). |
And of course we would need a Windows friendly version of all this 🙂 Macs and Android users would in theory be able to all play with your example. |
Sample one liner ready. edit: Simplified version.
|
Ah the joys of PHYFS, it appears that post #3776 zip performance has plummeted, I have a beefy machine and zip access on small .zips (100mb or under) was near instantaneous, now there are huge pauses just to get a dir. I think this seals it for me, PHYFS in the bin, I'm going back to my old school method of unpacking to a ram drive, mount as -ro and use an overlay there. My python file automates this for me so it's no more inconvenient than mounting the .zip, just a few extra seconds on startup to unpack the archive first. |
@NebularNerd
The original zip archive file, I shrunk with advancecomp (zopfli). I haven't tested this recent code change, but I don't think it has any significant performance impact. |
Having not looked at this further, I suspect PhysicsFS is being used without buffering enabled. |
Hi @icculus, we'll take a look and see if that helps. Some of the issues are coming from PhysicsFS not being the only file system in town, there are some issues in the source where it has to share with others, someone may fix something which may partial break something else, for example in #3776 a bug that was fixed in relation to PHYSFS breaks something in the regular file handling so had to be undone. @grapeli |
Describe the bug
Programs mounted in zip files don't launch since after version 0.83.23.
Steps to reproduce the behaviour
Mount a zip file as drive c
Try to launch program
Dosbox-x hangs and program doesn't launch
Expected behavior
In version 0.83.23, the program launches.
After this version, dosbox-x seems to hang up with a black screen
What operating system(s) this bug have occurred on?
Windows 10
What version(s) of DOSBox-X have this bug?
Since 0.83.24
Used configuration
mount C "pathtozipfile\file.zip:\" C: cd\ program.exe
Output log
Additional information
No response
Have you checked that no similar bug report(s) exist?
Code of Conduct & Contributing Guidelines
The text was updated successfully, but these errors were encountered: