#6678 SCUMM: LOOM Mac - Steam version exits immediately with error()


Steps to reproduce:
1) Purchase and install Loom in Steam if not done already.
2) Once installed right click the Loom entry in your Library and select "Properties". Select "Local Files" and from there "Browse Local Files". In Finder notice the location of the single application bundle called "Loom".
3) Start ScummVM and select "Add Game...". Navigate to folder you saw in the previous step.
4) Notice that if you select the application bundle it will not get recognized by ScummVM.
5) Go back to Finder and right click the Loom application bundle. Select "Show Contents". Copy the "Contents" folder somewhere on your hard drive.
6) Select "Add Game..." again in ScummVM and navigate to the folder where you copied the "Contents" folder.
7) The game gets correctly detected as: ID = loom-steam-mac, Name = Loom (Steam/Machintosh/English), Language = English, Platform = Macintosh.
8) Try to launch the game in ScummVM.
9) Game will not launch, instead error message is displayed: "Cannot find file:'000.lfl'"

ScummVM version:
ScummVM 1.8.0git49-g24595ed (Jul 9 2014 08:11:42)
Features compiled in: TAINTED Vorbis FLAC MP3 SEQ TiMidity RGB zLib MPEG2 Theora FreeType2 JPEG PNG
Mac OSX 10.9.4. 2.3 GHz Intel Core i5, 8 Gt 1333Mhz DDR 3 Memory, Intel HD3000 integrated graphics

Notes: I am not sure how Steam/Mac versions should be added to ScummVM that is why I included rather elaborate steps to reproduce in case it is an user error.


  • Filippos Karapetis

    That is very odd. Can you please provide the name, file size and MD5 hash of your Loom main executable?

    Mine is located in Contents/MacOS/Loom
    Size: 393,572 bytes
    MD5 hash: B4A677BF27C010A747975705108FF1E6

  • Thierry Crozat

    Thierry Crozat - 2014-07-09

    If I follow the steps described here I get the same issue. I am also on MacOS 10.9 and I am using a version compiled from the current branch-1-7 head (aa31d1f).

    File Contents/MacOS/Loom
    Size:393 572 bytes
    MD5: b4a677bf27c010a747975705108ff1e6
    So this is exactly the same ones posted by Filippos.

  • digitall

    digitall - 2014-07-09
    • summary: Loom Mac Steam version gets detected but gives error when trying to play it --> SCUMM: LOOM Mac - Steam version exits immediately with error()
  • Filippos Karapetis

    Could you try with the Windows version, too? You can download it via the Windows Steam client.

    Under Windows, both the Windows and the Mac versions work fine. Reading through the code, I can't find any reason why the game executable isn't accessed properly (which is what this error means). Quite odd.

  • Filippos Karapetis

    digitall: no, only specific versions are packed in container files. In such cases, ALL of the game data files are in the container. Such versions are distinguished via the kGenUnchanged file generation method.

    In the Mac Steam version of Loom, only the main index file (000.lfl) is packed inside the main executable, whereas the rest of the datafiles are not packed. These are distinguished by the kGenDiskNumSteam/kGenRoomNumSteam file generation methods. Thus, there will never be a global container file set in these versions, so the code blocks you pointed at should never be reached in this case.

  • Thierry Crozat

    Thierry Crozat - 2014-07-10

    This fails when calling ScummFile::open("Loom") from ScummSteamFile::openWithSubRange.

    But I got it working. The issue is that you need to have all the files in the same directory, for example copy the Loom executable from MacOS into Resources and then select that directory when adding the game. With the instructions from the original poster, for some reasons selecting the Content directory does detect the game correctly, despite the executable being in a MacOS sub-directory, but then that executable is not found when starting the game.

  • Filippos Karapetis

    @Thierry Crozat: Thanks!

    That means that lines 1052-1055 in scumm.cpp are not working as they should in MacOS:
    SearchMan.addSubDirectoryMatching(gameDataDir, "Contents");
    SearchMan.addSubDirectoryMatching(gameDataDir, "Contents/MacOS");
    SearchMan.addSubDirectoryMatching(gameDataDir, "Contents/Resources");
    SearchMan.addSubDirectoryMatching(gameDataDir, "Contents/Resources/video");

    Does the game work if you copy these out of the if block ("Extra directories needed for the Steam versions") together with the other lines above the if blok?

  • Thierry Crozat

    Thierry Crozat - 2014-07-10

    @Filippos: Those lines work as expected. The issue is that Loom.app does not appear as a directory but appears as an application file on Mac. So you cannot select it when adding a game. Which is why the original bug reporter copied the Contents directory outside of the Loom.app bundle and selected Contents when adding the game. And then there is no "Contents/MacOS" subdirectory in there. Adding the following lines make it work correctly in this configuration:
    SearchMan.addSubDirectoryMatching(gameDataDir, "MacOS");
    SearchMan.addSubDirectoryMatching(gameDataDir, "Resources");
    SearchMan.addSubDirectoryMatching(gameDataDir, "Resources/video");

    An alternative to copying Contents outside the application bundle is to rename the application bundle. If you remove the ".app" from "Loom.app", then it appears as a folder and you can select it when adding the game. And then everything work well with the current code.

  • Thierry Crozat

    Thierry Crozat - 2014-07-10
    • status: open --> closed-fixed
    • assigned_to: Thierry Crozat
  • Thierry Crozat

    Thierry Crozat - 2014-07-10

    I pushed a commit to treat bundles as directories in the OS X file browser. So now we can select Loom.app when adding a game and it all works as expected afterward. So I will close this as fixed.