Closed unmacaque closed 5 months ago
I reported this bug a year and a half ago. https://github.com/joncampbell123/dosbox-x/issues/3535#issuecomment-1242416569
Remove or comment out this code and it will work perfectly fine.
//#ifndef WIN32
// fcntl(**(int**)fhandle->opaque,F_SETFL,0);
//#endif
I reported this bug a year and a half ago. #3535 (comment)
Remove or comment out this code and it will work perfectly fine.
//#ifndef WIN32 // fcntl(**(int**)fhandle->opaque,F_SETFL,0); //#endif
That might explain why the crash does not happen here on Linux.
Looking at the physfs code, I have a few questions. If the Windows-specific code is using CreateFileW(), why the hacky fcntl() on file handle typecast from int** pointer? It's unnecessary.
What was the original intent? To clear O_TEXT?
I think it's best to fix this issue by just removing the code.
Now I'm going to pull out my Windows 11 laptop and see if I can mount a ZIP and overlay, and write a file without segfaulting.
Looks good.
Describe the bug
When attempting to save in any game that is started from a ZIP file and using an overlay directory, dosbox-x crashes with a SIGSEGV. The overlay directory will contain 0 byte files named after the files that should have been written.
The attached output log contains a gdb trace.
Used vanilla configuration. Seems to occur regardless of filesystem or tested game.
Steps to reproduce the behaviour
mount C "/home/user/path/to/game.zip"
mount C "/home/user/anotherpath" -t overlay
Expected behavior
Expected dosbox-x to not crash and the save file to be properly written to the overlay dir
What operating system(s) this bug have occurred on?
Arch Linux x86_64
What version(s) of DOSBox-X have this bug?
2024.03.01
Used configuration
No response
Output log
Additional information
When used individually, the ZIP launch and overlay dir features work fine.
Have you checked that no similar bug report(s) exist?
Code of Conduct & Contributing Guidelines