Conversation
|
This looks like it may be a more widespread issue. Lots of callers aren't checking the return value. I wonder if it's safe to modify |
|
https://github.com/dosbox-staging/dosbox-staging/actions/runs/6711865862/job/18240193833?pr=3076 |
Damn, this looks bad. Definitely worth looking into but not sure if this is within the scope of this PR or even the current release. |
|
Sometimes a minor/patch update to MSVC can make it report more warnings than before. |
Agreed. Best to address this after 0.81.0 is out. Should be fixed, but then this bug hasn't caused major issues so far. |
So what should I do in this case? |
|
I'm not seeing new warnings from this PR, so hopefully it's just a disconnect versus main. @NicknineTheEagle , can you pull and rebase against The last https://github.com/dosbox-staging/dosbox-staging/actions/runs/6707497783/job/18226174137 |
|
This is a useful fix and I think we should try to add it, but the reported testing:
Doesn't report any regression testing using other (previously handled) .BAT files. @NicknineTheEagle -> can you run this PR through a lot more .BAT files and report back? |
3020a5f to
829ec79
Compare
I would if I had any or knew which specific cases to test. Do you have a sample pack? |
Phil's benchmark pack is launched with If you have any of the GNU tools available in WSL, you can use this to list all your batch files and sort them by size: find . -type f -iname '*.bat' -exec du -h {} + | sort -hr | moreHere's Bubble Bobble from eXo's pack. It uses a decently large .BAT file with file copies, config-changes, pause, printing, and three levels of I've tested all audio device choices and confirmed they work. |
|
Also try it with your own cretions to exercise this specific code.
|
|
VS build still fails due to warnings. What the heck is happening? |
|
Hmm.. even compared the logged MSVC versions from the Versus this PR MSVC version (the same 😮💨 ): My only guess is that Microsoft has done other updates that aren't reflected in these versions.. or the code lets the compiler "see" and warn about more stuff. |
This other PR #3078 is also rebases against latest So my hunch is there's something about this change that's revealing more warnings in "adjacent" code. |
|
It's using a newer version of the runner image for this PR (and strangely only this PR, not the 2 that were submitted after this). Compared to main and other active PRs: |
|
Great catch with the runner versions, @weirddan455. GitHub does gradual deployments, so eventually all new CI runs will be moved over to this newer version. @NicknineTheEagle , suggest bumping up the warning limit in your PR, as your changes are not the culprit. |
|
Ran all the suggested batch script tests. No issues noticed. No hangs at the end. |
kcgen
left a comment
There was a problem hiding this comment.
Ok, let's merge this with regression tests confirmed.
Thanks, @NicknineTheEagle.
Description
This fixes a problem in
FileReader::Readwhere it was not properly checking ifDOS_ReadFilehas succeeded or not which, in some cases, caused batch script parser to get stuck in infinite loop.Sample batch script inside archive: d2_19pat.zip
Manual testing
Ran PATCH.BAT from the attached sample. Dosbox hanged at the end of the script without the fix and worked fine with the fix.
Tested benchmark pack from Phil's Computer Lab: https://www.philscomputerlab.com/dos-benchmark-pack.html
Tested RUN.BAT from Bubble Bobble from eXo's pack.
Tested these cases:
No issues noticed.
Checklist
I have: