-
-
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
Crashes for my 2D application on all Android devices running GLES 3.0 or below #31420
Comments
You should use GLES2 if you want to support those lower end phones with bad OpenGL drivers. The bad support for GLES3 on Android is the main reason why we implemented GLES2. |
My game is pretty lightweight so I think I'll do that. Didn't get around to creating a blank project, if anyone else is having trouble with this issue, give it a try and share your results! |
Update : changing driver mode to GLES 2 did not expand compatibility. I'll be doing some testing to see if my modules might be the problem. |
Speaking for myself, I would say that is not much info to go on. Android is particularly difficult to debug (as you often need the particular hardware that causes the problem), and we usually would need an adb logcat output at minimum, that can usually give a better clue as to where the problem is occurring. A minimum reproduction project is usually essential too, so that we can try and reproduce it on whatever hardware we have. My best guess is it is failing to create the basic opengl setup on that device. I would start by creating a basic opengl es 2 project on that device and see if you can get that running, and / or switch off anything that looks vaguely advanced in the project settings for the graphics, and see if you can get anything running at all. If you can, then slowly add back graphics till you can pinpoint what is causing the problem. If you haven't access to the device you are out of luck. |
I intended to investigate this more, but then got busy when some other things. Sorry about that! I did remove all modules from my project and replaced my custom export templates with the stock 3.1.1 template. Didn't fix anything. I'll update soon with a minimum reproduction project! |
I've tried bringing in all of my project settings section by section, then eventually all at once. |
Nothing :/ I'm gonna try porting in my home screen and see if that breaks it |
Changing approaches here a little bit. Instead of building up an empty repro project one feature at a time, I'm going to try trimming down from my main project to find out what is breaking it. I ended up just cloning my project and chopping off the biggest scene in it, to see if anything in there might have been the issue. No improvements, so I'm gonna try the same technique with another one. |
I've tested almost all of my scenes and just can't seem to find the discrepancy. For now, I'll attach the Logcat files to this comment. Please let me know if there's anything specific you would like to see me try! With modules included in project (error starts around line 8205): Without modules (line 12135): |
Are you exporting with GLES3 or GLES2? I did a little research and it appears the error is caused when devices erroneously report support for GL ES 3.0 but only actually support GL ES 2.0 level features. For example, from your first image, the Samsung Galaxy S3 is listed which uses a ARM Mali-400 GPU and runs on Android 4.3. While all Android 4.3 devices were supposed to be compliant with GL ES 3.0, the ARM Mali-400 GPU only supports up to GL ES 2.0. Based on this, it seems that maybe this is more of a device/opengl error rather than something we can fix/detect. |
Earlier I tried disabling the 2.0 fallback and exporting with only GLES2. Two logcats from that build: Galaxy S3: |
Ah, the same crash in both files. Here is someone that solved it by changing the emulator settings, can you check and see if this works? https://stackoverflow.com/questions/43449644/java-lang-runtimeexception-createcontext-failed |
Sure, however, I've been doing this on physical devices, how should I approach testing this? My development machine is running on hardware that can't run Android studio emulators. |
Nevermind then. I thought your screenshots from above were coming from an emulator. I didn't realize you had access to all those devices. |
Well sort of. Since I don't have a device that has issues with my app, I've sending APKs through a service on Google Play Console that allows me to run the application on multiple test devices. They may be physical devices or just emulators. Either way I don't think I would be able to change this specific setting. |
Looking into the phones that were crashed, we have the Galaxy S3 we talked about earlier, as well as the Moto G4 Play and the K3 2017, which run on Adreno 306 and 304 GPUs respectively. Apparently Adreno 3xx GPUs were giving a lot of Godot Devs some grief a couple years ago due to bad driver support. But for some reason locking the project at GLES2 doesn't solve the issue? I'm considering just putting together a blacklist of bad devices for my game. |
Could be the case that they don't even fully support GLES2. I wouldn't be surprised with devices that old. A blacklist may be your best option. Or just targeting a newer version of Android. |
Can anyone still reproduce this bug in Godot 3.2.3 or any later release? |
No answer, so I'll close for now. As others mentioned, this kind of issue is pretty difficult to solve as it often boils down to bad GLES drivers on ancient devices. Ideally Godot should have a blacklist for such devices, so the reports here may be useful to identify some of them. That being said, I have a S3 here and I can run GLES2 projects without trouble, unless I try to use advanced 3D features like skeletons which caused crashes for me in the past: #35143. It might be that you experienced the same issue. |
Godot version:
3.1.1-stable
OS/device including version:
Various devices via Google Play Console's pre-launch reports and one other test device
Issue description:
On any device I've tested that runs GLES 3.0 or lower (2.0 fallback is enabled) I get a crash upon booting up the app.
Steps to reproduce:
I'm in the process of putting together a small blank repro project. Once I can get a pre launch report back (usually takes a few hours), we'll be able to determine whether the issue is with the engine and/or the export template, or with the way my project is configured.
I have three modules installed to this project: one for interstitial ads, one for control of haptic motors, and one for sharing content with other users (see link below).
https://github.com/Shin-NiL/godot-custom-mobile-template
Minimal reproduction project:
See above.
The text was updated successfully, but these errors were encountered: