Open Krumelur opened 2 years ago
That's a pretty weird issue, and I'm not sure what Godot components could have such impact on cross-platform compatibility - aside from Mono itself, if you're using some language features or plugins which create problems on some OSes.
I would suggest trying to make a minimal reproduction project by stripping the project down to the minimum content that triggers this kind of bug. Assuming that you have access to macOS to test and that the bug is reproducible in the main scene, you can remove everything not used in the main scene, then remove stuff used by the main scene one by one to find out what triggers the bug (probably a script, maybe using some kind of threading).
... libmono-native.dylib not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
Seems like macOS export is signed with Hardened runtime
enabled and ad-hoc signature, this is not supported, and prevents some mono libs from loading.
In 4.0
, Hardened runtime
is auto disabled when ad-hoc signature is used (see #56665), ~but this change is not back-ported to 3.x
~ it's also in 3.x, but was added after 3.5 beta 1 release.
You should disable Harderned runtime
in the export options manually or use a proper, Apple issued signature.
@bruvzg Unchecking "hardened runtime" fixed my macOS problem! You're my hero!
I'm using Godot 3.5.2 stable and I had a similar Condition "!tclass" is true. Returned: ManagedType()
error when exporting for Web (no error for Windows and Android). I found I need to change this:
- _tween.TweenProperty(parent, "mouse_filter", MouseFilterEnum.Ignore, 0f);
+ _tween.TweenProperty(parent, "mouse_filter", (int)MouseFilterEnum.Ignore, 0f);
Maybe caused by Mono itself?
Godot version
3.5 beta 1 and 3.4 (stable)
System information
macOS Monterey 12.1 on MacBook Air M1 (8 cores, 16GB RAM)
Issue description
I'm using Godot Mono to build a 2d pixel game. It works fine in the editor and when exporting to Windows (Desktop).
Here's a screenshot of the game running correctly on Windows:
HTML
Exporting to HTML works until the player moves into a new room (click any door) and I can see the following error. Same is true when running the game from the editor, using "Run in browser"
macOS
Exporting to macOS will result in a running app, however the player cannot move around because the whole level is messed up. I can still click the "push" icon in the action bar on the left. It reacts to a click. Means: the game is running but not as expected. It looks as if parts of the code haven't been executed. As I can see two player characters, I assume it never gets to the point where it finishes intializing the game.
Here are logs generated by the game from start until to the point where it's running. I can tell it does still react because the messages about reducing and increasing the framerate when focus is lost and recovered, but that's all it does.
2022-01-30_19.18.38_77400.log godot.log
Steps to reproduce
HTML: Export the game to HTML5 or run from browser. For HTML, click on any door, see the player move into the new room, click once more and the game locks up and the error above pops up in the console.
For macOS, simply start the exported app.
Minimal reproduction project
I can provide a copy of the game on request but don't want to upload the full project here. Please contact me at rene.ruppert@gmail.com or here in this issue and I can send a link to download the project.