-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
arm64 libgodot_android.so crash Android 10 #38053
Comments
I'm afraid a backtrace without debugging symbols isn't of much use, especially if the user who got the crash isn't around to reply to our questions. |
I get quite a lot of remote crash reports (Crashlyics) from my android game, that look exactly like this (crash in libgodot_android.so), and to a lesser extend crashes in other .so binaries too. Please, how can I attach debug symbols to these reports? I would like to help you guys fix these problems. In the crashlytics docu they say I need to execute This problem is rather urgend, because crashes like this produce 1-star ratings in google play for games that would have great ratings otherwise. Quite a big bummer! Most crash reports I get look like this:
Some other .so libraries report crashes too, but not as many. My users complain about the app crashing on startup - others about a black screen, sound is starting but nothing more. I have Crashlytics up and running and would like to upload debugging symbols to the Crashlytics backend to provide you guys with meaningful backtraces from various devices out there in the wild. I'm kind of lost on how to do that. Any ideas? |
cc @m4gr3d |
@mrimvo |
Yes, it's quite easy to set up, but as the crash reports are not meaningful, this is a bit useless. Recompiling might help I didn't try that. Another thing that just crossed my mind: maybe it's possible to add godot's logs (where all the push_error messages end up) to a crash report. Because I think some of these errors might be rooted id GDScript. The engine shouldn't crash, but at least we can do something about it if we had the logs. Edit: I did a quick research and I think the idea to attach the godot logs might not be possible with Crashlytics:
Another option might by to use |
Thank you for your answer :) I'm using a custom android build template. I'm happy to push a debug build into the beta channel of my app to help godot get some helpful stack traces. I'm a bit confused about where to add Just to be clear about my context:
|
See the last part of my previous comment, you'd need to build the Godot export template with debug symbols (see Compiling for Android). Then it's a bit tricky as the new workflow with custom build templates doesn't allow to easily use one's own Since you're using 3.2.1-stable as is, the best might be that once you have built the export template using the above instructions with |
I tried to follow that path, but I'm sad to say I need to give up on that. The NDK Download is just too big for my limited data volume to handle. |
I'll make a debug build myself and upload it here, that should be much easier to test. |
Here's a How to use it:
|
This is awesome! I'm going to upload the debug version today! 👍
This worked for me to build and run the game with your template apk.
I tried both ways, and even did not re-apply my changes, so I had the pure version as Custom Template set. It produces errors while building a debug version of the game: I then removed the references to these resources from the AndroidManifest.xml and got another error while building: Also, I noticed the
|
size is smaller because it contains arm64v8 and armv7, no x86 and x86_64. |
I can build and run using custom_template/debug and the given android_debug.apk to enable crashlytics I edit build.graddle : but I must comment out How can I publish one of these debug apk, google's policy does not allow debuggable applications ? |
I just got notified by google that my app got suspended. Oh man that hurts. Their reasoning being it got covid-19 references. Well it does but I think their reaction is a bit harsh, provided it was nothing more than a cute little game. So I'm out of this. About publishing the godot-lib.debug.aar I think it might be possible to mix and have the exported APK be a release version that uses the debug version of godot-lib. Another (better) possiblity would be to use godot-lib.release.aar and to upload the debug information to Crashlytics backend. About enabling Crashlytics: yes, that's exactly the way I did it too, including to remove the support-compat. Also you need to download and add google-services.json from Crashlytics backend and add it to android/build/ directory. |
Hoooo sorry, that's harsh ! |
That was hard ! GDScript code is : bt is :
|
Here's the start of @jeremyz's backtrace in the https://github.com/godotengine/godot/blob/3.2.1-stable/core/object.cpp#L941 https://github.com/godotengine/godot/blob/3.2.1-stable/core/variant.cpp#L1592 https://github.com/godotengine/godot/blob/3.2.1-stable/core/variant.cpp#L1408 https://github.com/godotengine/godot/blob/3.2.1-stable/core/io/json.cpp#L117 https://github.com/godotengine/godot/blob/3.2.1-stable/core/io/json.cpp#L111 So it sounds like the That sounds like it might be related to #38119 (CC @RandomShaper), which is fixed in 3.2.2 beta 2 and beta 3. Would you be able to test if 3.2.2 beta 3 fixes the issue for you? |
Yes, sounds a lot like the object, along with its script, has been freed. Since the dangling Running in the editor with the debugger attached, you'll get those freed objects converted to the As a quick measure to avoid the crash and maybe gain some time for finding the bug before you get more crash reports, you can use a |
I've noticed an object that should not be here in the dict that I'm serializing. @RandomShaper I haven't play with the debugger yet, cause it only crashed on android 10 so far ... will have a deeper look it this too. |
Well done @jeremyz I'm glad you got the backtrace working. 🙂 Besides fixing the game itself, I would like to suggest that godot should not crash in these cases but instead pushes errors like push_error does. |
There's a plan about having the option to have those checks in release builds too and even add further protections. I haven't had time to write the proposal yet. |
I've tested the current situation,
with 3.2.1-stable
with 3.2 HEAD(6abe73f)
@akien-mga so, as stated in #38119's updated comment, crashes are not handled in release builds yet. |
@akien-mga Do you happen to also have a debug build for 3.3.2? |
Not readily available, but I'm not sure this old issue is still relevant today, and there's no reproduction project to check against recent versions. If you reproduce a similar issue, I would suggest opening a new bug report with details on your specific situation, as it might differ from the original one in this issue. |
I built a debug APK of Godot 3.3.2 ( I'm not sure if it worked correctly as the APK is only 26 MB though. I remember having to use a different Gradle command like |
I see. I need it for general debugging of crash logs in Play console, not for any one specific case. |
Thanks, but unfortunately according to Android Studio those libs don't contain any debug symbols. |
I managed to compile and create debug symbols for Godot 3.3.2. However, it doesn't seem like it helps a lot to understand the stack traces. Here's an example:
If anyone is interested in getting the zipped debug symbols (213MB, arm CPUs only) - let me know and I'll upload it to the cloud. |
As I suggested above, this should go to a new bug report. It's definitely not the same issue as the one in #38053 (comment) since the Embree code in your stacktrace didn't exist in 3.2.1. |
I agree. My comment above was a side note. |
Which steps did you follow to create an APK with debug symbols? |
I followed the instructions here: up to the point of creating the .so files (before calling gradlew). |
This should be fixed in 3.4 by #51796. Please comment if you can still reproduce the same crash with 3.4 RC 1 or later. |
I use Godot 3.5.2.stable exported the project in release mode with the "custom build" parameter (that is, with the output of a large grandle log during export). 12% of my users have this error.
As far as I understand, the users who received this error only see a black screen (this is my guess based on one comment). Unfortunately, angry users are not the people who can help in tracking and clarifying the problem :( |
Not to mention that 1% of angry users can easily ruin your rating in Playstore, so this bug is a real problem when using Godot for Android games. |
Note: as far as I understand, these errors occur due to warnings and errors that occur in the console at the development stage. BUT I still think this is a problem of the engine, since for some reason these errors crash the game only at the release stage and only 12% of users. |
Yesterday I had a rating of 5 points for the game, today when I logged into the console, 2 of the users had this error and they dropped the rating to 4.2 (yes, I don't have many reviews, but unfortunately these two comments were enough). As for the percentage of evaluators. People are more likely to put angry reviews when they don't like something than good ones. The quality of these reviews is another matter :D People probably think that from their comment "shiт doesnt work" - the developer will immediately understand what the problem is. |
In the end, what did I come to: The problem was in the GLES 3 shader. Although he can work out correctly in the editor, while referring to an error, this causes problems for some users in the exported project. I also want to advise all Android developers on Godot to restrict access to the game to users who have less than 2 gigabytes of RAM. If this is not done, you will often complain about crashes during the game (the size of the project is not related to crashes at all, it looks like godot just does not have enough memory for its basic functions, which leads to emergency stops) |
@Miskler, thank you for sharing your observations and insights. |
Thanks a lot @RandomShaper. Thanks again! |
3.2.1.stable
ANDROID 10/Google Pixel 3 XL:
Issue description:
Google Play Console found my game crash on Android 10/Google Pixel 3 Xl. Here is the backtrace.
I don't know what is the source of that issue cause it didn't happen on any of my devices. Anyway i am creating an issue here.
The text was updated successfully, but these errors were encountered: