Repository navigation
App Freezing on Hot Reload when using FutureBuilder and MethodChannel #30911
Copy link
Copy link
Closed
Labels
c: crashStack traces logged to the consoleStack traces logged to the console
Description
App crashes when Navigating between Widgets.
04-11 16:10:10.014 32656-32691/? E/ContactsProvider_EventLog: Flush buffer to file cnt : 1 size : 0Kb duration : 6ms lastUpdatedAfter : 20672 ms mFlush_time_threasold : 2000 mCurrentSize : 360
04-11 16:10:10.306 9139-9139/ir.yabco.flutter.goggles A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x6e61724d in tid 9139 (flutter.goggles)
[ 04-11 16:10:10.308 2220: 2220 W/ ]
debuggerd: handling request: pid=9139 uid=10239 gid=10239 tid=9139
04-11 16:10:10.394 9899-9899/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-11 16:10:10.394 9899-9899/? A/DEBUG: Build fingerprint: 'samsung/a5xeltexx/a5xelte:7.0/NRD90M/A510FXXS7CRJA:user/release-keys'
04-11 16:10:10.394 9899-9899/? A/DEBUG: Revision: '9'
04-11 16:10:10.395 9899-9899/? A/DEBUG: ABI: 'arm'
04-11 16:10:10.395 9899-9899/? A/DEBUG: pid: 9139, tid: 9139, name: flutter.goggles >>> ir.yabco.flutter.goggles <<<
04-11 16:10:10.395 9899-9899/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x6e61724d
04-11 16:10:10.395 9899-9899/? A/DEBUG: r0 c2b2bbe0 r1 00000004 r2 0000000b r3 0000004d
04-11 16:10:10.395 9899-9899/? A/DEBUG: r4 00000004 r5 df7b5e08 r6 0000000b r7 00000051
04-11 16:10:10.395 9899-9899/? A/DEBUG: r8 6e617249 r9 cd0b3f24 sl 0000000a fp 0000000a
04-11 16:10:10.396 9899-9899/? A/DEBUG: ip ff91c250 sp ff91c208 lr cdaaba17 pc cdaaba36 cpsr 200b0030
04-11 16:10:10.975 9899-9899/? A/DEBUG: backtrace:
04-11 16:10:10.975 9899-9899/? A/DEBUG: #00 pc 00aeca36 /data/app/ir.yabco.flutter.goggles-1/lib/arm/libflutter.so (offset 0xae8000)
04-11 16:10:10.975 9899-9899/? A/DEBUG: #01 pc 00aebe5d /data/app/ir.yabco.flutter.goggles-1/lib/arm/libflutter.so (offset 0xae8000)
04-11 16:10:10.975 9899-9899/? A/DEBUG: #02 pc 00aebd8b /data/app/ir.yabco.flutter.goggles-1/lib/arm/libflutter.so (offset 0xae8000)
04-11 16:10:10.975 9899-9899/? A/DEBUG: #03 pc 00b1ba07 /data/app/ir.yabco.flutter.goggles-1/lib/arm/libflutter.so (offset 0xae8000)
04-11 16:10:10.975 9899-9899/? A/DEBUG: #04 pc 00af68b7 /data/app/ir.yabco.flutter.goggles-1/lib/arm/libflutter.so (offset 0xae8000)
04-11 16:10:10.975 9899-9899/? A/DEBUG: #05 pc 00af93c3 /data/app/ir.yabco.flutter.goggles-1/lib/arm/libflutter.so (offset 0xae8000)
04-11 16:10:10.975 9899-9899/? A/DEBUG: #06 pc 00011fcb /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+614)
04-11 16:10:10.975 9899-9899/? A/DEBUG: #07 pc 00011cd7 /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+26)
04-11 16:10:10.975 9899-9899/? A/DEBUG: #08 pc 000972dd /system/lib/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvP8_jobjecti+22)
04-11 16:10:10.975 9899-9899/? A/DEBUG: #09 pc 0260e3a5 /system/framework/arm/boot-framework.oat (offset 0x1ef8000) (android.os.MessageQueue.nativePollOnce+96)
04-11 16:10:10.975 9899-9899/? A/DEBUG: #10 pc 0260f8c1 /system/framework/arm/boot-framework.oat (offset 0x1ef8000) (android.os.MessageQueue.next+188)
04-11 16:10:10.975 9899-9899/? A/DEBUG: #11 pc 0260afa9 /system/framework/arm/boot-framework.oat (offset 0x1ef8000) (android.os.Looper.loop+364)
04-11 16:10:10.975 9899-9899/? A/DEBUG: #12 pc 01f8ef93 /system/framework/arm/boot-framework.oat (offset 0x1ef8000) (android.app.ActivityThread.main+598)
04-11 16:10:10.975 9899-9899/? A/DEBUG: #13 pc 000a9341 /system/lib/libart.so (art_quick_invoke_stub_internal+64)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #14 pc 00407961 /system/lib/libart.so (art_quick_invoke_static_stub+228)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #15 pc 000b065f /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+182)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #16 pc 00316d0b /system/lib/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+58)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #17 pc 0031807f /system/lib/libart.so (_ZN3art12InvokeMethodERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectS4_S4_j+766)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #18 pc 002be761 /system/lib/libart.so (_ZN3artL13Method_invokeEP7_JNIEnvP8_jobjectS3_S3_+40)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #19 pc 00606159 /system/framework/arm/boot.oat (offset 0x56f000) (java.lang.reflect.Method.invoke+116)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #20 pc 02bb5a01 /system/framework/arm/boot-framework.oat (offset 0x1ef8000) (com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run+100)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #21 pc 02bb7055 /system/framework/arm/boot-framework.oat (offset 0x1ef8000) (com.android.internal.os.ZygoteInit.main+1680)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #22 pc 000a9341 /system/lib/libart.so (art_quick_invoke_stub_internal+64)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #23 pc 00407961 /system/lib/libart.so (art_quick_invoke_static_stub+228)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #24 pc 000b065f /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+182)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #25 pc 00316d0b /system/lib/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+58)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #26 pc 00316b1b /system/lib/libart.so (_ZN3art17InvokeWithVarArgsERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDSt9__va_list+266)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #27 pc 00278b17 /system/lib/libart.so (_ZN3art3JNI21CallStaticVoidMethodVEP7_JNIEnvP7_jclassP10_jmethodIDSt9__va_list+426)
04-11 16:10:10.976 9899-9899/? A/DEBUG: #28 pc 0006a595 /system/lib/libandroid_runtime.so
04-11 16:10:10.976 9899-9899/? A/DEBUG: #29 pc 0006c00b /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime5startEPKcRKNS_6VectorINS_7String8EEEb+510)
04-11 16:10:10.977 9899-9899/? A/DEBUG: #30 pc 00002e67 /system/bin/app_process32
04-11 16:10:10.977 9899-9899/? A/DEBUG: #31 pc 00016d79 /system/lib/libc.so (__libc_init+48)
04-11 16:10:10.977 9899-9899/? A/DEBUG: #32 pc 0000295c /system/bin/app_process32
[ 04-11 16:10:11.539 9899: 9899 E/ ]
ro.debug_level = 0x4f4c
[ 04-11 16:10:11.539 9899: 9899 E/ ]
sys.mobilecare.preload = false
04-11 16:10:11.541 2228-2228/? E/audit: type=1701 audit(1554982811.531:362684): auid=4294967295 uid=10239 gid=10239 ses=4294967295 subj=u:r:untrusted_app:s0:c512,c768 pid=9139 comm="flutter.goggles" reason="memory violation" sig=11
04-11 16:10:11.574 2334-2334/? E/lowmemorykiller: Error writing /proc/9139/oom_score_adj; errno=22
04-11 16:10:11.682 2904-3018/? E/InputDispatcher: channel ~ Channel is unrecoverably broken and will be disposed!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: crashStack traces logged to the consoleStack traces logged to the console
Activity
p30arena commentedon Apr 11, 2019
p30arena commentedon Apr 11, 2019
I've made a native package, and I'm using a MethodChannel in this widget.
I'm creating a Thread, and calling result.success from the Thread.
Is this causing the crash?
p30arena commentedon Apr 11, 2019
I'm not getting crashes after running result functions on the ui thread
Is this correct?
or should I run on another thread?
p30arena commentedon Apr 11, 2019
https://docs.flutter.io/javadoc/io/flutter/plugin/common/MethodChannel.Result.html
https://docs.flutter.io/javadoc/io/flutter/plugin/common/EventChannel.EventSink.html
Its interesting that I couldn't find the same statement for event sink
p30arena commentedon Apr 11, 2019
also my app is freezing on a hot reload
p30arena commentedon Apr 11, 2019
I replaced the above code with:
to make sure that the result methods are being called on the main thread,
but still, app freezes on hot reloads.
[-]Weird Crash[/-][+][Platform] App Crash + Freezing on Hot Reload[/+]p30arena commentedon Apr 12, 2019
I have to do hot reload 2 times to get the UI working (unfreeze)
I don't know if this is related to the native plugin or not
p30arena commentedon Apr 13, 2019
When I set a break point in the future of FutureBuilder,
the hot-reload works correctly,
but when I unset the break point,
first hot-reload freezes the UI, and the second one unfreezes it.
It seems that when there's a Fast-Path to Invoking a MethodChannel on Hot-Reload, the UI Freezes, but when there's enough time for something to Happen? the MethodChannel doesn't Freeze the UI.
But it still doesn't satisfy me, because the second Hot-Reload cleans up the mess of the First one.
This is only happening in the FutureBuilder
[-][Platform] App Crash + Freezing on Hot Reload[/-][+]App Freezing on Hot Reload when using FutureBuilder and MethodChannel[/+]techtunde commentedon May 4, 2019
@p30arena were you able to fix this since you closed the issue?
p30arena commentedon May 4, 2019
github-actions commentedon Aug 30, 2021
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 -vand a minimal reproduction of the issue.