godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.47k stars 21.27k forks source link

GLES2: 3D scenes crash on Android (Mali T830, no OES_texture_float) #26902

Closed ProbDenis closed 5 years ago

ProbDenis commented 5 years ago

Godot version: Godot 3.1 RC1

OS/device including version: Samsung Galaxy Tab A (2016), Android 8.1.0,

Issue description: I'm getting crashes when trying to run 3D games/demos on Android in GLES2. The only debug output I'm getting is "R float texture not supported". GLES3 seems to work.

akien-mga commented 5 years ago

Can you share a project that reproduces it?

akien-mga commented 5 years ago

Are you using a CurveTexture?

akien-mga commented 5 years ago

Could you also enable Debug > Settings > Verbose Stdout and see if you get more details in adb logcat?

And maybe use the app OpenGL ES CapsViewer to get the list of extensions supported by your GPU. The app lets you upload them to a database that you can then link here.

ProbDenis commented 5 years ago

I can reproduce it with the "Platformer 3D" demo. With Verbose STDout I'm getting the following output: debug_output

ProbDenis commented 5 years ago

Here's the report from OpenGL ES CapsViewer: http://opengles.gpuinfo.org/displayreport.php?id=3450

akien-mga commented 5 years ago

Can you check adb logcat? There might be more details around those OpenGL errors.

~It would also be useful to know the OpenGL ES extensions supported by that device, as reported by OpenGL ES CapsViewer. It doesn't seem listed yet in http://opengles.gpuinfo.org/~ Edit: You just provided that.

akien-mga commented 5 years ago

Could you try this patch? https://github.com/akien-mga/godot/commit/5976a524d2849fb1d0232d12fc3ae7f98b3cbcdc (#26943)

You'll need to build the editor binary from that commit, and here's a matching debug APK (only armv7 lib included, but should work on your arm64v8 device, just make sure to tick armv7 in the export preset): Android debug APK (armv7)

akien-mga commented 5 years ago

Here's another debug APK for #26943 with both armv7 and arm64v8.

ProbDenis commented 5 years ago

Hm, this build made it even worse. It crashes immediately with no debug output at all. Still works with GLES3 though.

ProbDenis commented 5 years ago

adb logcat is spamming the console with messages so fast that it's difficult for me to know what to look for, but I found this message: OpenGLRenderer: Incorrectly called buildLayer on View: WorkspaceCellLayoutChildren, destroying layer...

akien-mga commented 5 years ago

I see that my Samsung Galaxy S3 also doesn't support OES_texture_float, I'll see if I can reproduce the issue and debug further.

akien-mga commented 5 years ago

Could you try https://framadrop.org/r/zpwgiaKLyL#vqtCStJXshsSLTwiBLv7IOvc3xgu6H9Edt9XwUd1g4g= ? It works well for me on the Samsung Galaxy S3. It's a target=debug build so it should provide a backtrace in adb logcat if it crashes.

Note that it might not fix all potential crashes on loading a 3D scene on that device, just the part we saw so far about R float texture not being supported. If you're still testing with the 3D platformer, you might into another crash as described in #26943. Try also to change the physics engine to GodotPhysics, as I had a crash in Bullet on my higher end phone with that demo.

ProbDenis commented 5 years ago

I'm still getting crashes, though maybe different crashes. This is the part of the log that might be interesting:

https://www.dropbox.com/s/wifizejds5k5wky/log.txt?dl=0

akien-mga commented 5 years ago

Yeah that's the same crash I'm getting in https://github.com/godotengine/godot/pull/26943#issuecomment-471960739

I think it's unrelated to what was fixed with #26943, so it might be worth opening a new issue about it. That new crash is specific to scenes with Skeleton.

akien-mga commented 5 years ago

Fixed by #26943.

I'll open another issue for the Skeleton crash.

akien-mga commented 5 years ago

I opened #26972 for the other crash.