Skip to content
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

Godot 3.1 Crash on specific devices #27883

Closed
canvasbushi opened this issue Apr 10, 2019 · 14 comments
Closed

Godot 3.1 Crash on specific devices #27883

canvasbushi opened this issue Apr 10, 2019 · 14 comments

Comments

@canvasbushi
Copy link

canvasbushi commented Apr 10, 2019

Godot version:
3.1

OS/device including version:
Samsung Galaxy S5, S4 and iPhone 5s and 6 Plus

Issue description:
Crash on startup for all except S4, instead crash on the first scene of my project.
Samsung Galaxy S5 whenever APK Expansion is used, resource cannot be found error is triggered.

Steps to reproduce:
load any 3.1 project on real devices listed above. project for arm7 and 8

Minimal reproduction project:

@volzhs
Copy link
Contributor

volzhs commented Apr 10, 2019

are you using gles2?

@canvasbushi
Copy link
Author

are you using gles2?

No I'm using gles3 renderer, however i ran tests with gles2 fallback but it didn't change the result. The project was upgraded from godot 3.0.6 to 3.1(i'm not sure if this info is helpful).

@burstina
Copy link

burstina commented Apr 10, 2019

I also have the same problem.

I have 2 projects atm, the first one works smoothly, the second project crashes all the times.

about crashing project:
No problem at all on Nox Player/android 7.1
crashes 90% of the times on asus Zenfone 4 running android 7.1.1
crashes on Elephone S8 running android 7.1 (Mali)
crashes on Huawei Mate P20 pro (android 9.0).

seems not device specific.

@burstina
Copy link

burstina commented Apr 10, 2019

adb logcat

-------- beginning of crash
04-10 21:24:11.018 12325 12358 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8000003f4cd165 in tid 12358 (GLThread 761)
04-10 21:24:11.110 12427 12427 I AEE_AED : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-10 21:24:11.110 12427 12427 I AEE_AED : Build fingerprint: 'Elephone/full_l9708_4g/l9708_4g:7.1.1/NMF26O/1508304157:user/release-keys'
04-10 21:24:11.110 12427 12427 I AEE_AED : Revision: '0'
04-10 21:24:11.110 12427 12427 I AEE_AED : ABI: 'arm64'
04-10 21:24:11.110 12427 12427 I AEE_AED : pid: 12325, tid: 12358, name: GLThread 761  >>> com.graz.comp <<<
04-10 21:24:11.110 12427 12427 I AEE_AED : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8000003f4cd165
04-10 21:24:11.111 12427 12427 I AEE_AED :     x0   3f8000003f4ccccd  x1   0000007e7b96c710  x2   0000000000000001  x3   0000007e9b2f188c
04-10 21:24:11.111 12427 12427 I AEE_AED :     x4   0000007e9b2f18d4  x5   0000007eb6df2024  x6   0000007eacff0fc8  x7   0000007e7c129250
04-10 21:24:11.111 12427 12427 I AEE_AED :     x8   00000000000000cd  x9   0000007e9b9d5a64  x10  0000007e7ba2b110  x11  0000007eb6d354e8
04-10 21:24:11.111 12427 12427 I AEE_AED :     x12  0000000000000001  x13  0000000000000004  x14  00000000ffffffff  x15  0000000000000002
04-10 21:24:11.111 12427 12427 I AEE_AED :     x16  0000007e9c0a8e20  x17  0000007eb9a08abc  x18  0000000000000010  x19  0000007e8297d010
04-10 21:24:11.111 12427 12427 I AEE_AED :     x20  0000007e8297d010  x21  0000000000000000  x22  0000007e9a80cb4c  x23  0000007e9ac0711c
04-10 21:24:11.111 12427 12427 I AEE_AED :     x24  0000007eb6d354e8  x25  0000007eb6d354e8  x26  0000007e8297d030  x27  00000000000000da
04-10 21:24:11.111 12427 12427 I AEE_AED :     x28  0000007e9c0ae000  x29  0000007eb6d341a0  x30  0000007e9a8b3a68
04-10 21:24:11.111 12427 12427 I AEE_AED :     sp   0000007eb6d33dc0  pc   0000007e9a7b0038  pstate 0000000080000000
04-10 21:24:11.122 12427 12427 I AEE_AED : 
04-10 21:24:11.122 12427 12427 I AEE_AED : backtrace:
04-10 21:24:11.122 12427 12427 I AEE_AED :     #00 pc 000000000091b038  /data/app/com.graz.comp-1/lib/arm64/libgodot_android.so
04-10 21:24:11.122 12427 12427 I AEE_AED :     #01 pc 0000000000a1ea64  /data/app/com.graz.comp-1/lib/arm64/libgodot_android.so
04-10 21:24:11.122 12427 12427 I AEE_AED :     #02 pc 0000000000a2a7b8  /data/app/com.graz.comp-1/lib/arm64/libgodot_android.so
04-10 21:24:11.122 12427 12427 I AEE_AED :     #03 pc 00000000016cec9c  /data/app/com.graz.comp-1/lib/arm64/libgodot_android.so
04-10 21:24:11.122 12427 12427 I AEE_AED :     #04 pc 0000000000d71780  /data/app/com.graz.comp-1/lib/arm64/libgodot_android.so
04-10 21:24:11.123 12427 12427 I AEE_AED :     #05 pc 000000000034c1e4  /data/app/com.graz.comp-1/lib/arm64/libgodot_android.so
04-10 21:24:11.123 12427 12427 I AEE_AED :     #06 pc 00000000016d23e8  /data/app/com.graz.comp-1/lib/arm64/libgodot_android.so
04-10 21:24:11.123 12427 12427 I AEE_AED :     #07 pc 00000000016c6f68  /data/app/com.graz.comp-1/lib/arm64/libgodot_android.so
04-10 21:24:11.123 12427 12427 I AEE_AED :     #08 pc 00000000016c7250  /data/app/com.graz.comp-1/lib/arm64/libgodot_android.so
04-10 21:24:11.123 12427 12427 I AEE_AED :     #09 pc 00000000008e7114  /data/app/com.graz.comp-1/lib/arm64/libgodot_android.so
04-10 21:24:11.123 12427 12427 I AEE_AED :     #10 pc 00000000001d9d00  /data/app/com.graz.comp-1/lib/arm64/libgodot_android.so
04-10 21:24:11.123 12427 12427 I AEE_AED :     #11 pc 00000000001a5adc  /data/app/com.graz.comp-1/lib/arm64/libgodot_android.so (Java_org_godotengine_godot_GodotLib_step+168)
04-10 21:24:11.123 12427 12427 I AEE_AED :     #12 pc 000000000011af0c  /data/app/com.graz.comp-1/oat/arm64/base.odex (offset 0x10a000)
04-10 21:24:11.886  1077  5030 I AppWidgetServiceImpl: getAppWidgetIds() 0
04-10 21:24:11.888  1077  1146 I AppWidgetServiceImpl: getAppWidgetIds() 0
04-10 21:24:11.894  1077  1556 I AppWidgetServiceImpl: notifyAppWidgetViewDataChanged() 0
04-10 21:24:11.896  1077  2921 I AppWidgetServiceImpl: bindRemoteViewsService() 0
04-10 21:24:12.142  1077  1688 I AppWidgetServiceImpl: getAppWidgetIds() 0
04-10 21:24:12.145  1077  5030 I AppWidgetServiceImpl: getAppWidgetIds() 0
04-10 21:24:12.151  1077  1689 I AppWidgetServiceImpl: notifyAppWidgetViewDataChanged() 0
04-10 21:24:12.467  1602  1602 V ActivityThread: SVC-Destroying service com.google.android.gms.gcm.http.GoogleHttpService@daac673
04-10 21:24:12.479  1077  1182 I BootReceiver: Copying /data/tombstones/tombstone_05 to DropBox (SYSTEM_TOMBSTONE)
04-10 21:24:12.487  1077 12434 W ActivityManager:   Force finishing activity com.graz.comp/org.godotengine.godot.Godot
04-10 21:24:12.502  1077  1172 W ActivityManager: Failed setting process group of 12325 to 1
04-10 21:24:12.604  1077 12056 I WindowManager: WIN DEATH: Window{a583a22 u0 com.graz.comp/org.godotengine.godot.Godot}
04-10 21:24:12.604  1077  1688 I ActivityManager: Process com.graz.comp (pid 12325) has died
04-10 21:24:12.604  1077 12056 W WindowManager: Force-removing child win Window{1514bcd u0 SurfaceView - com.graz.comp/org.godotengine.godot.Godot} from container Window{a583a22 u0 com.graz.comp/org.godotengine.godot.Godot}
04-10 21:24:12.604  1077 12056 I WindowManager: Destroying surface Surface(name=SurfaceView - com.graz.comp/org.godotengine.godot.Godot) called by com.android.server.wm.WindowStateAnimator.destroySurface:2162 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:952 com.android.server.wm.WindowState.removeLocked:1486 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2750 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2728 com.android.server.wm.WindowManagerService.removeWindowLocked:2698 com.android.server.wm.WindowState$DeathRecipient.binderDied:1817 android.os.BinderProxy.sendDeathNotice:695 
04-10 21:24:12.610  1077 12056 I WindowManager: Destroying surface Surface(name=com.graz.comp/org.godotengine.godot.Godot) called by com.android.server.wm.WindowStateAnimator.destroySurface:2162 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:952 com.android.server.wm.WindowState.removeLocked:1486 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2750 com.android.server.wm.WindowManagerService.removeWindowLocked:2698 com.android.server.wm.WindowState$DeathRecipient.binderDied:1817 android.os.BinderProxy.sendDeathNotice:695 <bottom of call stack> 

@canvasbushi
Copy link
Author

found a fix.

  • enable Etc and Etc 2 vram compression.
  • remove default environment.
  • change renderer to GLES2.

after making these changes, the game ran almost perfectly on Samsung Galaxy S4 and S5. I havent tried it on iphone yet, but i will soon.

@Zireael07
Copy link
Contributor

"Remove default environment", and "etc and etc2"... looks like someone hit TWO issues that were supposed to be closed?

@burstina
Copy link

found a fix.

* enable Etc and Etc 2 vram compression.

* remove default environment.

* change renderer to GLES2.

after making these changes, the game ran almost perfectly on Samsung Galaxy S4 and S5. I havent tried it on iphone yet, but i will soon.

not working for me.

@burstina
Copy link

burstina commented Apr 13, 2019

I found the issue related to LineEdit nodes as instanced packedscenes added as children to custom Container context: those nodes rect_size have been instanced bigger than original sizes, then custom container script changed `rect' to smaller size: that did something that soon brought to SIGSEGV.

In the end, I changed LineEdit to Label to FIX the crash.

I'm sorry I can't provide MRP atm, I'm looking forward to do it asap.

@aaronfranke
Copy link
Member

@canvasbushi @burstina Please provide minimal reproduction projects, and please run each other's reproduction projects to confirm if they work or not on your devices.

@burstina
Copy link

burstina commented Sep 6, 2019

ouch, sorry I got catched in deadlines and I forgot about MRP.
I'm ashamed of myself...

@Arech
Copy link

Arech commented May 31, 2020

Hello all. I'm not sure I should create another issue, so I'll write details here, because it can be relevant. If I'm wrong - let me know, I'll spawn a separate issue.

So, I was trying to use my old Galaxy S4 (GT-I9505) as a main phone for debugging and developing an app. I flashed it to Android 9 with this LineageOS 16 variation (gt9505-Optimized-LineageOS-16.0-V14-Signed.zip file) to be able to work normally with all godot features (it was on Android 4.4.2 afair originally, so some features were not available to me), and then I found something strange. It seems that stretch/aspect property heavily affects whether it would run on the phone at all or it would either crash or display some gibberish on screen. Aspect setting set to keep_height works fine, while setting it to keep crashes or shows some colourful junk on screen. Can someone try and see if they have the same issue?

I tried the phone with my own app first time and the app just always froze on it. After some thoughts, I decided to try and see if some "standard" godot projects would work. And to my luck, I chose 2D Platformer Demo (KinematicBody) the first - and it worked! There were some sporadic issues with phone connection (either with debug or release modes), but anyway, it worked. Next I tried similar project 2D Physics Platformer Demo (RigidBody) and it failed with gibberish screen. By comparison I've found the setting, that causes issue - stretch/aspect.

Then I've tried it with my app, but no luck here, - it still freezes. Here's a full logcat. As far as I understand, errors are mostly GPU related.

@Calinou
Copy link
Member

Calinou commented May 31, 2020

@Arech Try switching to the GLES2 renderer before exporting the project to Android. The GLES3 renderer has known bugs on Android, especially on lower-end devices.

@Arech
Copy link

Arech commented May 31, 2020

@Calinou indeed, GLES2 works. Thanks!

@akien-mga
Copy link
Member

The solution for anyone experiencing crashes on lower-end Android devices is to use GLES2.
GLES3 only works on mid to high end devices with recent drivers, and sadly the Android GLES drivers don't provide us with enough relevant checks to avoid crashing on lower-end devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants