alinebee / Boxer

The DOS game emulator that's fit for your Mac.
http://boxerapp.com/
774 stars 139 forks source link

Boxer hangs forever when importing a game #24

Open alinebee opened 11 years ago

alinebee commented 11 years ago

(Another tracking issue/googlebait for a common Boxer 1.3.2 problem. This has been partially fixed in development versions, and a workaround is documented below for Boxer 1.3.2.)

When importing some games, Boxer's import window appears to take forever to import: the progress bar displays a scrolling stripe animation but no apparent progress is made. Boxer has in fact crashed, and the import will never complete.

This crash is caused by a stray DOSBox .conf file in the game folder, which refers paths that don't exist on your Mac. The workaround: delete all .conf files you find in the game folder, then import the game again.

screen shot 2013-11-22 at 21 15 17


A longer explanation for the curious: if a game comes with its own DOSBox conf file, Boxer will use it as a guide for what emulation settings to use and how the game's drives should be arranged. Normally this is all well and good; but if this conf file contains mount commands that refer to file locations that aren't on your Mac, then Boxer 1.3's import process will get hopelessly confused and crash without telling you.

(The most common culprit is when a careless abandonware distributor includes their own conf file in the game zip, and its mount commands refer to absolute paths on the distributor's own Windows PC: e.g. mount c "c:\bill's files\dosbox stuff\game.iso". Thanks bro.)

Deleting the offending conf file, or removing the mount commands from it, will make Boxer fall back on its regular import behaviour - which will almost always do the right thing anyway.

alinebee commented 11 years ago

I've 'fixed' this crash in development builds, by instead presenting you with an error message telling you to "Please ensure that the resource [missing-path] is available, then retry the import".

This is unhelpful, as the most common cause of this problem is just that the path in the mount command was absolute rather than relative. The file or folder referred to is likely to still exist in the game folder and Boxer could find it by fuzzily matching against the last part of the path instead of the full path.

Even in cases where this fuzzy matching fails, Boxer can 9 times out of 10 do a correct job of importing the game, just by ignoring the conf file's mount commands and using its regular import heuristics instead.

So! I'll improve Boxer's failure recovery strategy by making it first do fuzzy matching to try and find the file, and if that fails letting it fall back on its normal import behavior rather than showing a cryptic error message. Until then, I'll leave this issue open.