Closed Matt1700 closed 4 years ago
Are there any additional logs from logcat during startup?
Is this an emulator?
@jonahwilliams I've tried with both an emulator and a physical device. Here's the logcat from the physical device:
--------- beginning of system
11-08 11:17:47.756 1403 4364 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.tormec.flutter_app_test/.MainActivity bnds=[161,233][313,427]} from uid 10022
--------- beginning of main
11-08 11:17:47.761 1280 2467 I audio_hw_primary: choose pcmC1D0p for 0
11-08 11:17:47.767 4708 4708 I main : type=1400 audit(0.0:1224): avc: denied { dac_read_search } for capability=2 scontext=u:r:zygote:s0 tcontext=u:r:zygote:s0 tclass=capability permissive=1
11-08 11:17:47.769 4708 4708 W zygote64: Unexpected CPU variant for X86 using defaults: x86_64
11-08 11:17:47.774 1403 4364 I ActivityManager: Start proc 4708:com.tormec.flutter_app_test/u0a72 for activity com.tormec.flutter_app_test/.MainActivity
11-08 11:17:47.795 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '4708' (No space left on device); fd=27
11-08 11:17:47.795 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '4713' (No space left on device); fd=27
11-08 11:17:47.795 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '4714' (No space left on device); fd=27
11-08 11:17:47.795 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '4715' (No space left on device); fd=27
11-08 11:17:47.795 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '4716' (No space left on device); fd=27
11-08 11:17:47.795 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '4717' (No space left on device); fd=27
11-08 11:17:47.795 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '4718' (No space left on device); fd=27
11-08 11:17:47.795 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '4719' (No space left on device); fd=27
11-08 11:17:47.795 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '4720' (No space left on device); fd=27
11-08 11:17:47.795 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '4721' (No space left on device); fd=27
11-08 11:17:47.795 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2029' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2034' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2035' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2036' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2037' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2038' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2039' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2040' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2041' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2042' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2043' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2047' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2054' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2512' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2534' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2536' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2537' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2538' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2539' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2540' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2541' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '2550' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '3521' (No space left on device); fd=3
11-08 11:17:47.796 1403 3602 W SchedPolicy: add_tid_to_cgroup failed to write '4162' (No space left on device); fd=3
11-08 11:17:47.805 1293 1293 I Binder:1293_4: type=1400 audit(0.0:1226): avc: denied { sys_admin } for capability=21 scontext=u:r:surfaceflinger:s0 tcontext=u:r:surfaceflinger:s0 tclass=capability permissive=1
11-08 11:17:47.849 4708 4708 D vndksupport: Loading /vendor/lib64/hw/gralloc.drm.so from current namespace instead of sphal namespace.
11-08 11:17:47.898 4708 4708 D libdrm : /vendor/etc/hwdata/amdgpu.ids version: 1.0.0
11-08 11:17:47.903 1403 2057 D vndksupport: Loading /vendor/lib64/hw/gralloc.drm.so from current namespace instead of sphal namespace.
11-08 11:17:47.902 1403 1403 I RenderThread: type=1400 audit(0.0:1227): avc: denied { read } for name="vendor" dev="tmpfs" ino=1556 scontext=u:r:system_server:s0 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=1
11-08 11:17:47.903 1403 1403 I chatty : uid=1000 system_server identical 1 line
11-08 11:17:47.906 1403 1403 I RenderThread: type=1400 audit(0.0:1229): avc: denied { read } for name="vendor" dev="tmpfs" ino=1556 scontext=u:r:system_server:s0 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=1
11-08 11:17:47.908 1403 2057 I EGL-MAIN: found extension DRI_Core version 2
11-08 11:17:47.908 1403 2057 I EGL-MAIN: found extension DRI_DRI2 version 4
11-08 11:17:47.907 1403 1403 I RenderThread: type=1400 audit(0.0:1230): avc: denied { read } for name="etc" dev="tmpfs" ino=6369 scontext=u:r:system_server:s0 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=1
11-08 11:17:47.910 1403 1403 I RenderThread: type=1400 audit(0.0:1231): avc: denied { read } for name="etc" dev="tmpfs" ino=6369 scontext=u:r:system_server:s0 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=1
11-08 11:17:47.911 1403 2057 I EGL-MAIN: found extension DRI_TexBuffer version 2
11-08 11:17:47.915 1403 2057 I EGL-MAIN: found extension DRI2_Flush version 4
11-08 11:17:47.915 1403 2057 I EGL-MAIN: found extension DRI_IMAGE version 17
11-08 11:17:47.915 1403 2057 I EGL-MAIN: found extension DRI_IMAGE version 17
11-08 11:17:47.915 1403 2057 I EGL-MAIN: found extension DRI_RENDERER_QUERY version 1
11-08 11:17:47.915 1403 2057 I EGL-MAIN: found extension DRI_CONFIG_QUERY version 1
11-08 11:17:47.915 1403 2057 I EGL-MAIN: found extension DRI2_Fence version 2
11-08 11:17:47.915 1403 2057 I EGL-MAIN: found extension DRI2_Interop version 1
11-08 11:17:47.915 1403 2057 I EGL-MAIN: found extension DRI_Robustness version 1
11-08 11:17:47.915 1403 2057 I EGL-MAIN: found extension DRI_NoError version 1
11-08 11:17:47.919 1403 2057 I system_server: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
11-08 11:17:47.919 1403 2057 I OpenGLRenderer: Initialized EGL, version 1.4
11-08 11:17:47.919 1403 2057 D OpenGLRenderer: Swap behavior 2
11-08 11:17:47.919 1403 2057 E OpenGLRenderer: Device claims wide gamut support, cannot find matching config, error = EGL_SUCCESS
11-08 11:17:47.925 4708 4708 I GRALLOC-DRM: create pipe for driver amdgpu
11-08 11:17:47.926 4708 4708 I EGL-MAIN: found extension DRI_Core version 2
11-08 11:17:47.926 4708 4708 I EGL-MAIN: found extension DRI_DRI2 version 4
11-08 11:17:47.928 4708 4708 I EGL-MAIN: found extension DRI_TexBuffer version 2
11-08 11:17:47.928 4708 4708 I EGL-MAIN: found extension DRI2_Flush version 4
11-08 11:17:47.928 4708 4708 I EGL-MAIN: found extension DRI_IMAGE version 17
11-08 11:17:47.928 4708 4708 I EGL-MAIN: found extension DRI_IMAGE version 17
11-08 11:17:47.928 4708 4708 I EGL-MAIN: found extension DRI_RENDERER_QUERY version 1
11-08 11:17:47.928 4708 4708 I EGL-MAIN: found extension DRI_CONFIG_QUERY version 1
11-08 11:17:47.928 4708 4708 I EGL-MAIN: found extension DRI2_Fence version 2
11-08 11:17:47.928 4708 4708 I EGL-MAIN: found extension DRI2_Interop version 1
11-08 11:17:47.928 4708 4708 I EGL-MAIN: found extension DRI_Robustness version 1
11-08 11:17:47.928 4708 4708 I EGL-MAIN: found extension DRI_NoError version 1
11-08 11:17:47.931 4708 4708 I com.tormec.flutter_app_test: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
--------- beginning of crash
11-08 11:17:47.961 4708 4725 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 4725 (1.ui), pid 4708 (lutter_app_test)
11-08 11:17:47.979 4738 4738 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
11-08 11:17:47.979 1312 1312 I /system/bin/tombstoned: received crash request for pid 4708
11-08 11:17:47.979 4738 4738 I crash_dump64: performing dump of process 4708 (target tid = 4725)
11-08 11:17:47.979 4738 4738 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-08 11:17:47.979 4738 4738 F DEBUG : Build fingerprint: 'Android-x86/android_x86_64/x86_64:8.1.0/OPM8.190605.003/cwhuang0613:userdebug/test-keys'
11-08 11:17:47.979 4738 4738 F DEBUG : Revision: '0'
11-08 11:17:47.979 4738 4738 F DEBUG : ABI: 'x86_64'
11-08 11:17:47.979 4738 4738 F DEBUG : pid: 4708, tid: 4725, name: 1.ui >>> com.tormec.flutter_app_test <<<
11-08 11:17:47.979 4738 4738 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
11-08 11:17:47.979 4738 4738 F DEBUG : Cause: null pointer dereference
11-08 11:17:47.979 4738 4738 F DEBUG : rax 00007c3fdc1c7071 rbx 0000000000000001 rcx 00007c3fd7ec3400 rdx 00007c3fd7f13298
11-08 11:17:47.979 4738 4738 F DEBUG : rsi 00007c3fd7f13328 rdi 00007c3fd7f133d8
11-08 11:17:47.979 4738 4738 F DEBUG : r8 0000000000000000 r9 00007c3fd7ec3478 r10 00007c3fd7b03169 r11 0000000000000009
11-08 11:17:47.979 4738 4738 F DEBUG : r12 00007c3fd7f13328 r13 00007c3fdd53a600 r14 00007c3fd7ec3478 r15 00007c3fdd53d718
11-08 11:17:47.979 4738 4738 F DEBUG : cs 0000000000000033 ss 000000000000002b
11-08 11:17:47.979 4738 4738 F DEBUG : rip 00007c3fdc5259f0 rbp 00007c3fdcc548a8 rsp 00007c3fdcc547a8 eflags 0000000000010212
11-08 11:17:47.980 4738 4738 F DEBUG :
11-08 11:17:47.980 4738 4738 F DEBUG : backtrace:
11-08 11:17:47.980 4738 4738 F DEBUG : #00 pc 00000000000039f0 /data/app/com.tormec.flutter_app_test-GC1iPXxzDu35v9lhU6gkkg==/lib/x86_64/libapp.so (offset 0x1000) (_kDartVmSnapshotInstructions+10736)
11-08 11:17:47.980 4738 4738 F DEBUG : #01 pc 000000000069f7d2 /data/app/com.tormec.flutter_app_test-GC1iPXxzDu35v9lhU6gkkg==/lib/x86_64/libflutter.so (offset 0x295000)
11-08 11:17:47.980 4738 4738 F DEBUG : #02 pc 0000000000000000 <unknown>
11-08 11:17:48.200 1312 1312 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_04
11-08 11:17:48.201 1403 4743 W ActivityManager: Force finishing activity com.tormec.flutter_app_test/.MainActivity
11-08 11:17:48.202 1403 1422 I BootReceiver: Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)
11-08 11:17:48.224 1403 4364 I ActivityManager: Process com.tormec.flutter_app_test (pid 4708) has died: fore TOP
11-08 11:17:48.224 1403 1420 W system_server: kill(-4708, 9) failed: No such process
11-08 11:17:48.225 1276 1276 I Zygote : Process 4708 exited due to signal (11)
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2029' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2034' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2035' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2036' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2037' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2038' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2039' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2040' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2041' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2042' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2043' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2047' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2054' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2512' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2534' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2536' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2537' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2538' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2539' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2540' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2541' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '2550' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '3521' (No space left on device); fd=27
11-08 11:17:48.229 1403 4364 W SchedPolicy: add_tid_to_cgroup failed to write '4162' (No space left on device); fd=27
11-08 11:17:48.269 1403 1420 W system_server: kill(-4708, 9) failed: No such process
11-08 11:17:48.269 1403 1420 I system_server: Successfully killed process cgroup uid 10072 pid 4708 in 45ms
11-08 11:17:48.680 1403 1418 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
11-08 11:17:48.680 1403 1418 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
11-08 11:17:48.771 2029 2534 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
11-08 11:17:48.782 1403 1418 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
11-08 11:17:48.782 1403 1418 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
It looks like the crash left a tombstone, I think you can pull it from the device with adb bugreport
@jonahwilliams the tombstone is too long to put in a single comment, I uploaded the whole bugreport file here: https://we.tl/t-ngewVRWkA6 The last tumbstone is the crash above. Thanks a lot for the help
I haven't been able to reproduce this. I tried creating an emulator device targeting Android 8.1 for x86_64 and building an APK of Flutter Gallery in android-x64 release mode. The app ran on the emulator without any problems.
The stack trace in the bug reports only has one frame from libflutter.so. It maps to: https://github.com/dart-lang/sdk/blob/master/runtime/vm/dart_entry.cc#L177
This is where the Dart VM jumps into the compiled Dart code. That matches the frame above it (which is within _kDartVmSnapshotInstructions
). A null pointer dereference then happens inside the compiled code.
Not sure why this is working differently in my environment. I tested this on a Linux host - one possible factor is that the logs above are from a Windows setup.
@jason-simmons I've tried with a linux distro and it seems to work fine, maybe it's an issue related to the windows Flutter compiler. Thanks for the help!
Confirmed that this reproduces on Windows.
The app.so
ELF library produced by the Windows build of gen_snapshot
fails at runtime. The library generally looks valid but is not identical to the output of Linux gen_snapshot
from the same commit (e.g. slightly different sizes for some of the exported snapshot data symbols).
@a-siva @rmacnak-google any ideas about what might be happening here?
gen_snapshot might be built incorrectly, targeting the Windows ABI instead of the Linux/Mac/Android ABI. Though if this were the case, I would expect a failure at snapshot load time.
I can confirm this. Same
null pointer dereference
error while trying to run apk build as release x86_x64 on Android Emulator. Crashes both with new projects as well as with old ones.
flutter doctor -v
[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.592], locale hr-HR) • Flutter version 1.12.13+hotfix.5 at C:\src\flutter • Framework revision 27321ebbad (6 weeks ago), 2019-12-10 18:15:01 -0800 • Engine revision 2994f7e1e6 • Dart version 2.7.0
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at C:\Android\sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.2 • ANDROID_HOME = C:\Android\sdk • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03) • All Android licenses accepted.
[√] Android Studio (version 3.5) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 40.2.2 • Dart plugin version 191.8593 • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[√] VS Code (version 1.41.1) • VS Code at C:\Users\isako\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.7.1
[√] Connected device (1 available) • Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 10 (API 29) (emulator)
• No issues found!
Create new project
flutter create x64bug
Build apk
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Install apk
adb install app-x86_64-release.apk
Run the app
2020-01-23 08:21:41.896 8904-8927/? A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8 in tid 8927 (1.ui), pid 8904 (.example.x64bug) 2020-01-23 08:21:41.955 8937-8937/? A/DEBUG: 2020-01-23 08:21:41.956 8937-8937/? A/DEBUG: Build fingerprint: 'google/sdk_gphone_x86_64/generic_x86_64:10/QSR1.190920.001/5891938:user/release-keys' 2020-01-23 08:21:41.956 8937-8937/? A/DEBUG: Revision: '0' 2020-01-23 08:21:41.956 8937-8937/? A/DEBUG: ABI: 'x86_64' 2020-01-23 08:21:41.956 8937-8937/? A/DEBUG: Timestamp: 2020-01-23 08:21:41+0100 2020-01-23 08:21:41.956 8937-8937/? A/DEBUG: pid: 8904, tid: 8927, name: 1.ui >>> com.example.x64bug <<< 2020-01-23 08:21:41.956 8937-8937/? A/DEBUG: uid: 10135 2020-01-23 08:21:41.956 8937-8937/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8 2020-01-23 08:21:41.956 8937-8937/? A/DEBUG: Cause: null pointer dereference 2020-01-23 08:21:41.956 8937-8937/? A/DEBUG: rax 00007d4eb4e87071 rbx 0000000000000001 rcx 00007d4eb3e5d800 rdx 00007d4eb3e5c698 2020-01-23 08:21:41.956 8937-8937/? A/DEBUG: r8 0000000000000000 r9 00007d4eb3e5d878 r10 00007d4eb3582169 r11 0000000000000009 2020-01-23 08:21:41.956 8937-8937/? A/DEBUG: r12 00007d4eb3e5c728 r13 00007d4eb718a7b0 r14 00007d4eb3e5d878 r15 00007d4eb718d8c8 2020-01-23 08:21:41.956 8937-8937/? A/DEBUG: rdi 00007d4eb3e5c7d8 rsi 00007d4eb3e5c728 2020-01-23 08:21:41.956 8937-8937/? A/DEBUG: rbp 00007d4eb66cb2d8 rsp 00007d4eb66cb1d8 rip 00007d4eb54ea9f0 2020-01-23 08:21:42.235 8937-8937/? A/DEBUG: backtrace: 2020-01-23 08:21:42.235 8937-8937/? A/DEBUG: #00 pc 00000000000049f0 /data/app/com.example.x64bug-sRbEFFK48NVaMsaOwpSFGA==/lib/x86_64/libapp.so (offset 0x2000) (_kDartVmSnapshotInstructions+10736) 2020-01-23 08:21:42.407 2057-2090/? E/memtrack: Couldn't load memtrack module 2020-01-23 08:21:42.536 1891-1891/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_01
EDIT: I can also confirm that x86_x64 APK release build from MacOs works.
@rmacnak-google @jason-simmons was this issue resolved?
still not resolved.
Can confirm it's still not working on Windows. On Mac OS works as expected.
pet, 22. svi 2020. 16:19 pandaxar notifications@github.com je napisao:
still not resolved.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/flutter/flutter/issues/44425#issuecomment-632717145, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANSJO5COYOEU26MP7OHP2TRS2CVXANCNFSM4JKTUKMA .
I verified that this does still happen using an x86_64 android emulator on windows. Pulling the tombstone and symbolizing gives me the incredibly helpful result:
Build fingerprint: 'google/sdk_gphone_x86_64_arm64/generic_x86_64_arm64:10/RPP4.200409.015/6455311:userdebug/dev-keys'
#00 0x0000000000004a73 /data/app/~~MRraWK74RPNylJGbMAnw5A==/io.flutter.demo.gallery-ljL1wUy_dBVxmChPH7ijdQ==/lib/x86_64/libapp.so (offset 0x2000) (_kDartVmSnapshotInstructions+10867)
Crash dump is completed
So it seems like the windows build of gen_snapshot isn't outputting the correct format. A cursory reading of our own gn configuration seems to be correct: gn --runtime-mode=release --android --android-cpu=x64
, and arm release builds otherwise work.
My guess is that somewhere in either flutter or dart's gn files, there is some windows config check that only applies if it thinks we're doing a host build, though I haven't been able to find it
FYI @zanderso
@jonahwilliams can you get the gen_snapshot
command line from the verbose logs?
@rmacnak-google does that crash dump ring any bells?
executing: C:\Users\Jonah\flutter\bin\cache\artifacts\engine\android-x64-release\windows-x64\gen_snapshot --deterministic --snapshot_kind=app-aot-elf
--elf=C:\Users\Jonah\flutter\dev\integration_tests\flutter_gallery\.dart_tool\flutter_build\6c2e4dad08177f3a3bcfc95c79acd299\x86_64\app.so --strip --no-causal-async-stacks --lazy-async-stacks
C:\Users\Jonah\flutter\dev\integration_tests\flutter_gallery\.dart_tool\flutter_build\6c2e4dad08177f3a3bcfc95c79acd299\app.dill
gen_snapshot on windows and on linux produce different binaries. In assembly there are a lot of differences in offsets in relative calls (call [rax + rcx*8 + const]). But here is a snippet of a difference in disassembly where it seems that inferred types differ in flow graph(T{_CustomZone} on windows, T{Zone} on linux):
157848,157849c157848,157849
< 0x2bd 483dfc0b0000 cmpq rax,0xbfc
< 0x2c3 0f8508000000 jnz +14
---
> 0x2bd 483dfe0b0000 cmpq rax,0xbfe
> 0x2c3 0f851d000000 jnz +35
157852,157858c157852
< ;; ParallelMove rax <- rdx goto:14 B102
< ;; Inlined [_Zone@4048458.inSameErrorZone]
< 0x2c9 4889d0 movq rax,rdx
< 0x2cc e918000000 jmp +29
< ;; B101
< ;; Loop 1
< ;; v475 <- LoadField(v178 T{Zone} . _handleUncaughtError@4048458) T{_ZoneFunction?}
---
> ;; v468 <- LoadField(v178 T{_CustomZone} . _handleUncaughtError@4048458) T{_ZoneFunction?}
differences show up in flow graph(for example, for _parse method from integers_patch.dart: https://gist.github.com/aam/d06a515b304682410f6b55607fcaff01) where types on Windows and Linux differ: on windows
48: B43[target]:38
50: v177 <- LoadField(v2 T{_TwoByteString} . String.length {final}) [0, 2305843009213693951] T{_Smi}
52: GenericCheckBound:38(v177, v14) [-9223372036854775808, 9223372036854775807] T{int}
54: v181 <- LoadIndexed(v2 T{_TwoByteString}, v14 T{int}) [0, 65535] T{_Smi}
vs linux:
48: B43[target]:38
50: v177 <- LoadField(v2 T{_OneByteString} . String.length {final}) [0, 2305843009213693951] T{_Smi}
52: GenericCheckBound:38(v177, v14) [-9223372036854775808, 9223372036854775807] T{int}
54: ParallelMove rdi <- rcx
54: v181 <- LoadIndexed(v2 T{_OneByteString}, v14 T{int}) [0, 255] T{_Smi}
@alexmarkov do you have any insight into a way to troubleshoot type differences?
@aam Are there any differences in intermediate app.dill
files?
They can be dumped using the following command:
dart --packages=$DART_SDK/.packages $DART_SDK/pkg/vm/bin/dump_kernel.dart app.dill app.dill.dump
It's the same dill file.
https://gist.github.com/aam/7fd1b8d8bf827d3a2489777957a1b45d is with --trace-type-propagation
It looks like a different order of variants when inlining a polymorphic call _StringBase.codeUnitAt
.
This difference, in turn, might be caused by different order of call targets in CallTargets
corresponding to this call.
Difference in the order of targets in CallTargets
can be caused by difference in the order of Class::direct_subclasses()
, which in turn might be different if classes are loaded/finalized in a slightly different order.
Anyway, it is unlikely that this particular difference causes crashes.
@alexmarkov Is this a (unrelated) bug in the --deterministic
flag, though?
@zanderso Maybe. However, I'm not sure we guarantee consistency between platforms - there might be some platform-specific code paths which cause the difference in the class finalization order.
different order in type computation is one thing, but I would expect type annotations in resulting flow graph be identical, and they are not(see https://github.com/flutter/flutter/issues/44425#issuecomment-636058281 above)
cc @rmacnak-google
@aam We actually inlined different method bodies in different order. They look similar enough and different only in some type annotations so it may seems like the difference is only in types, but they are in fact different bodies. They are also guarded by different cids - look at the difference in constants at the beginning of the flow graph.
They are also guarded by different cids - look at the difference in constants at the beginning of the flow graph.
Ah, yes, makes sense.
which in turn might be different if classes are loaded/finalized in a slightly different order.
FWIW, running with --trace-class-finalization
doesn't show any differences in Finalize types in Library:... Class:...
log statements between windows and linux.
Turns out that it's qsort
that results in different order of the call targets: https://github.com/dart-lang/sdk/blob/master/runtime/vm/compiler/backend/il.cc#L3830.
Basically all targets compared equally and as a result their order in the resulting array is unspecified.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
In Flutter master there's now an option to build an apk in release mode for android-x64. I've tried it but the application seems to crash as soon as i open it.
Steps to Reproduce
flutter build apk --target-platform=android-x64
(you don't need to specify the target platform as android-x64 is now a default platform for an apk build)adb install app-release.apk
The application will start with a blank screen and crash.
Reproducing the same steps on a physical device (android-x64) gives the same outcome.
Running
flutter run --release
won't work as release mode is not supported for emulators. Runningflutter run --release
with an android-x64 physical device doesn't work either asprofile and release builds are only supported on ARM targets
.Target Platform: android-x64 Target OS version/browser: Android 8.1 API 27 Devices: AVD device or android-x86_64 physical device
AVD Info: Name: 24_screen_API_27 CPU/ABI: Intel Atom (x86_64) Path: C:\Users\Mattia.android\avd\24_screen_API_27.avd Target: default [Default Android System Image] (API level 27) Skin: 1080x1920 SD Card: 512M fastboot.chosenSnapshotFile: runtime.network.speed: full hw.accelerometer: yes hw.device.name: 24" screen hw.lcd.width: 1080 hw.initialOrientation: Portrait image.androidVersion.api: 27 tag.id: default hw.mainKeys: no hw.camera.front: emulated avd.ini.displayname: 24 screen API 27 hw.gpu.mode: auto hw.ramSize: 1536 PlayStore.enabled: false fastboot.forceColdBoot: no hw.cpu.ncore: 2 hw.keyboard: yes hw.sensors.proximity: yes hw.dPad: no hw.lcd.height: 1920 vm.heapSize: 48 skin.dynamic: yes hw.device.manufacturer: User hw.gps: yes skin.path.backup: _no_skin hw.audioInput: yes image.sysdir.1: system-images\android-27\default\x86_64\ showDeviceFrame: no hw.camera.back: virtualscene AvdId: 24_screen_API_27 hw.lcd.density: 120 hw.arc: false hw.device.hash2: MD5:3b3f6397936b2dc5f59c9c9405275271 fastboot.forceChosenSnapshotBoot: no fastboot.forceFastBoot: yes hw.trackBall: no hw.battery: yes hw.sdCard: yes tag.display: Default Android System Image runtime.network.latency: none disk.dataPartition.size: 800M hw.sensors.orientation: yes avd.ini.encoding: UTF-8 hw.gpu.enabled: yes
Logs
Running
flutter build apk --target-platform=android-x64 --verbose
:Running
flutter analyze
:Running
flutter doctor -v
:The connected device that you see in
flutter doctor
is the physical device that I've used to reproduce this issue.