Closed fzyzcjy closed 1 year ago
https://stackoverflow.com/questions/1864479/crash-logs-generated-by-iphone-simulator
(base) ➜ ~ ls ~/Library/Logs/DiagnosticReports/ ... Runner_2022-05-12-082607_TomdeMac-mini.crash
last night crash
last morning crash
seems to have common cause:
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [47660]
...
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff2019cc38 objc_retain + 8
1 libsystem_blocks.dylib 0x00007fff2008a629 _Block_object_assign + 190
2 io.flutter.flutter 0x0000000105d0ff1f __copy_helper_block_e8_32o40b + 31
3 libsystem_blocks.dylib 0x00007fff2008a393 _Block_copy + 198
4 com.apple.UIKitCore 0x00007fff255b0113 +[UIViewAnimationBlockDelegate animationBlockDelegateWithDuration:options:start:completion:] + 161
5 com.apple.UIKitCore 0x00007fff2557e97f -[UIViewAnimationState setupWithDuration:delay:view:options:factory:parentState:start:completion:] + 545
6 com.apple.UIKitCore 0x00007fff255b0aac +[UIView _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 548
7 com.apple.UIKitCore 0x00007fff255b0e55 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:animations:completion:] + 30
8 io.flutter.flutter 0x0000000105d2a163 -[FlutterViewController removeSplashScreenView:] + 178
9 io.flutter.flutter 0x0000000105d2f63e std::__1::__function::__func<-[FlutterViewController installFirstFrameCallback]::$_0::operator()() const::'lambda'(), std::__1::allocator<-[FlutterViewController installFirstFrameCallback]::$_0::operator()() const::'lambda'()>, void ()>::operator()() + 164
10 io.flutter.flutter 0x000000010607fef0 fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 164
11 io.flutter.flutter 0x0000000106086324 fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 26
12 com.apple.CoreFoundation 0x00007fff2036a6c6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
13 com.apple.CoreFoundation 0x00007fff2036a1c2 __CFRunLoopDoTimer + 923
14 com.apple.CoreFoundation 0x00007fff20369781 __CFRunLoopDoTimers + 265
15 com.apple.CoreFoundation 0x00007fff20363dc0 __CFRunLoopRun + 2010
16 com.apple.CoreFoundation 0x00007fff20363103 CFRunLoopRunSpecific + 567
17 com.apple.GraphicsServices 0x00007fff2c851cd3 GSEventRunModal + 139
18 com.apple.UIKitCore 0x00007fff24ffbe63 -[UIApplication _run] + 928
19 com.apple.UIKitCore 0x00007fff25000a53 UIApplicationMain + 101
20 com.example.example 0x000000010347cecf main + 63 (AppDelegate.swift:5)
21 dyld_sim 0x0000000103494e1e start_sim + 10
22 ??? 0x0000000000000001 0 + 1
23 ??? 0x0000000000000007 0 + 7
wait until we upgrade to flutter 3.0. maybe it is fixed later?
see again today.
Logs
have a look at FlutterViewController removeSplashScreenView
just a guess.
If so, can we avoid it?
[TODO]
after all the code fixes, it still crashes sometimes.
Another guess
Is it because, when the worker is started and hot-restarted, it has not pump any frames?
Experiment: close everything - run worker - run manager - click "connect" and then "run all" in manager -> No crash this time... (since randomly)
Maybe this guess is also wrong
given that https://github.com/flutter/flutter/issues/37818 is fixed by https://github.com/flutter/engine/pull/34496, we will not face this problem after next (or next-next) flutter release once that PR is in stable branch.
A similar crash happened to me.
Good to know that this is not only seen by me. Anyway, flutter seems to have fixed the issue, and I have reported your report there as well just now
Ah, that's cool!
It automatically fixes when that fix lands in stable
or we upgrade our local projects to master
or beta
(when it lands)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
bump until confirmed
Just to say that I'm experiencing this issue in CI even with the latest flutter master. (GitHub actions, ubuntu-lates, Android emulator)
Currently doing some testing to see how often it loses connection, and if there's any benefit to using macos/windows.
If it is very regular I would be in favour of a flutter test version (even if some features are lost). Although got web support to look at first.
@rob-mur That is a bug of Flutter (not this repo), could you please file a bug there if you still see it?
Yep of course, not saying it's your fault at all. I will do if I can get enough consistent log reports - it's not very consistent!
@rob-mur Take your time :) Maybe link to this issue as well in that bug report so I will know it (and flutter team will know some more context)
For now I think my two options are to either just use integration test for CI until they fix this, or to create a stripped down version of this tool for CI which doesn't need the manager/hot restarting. I'm leaning towards the former for now in the hopes they just fix the issue to avoid rewriting your tool!
I am also looking forward to they fixing this!
Hey, they've asked for a minimal repro that doesn't use your tester. Could you please point me towards how you got restart a running app?
(Otherwise I can look it up but it would save me some time!)
Thanks, I'll take a look when I can.
I've also tried recently moving to a hardware accelerated enabled (gpu passthrough + kvm enabled) self hosted Linux container and this seems to have reduced the incidence of the error.
Will keep you posted.
Btw I also reproduced yesterday. following is the error message.
the error is a little bit different from the one a few month ago indeed - now it is an exception
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
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 issue.
[TODO] firstly, examine whether there is a crash log
[TODO] maybe the isolate we send hotRestart to is wrong?