-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
App works on Xcode release mode, crashes on Testflight. #48701
Comments
@dunyakilavuz you should be able to examine
into something more readable and can be debugged. Edit: |
@naithar Thanks for the suggestion. I opened up the log file in xcode as you suggested and indeed it was more readable. It seems lines 14 & 15 are the cause of the crash. What's weird is that the app is already started in this state. The loading scene is up and running and the loader script is written in C#. Maybe a script im using in the loaded scene is causing the crash? I wonder why Xcode release won't point out any errors. |
Great, that would help, I guess. I think you can also try setting different optimization levels to see if you can reproduce the issue while running the application from Xcode. |
I wasn't able to reproduce your exact crash, but I've got crash on closing an application.
But I have iPhone XS with iOS 14.5.1, so it might be related. |
@naithar's crash should be fixed by #49248. I can't repro OP's crash though. |
I am getting the same exception, Godot 3.3 mono. Can't reproduce in Xcode, with debug or release build.
(full symbolized crash report https://gist.github.com/selfsame/303cc85be8c32ce1957fbb601489aad6#file-ios-crash-report) Eager to help investigate if there's anything I can try |
Would be very good to finally get rid of this issue, I would investigate too, but don't know where to start. |
You should try switching Xcode's Run scheme to the same values as Archive. This should allow you to reproduce the crash in Xcode as well as get some logs that can be useful to fix it. |
See Bisecting regressions in the documentation for instructions 🙂 |
I have the same issue with godot 3.4 beta 2 and 3. |
I have this same issue. The crash log in the Console shows this Mono exception:
Using Godot 3.4.4. |
If I allow the game to continue running when an unhandled Mono exception occurs (set |
I did some more research, and it looks like it is because I use .NET's @selfsame @dunyakilavuz, could you please verify if you use |
@basdp I'd confirmed |
@selfsame thanks, will try to find out why. do you know if the app also crashes when released to the App Store? |
@basdp Yes crash in app store and test flight builds |
Ok, that is worrisome. I have created a very minimal Godot project that reproduces the crash. See: I am currently still doing some research on this, but I might need some help as I'm not very familiar with Godot's internals. Also, it looks like this is a duplicate of #38810, which was incorrectly closed as this is still crashing with the fixes mentioned there. I think it was incorrectly flagged as a duplicate of #40757, as it's a totally different scenario (this issue 'only' happens in App Store releases, and the suspect duplicate happened on all real device builds). Not sure what the best procedure is (re-open the #38810 issue or continue here) |
#38810 was about ad hoc distribution, not Testflight. The issue here is likely the same (P/Invoke symbols are being stripped), but it only happens on Testflight and App Store releases. Currently, my focus is 100% on the Godot 4.0 release. After that, I'll come back to this. |
The other issue was fixed via fake references in source code rather than linker flags. If any one is interested in experimenting, you could try using the linker flags the way it's explained here:
If you're getting an If that doesn't work either, we may need to reference the symbols in a code path that can actually be executed, e.g.: at startup, if env var is defined, print address to symbol. If this doesn't work either, the issue may be a different one. |
@neikeq great insights! I can also confirm that if I set I will try if the linker flags make it a little less shotgun-on-a-fly type of thing, though the 'overhead' is only 200kb in the archive output size, of which some bytes (namely the global exports) are actually desired. |
For what it's worth, I worked around this problem for now, by adding this script to my CI pipeline: cd ~/Library/Application\ Support/Godot/templates/${{ variables.godot_version }}.${{ replace(variables.godot_branch, '_', '.') }}
mkdir godot_ios.xcodeproj
unzip -p iphone.zip godot_ios.xcodeproj/project.pbxproj >godot_ios.xcodeproj/project.pbxproj
gsed -i '/CODE_SIGN_IDENTITY = "$code_sign_identity_release";/a STRIP_STYLE = non-global;' godot_ios.xcodeproj/project.pbxproj
zip -u iphone.zip godot_ios.xcodeproj/project.pbxproj
rm -rf godot_ios.xcodeproj Please be aware that this is only safe to do if you reset your build environment each build, which happens in my CI as it's running in a container. I'm patching the live export templates during the build. It would be better to create your own export template for iphone.zip with any changes that you might need. Also, if you would go that route, probably you should use Godot's built-in custom template options. For now, I'm waiting until this problem can be picked up by a more experienced dev. More than happy to help, but my knowledge of the Godot/Mono code structures and patterns is too little to lead a PR on this. |
The problem was solved this way. If anyone is looking for a solution to this issue, it works. I uploaded it to Testflight and AppStore and it works fine. I use most C# libraries in my project. (such as Random, Thread, TimeZoneInfo, IO, Collections.Generic, Linq). Thanks @basdp |
Godot version:
Godot 3.3 Mono
Issue description:
Managed to run my app on both Debug and Release modes on Xcode without any problems. Then I uploaded it to App Store Connect for distribution and tried downloading & running it from Testflight.
The app opens up with a loading scene and when the loading is complete it proceeds to the main scene. But when this loading is complete, app crashes immediately.
Testflight feedback was as follows.
testflight_feedback.zip
I tried detaching most of the scripts I use. The scene without scripts works on Testflight, so I know its not a rendering issue. Also tried loading a test script to see if it was related to Mono, again worked on Testflight. So its not a Mono issue as well?
Couldn't figure out why it would only crash on Testflight though. Everything works perfectly when I run it from Xcode.
I would be very happy If anyone can make up anything from the feedback I uploaded. Thanks for your help!
The text was updated successfully, but these errors were encountered: