Skip to content
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

[Runtime Issue]: v1.5 macOS ARM release does not have the executable set on the Descent3 binary #532

Open
13 of 20 tasks
Kreeblah opened this issue Aug 17, 2024 · 8 comments
Open
13 of 20 tasks
Labels
bug Something isn't working

Comments

@Kreeblah
Copy link
Contributor

Build Version

v1.5

Operating System Environment

  • Microsoft Windows (32-bit)
  • Microsoft Windows (64-bit)
  • Mac OS X
  • Linux (specify distribution and version below)

CPU Environment

  • x86 (32-bit Intel/AMD)
  • x86_64 (64-bit Intel/AMD)
  • ARM (32-bit)
  • ARM64 (64-bit; sometimes called AArch64)
  • Other (RISC V, PPC...)

Game Modes Affected

  • Single player
  • Anarchy
  • Hyper-Anarchy
  • Robo-Anarchy
  • Team Anarchy
  • Capture the Flag
  • Bounty
  • Entropy
  • Hoard
  • Monsterball
  • Cooperative

Game Environment

No response

Description

I downloaded a copy of the macOS ARM release of v1.5, and noticed that it refused to run. Trying to run the app bundle gave me an error in the GUI that said it couldn't be opened, and if I tried to open it in the terminal, I got this:

The application cannot be opened for an unexpected reason, error=Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600002e78120 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}

Looking into it, it seems that the Descent3 binary doesn't have the executable bit set, and instead has permissions set to 644 when extracted from the ZIP file.

Regression Status

No response

Steps to Reproduce

No response

@Kreeblah Kreeblah added the bug Something isn't working label Aug 17, 2024
@Lgt2x
Copy link
Member

Lgt2x commented Aug 17, 2024

Hey, thanks for the report! Does running chmod +x ./Descent3.app/Content/MacOS/Descent3 fix the problem?

@Kreeblah
Copy link
Contributor Author

Oh, I should have mentioned this in my report, but it does, for the binary. Running Descent3 directly from the terminal works fine after setting the executable bit on it. I did have to copy my game assets into the MacOS directory alongside the binary (which maybe isn't ideal as opposed to something like using a more standard location in ~/Library/Application Support/Descent3 or some such, but works for this), but it loads and runs fine at that point.

I hadn't actually tried the app bundle until now, though, but for some reason, it quits immediately, even after setting the executable bit on it. I don't see what's wrong with the app bundle, though. CFBundleExecutable in Info.plist seems to be set properly, things seem to be located correctly (the binary's in the right spot, the Info.plist file looks right, etc.).

@Lgt2x
Copy link
Member

Lgt2x commented Aug 17, 2024

The way the game finds game data is very primitive currently, simply looking what's in at the current directory or -setdir argument if set, and exiting if it could not find it. This is less than ideal, but following the usage guide and using a terminal should be enough to get the game running. We plan to work on a proper installer with a signed MacOS bundle, and automatically looking for game data location for the next release to improve user experience.

I'll leave this issue open for now, there may be other players confused by this logic until we rework it

@tophyr
Copy link
Contributor

tophyr commented Aug 17, 2024

The way the game finds game data is very primitive currently, simply looking what's in at the current directory or -setdir argument if set

I am actively working on this specifically, and will add more options to set different subdirectories, FWIW. That won't really do much for the overall problem of "must manually put gamedata in appropriate locations" however.

@tophyr
Copy link
Contributor

tophyr commented Aug 17, 2024

but for some reason, it quits immediately, even after setting the executable bit on it

@Kreeblah, try running xattr -c <path/to/Descent3.app> (the overall .app, not just the executable inside it). I had to do this in order to get around a security restriction preventing execution of unsigned apps, but I'm a bit of an odd case. Let us know if that fixes your problem - if it does, I'm not as odd as I thought and we'll need to update the USAGE.md file to include that step.

@Jayman2000
Copy link
Contributor

The way the game finds game data is very primitive currently, simply looking what's in at the current directory or -setdir argument if set

I am actively working on this specifically, and will add more options to set different subdirectories, FWIW. That won't really do much for the overall problem of "must manually put gamedata in appropriate locations" however.

How does what you’re working on compare to #471?

@Kreeblah
Copy link
Contributor Author

but for some reason, it quits immediately, even after setting the executable bit on it

@Kreeblah, try running xattr -c <path/to/Descent3.app> (the overall .app, not just the executable inside it). I had to do this in order to get around a security restriction preventing execution of unsigned apps, but I'm a bit of an odd case. Let us know if that fixes your problem - if it does, I'm not as odd as I thought and we'll need to update the USAGE.md file to include that step.

Unfortunately, that still doesn't let me launch it from the app bundle. I even tried it with -r to clear out the extended attributes recursively, just in case. The symptoms I'm seeing there are different than what I've seen with security restrictions on app bundles in the past, though. The icon quickly appears and disappears in the Dock. If I run the app bundle from the terminal, there's nothing printed, either.

Is it possible that it might not be finding the game assets? I don't recall offhand what the current working directory is when running an app bundle, and I don't know what the behavior is if the app bundle can't find the assets, but based on what happens in the terminal (it just prints an error saying it can't find a file and quits), that's what's making me wonder. I did try copying all the game assets to the Resources directory in the app bundle in case that was the CWD, but, no success there, either.

@Lgt2x
Copy link
Member

Lgt2x commented Aug 18, 2024

Is it possible that it might not be finding the game assets? I don't recall offhand what the current working directory is when running an app bundle, and I don't know what the behavior is if the app bundle can't find the assets, but based on what happens in the terminal (it just prints an error saying it can't find a file and quits), that's what's making me wonder. I did try copying all the game assets to the Resources directory in the app bundle in case that was the CWD, but, no success there, either.

Yes, what's probably happening here is that the assets could not be found. The game closes without any output (which is a problem) My guess would be the CWD is the location of the .app bundle? I recall being able to run the game when .hog files and .app have the same parent folder.

@tophyr @Jayman2000 @winterheart I've opened #534 and #532 so we can discuss a long-term solution there. Please comment here to synchronize with each other. This will be a priority for 1.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants