flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
162.18k stars 26.64k forks source link

App crash in flutter::PlatformView::NotifyCreated() (in Flutter) (platform_view.cc:73) #146257

Closed jayden320 closed 2 weeks ago

jayden320 commented 1 month ago

Steps to reproduce

We didn't find steps to reproduce. It was the online reporting platform that collected the crash.

Expected results

App will not crash

Actual results

App crash

Code sample

We didn't find steps to reproduce.

Screenshots or Video

No response

Logs

Logs ```console Thread 0 name: com.apple.main-thread (cpu_usage: 0.00%) libsystem_kernel.dylib ___psynch_cvwait (in libsystem_kernel.dylib) libsystem_pthread.dylib __pthread_cond_wait (in libsystem_pthread.dylib) Flutter std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock&) (in Flutter:16) Flutter flutter::PlatformView::NotifyCreated() (in Flutter:platform_view.cc:73) Flutter -[FlutterViewController viewDidLayoutSubviews] (in Flutter:FlutterViewController.mm:1305) UIKitCore -[UIView(CALayerDelegate) layoutSublayersOfLayer:] (in UIKitCore) QuartzCore CA::Layer::layout_if_needed(CA::Transaction*) (in QuartzCore) QuartzCore CA::Layer::layout_and_display_if_needed(CA::Transaction*) (in QuartzCore) QuartzCore CA::Context::commit_transaction(CA::Transaction*, double, double*) (in QuartzCore) QuartzCore CA::Transaction::commit() (in QuartzCore) QuartzCore CA::Transaction::flush_as_runloop_observer(bool) (in QuartzCore) UIKitCore __UIApplicationFlushCATransaction (in UIKitCore) UIKitCore __UIUpdateSequenceRun (in UIKitCore) UIKitCore _schedulerStepScheduledMainSection (in UIKitCore) UIKitCore _runloopSourceCallback (in UIKitCore) CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ (in CoreFoundation) CoreFoundation ___CFRunLoopDoSource0 (in CoreFoundation) CoreFoundation ___CFRunLoopDoSources0 (in CoreFoundation) CoreFoundation ___CFRunLoopRun (in CoreFoundation) CoreFoundation _CFRunLoopRunSpecific (in CoreFoundation) GraphicsServices _GSEventRunModal (in GraphicsServices) UIKitCore -[UIApplication _run] (in UIKitCore) UIKitCore _UIApplicationMain (in UIKitCore) MyApp main (in MyApp:AppDelegate.swift:39) dyld start (in dyld) Thread 98 name: MyApp.1.1.raster (cpu_usage: 0.00%) libsystem_kernel.dylib ___psynch_cvwait (in libsystem_kernel.dylib) libsystem_pthread.dylib __pthread_cond_wait (in libsystem_pthread.dylib) Flutter std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock&) (in Flutter:16) Flutter std::_LIBCPP_ABI_NAMESPACE::__assoc_sub_state::__sub_wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock&) (in Flutter:future.cpp:160) Flutter std::_LIBCPP_ABI_NAMESPACE::__assoc_state > >::copy() (in Flutter:future:699) Flutter impeller::ContentContext::ContentContext(std::_LIBCPP_ABI_NAMESPACE::shared_ptr) (in Flutter:content_context.cc:310) Flutter impeller::AiksContext::AiksContext(std::_LIBCPP_ABI_NAMESPACE::shared_ptr) (in Flutter:aiks_context.cc:12) Flutter flutter::GPUSurfaceMetalImpeller::GPUSurfaceMetalImpeller(flutter::GPUSurfaceMetalDelegate*, std::_LIBCPP_ABI_NAMESPACE::shared_ptr const&, bool) (in Flutter:gpu_surface_metal_impeller.mm:39) Flutter flutter::IOSSurfaceMetalImpeller::CreateGPUSurface(GrDirectContext*) (in Flutter:ios_surface_metal_impeller.mm:42) Flutter flutter::PlatformViewIOS::CreateRenderingSurface() (in Flutter:platform_view_ios.mm:152) Flutter std::_LIBCPP_ABI_NAMESPACE::__function::__func, void ()>::operator()() (in Flutter:function.h:359) Flutter fml::MessageLoopImpl::FlushTasks(fml::FlushType) (in Flutter:message_loop_impl.cc:126) Flutter fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) (in Flutter:message_loop_darwin.mm:85) CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ (in CoreFoundation) CoreFoundation ___CFRunLoopDoTimer (in CoreFoundation) CoreFoundation ___CFRunLoopDoTimers (in CoreFoundation) CoreFoundation ___CFRunLoopRun (in CoreFoundation) CoreFoundation _CFRunLoopRunSpecific (in CoreFoundation) Flutter fml::MessageLoopDarwin::Run() (in Flutter:message_loop_darwin.mm:51) Flutter std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000] >, fml::Thread::Thread(std::_LIBCPP_ABI_NAMESPACE::function const&, fml::ThreadConfig const)::$_0> >(std::_LIBCPP_ABI_NAMESPACE::tuple >, fml::Thread::Thread(std::_LIBCPP_ABI_NAMESPACE::function const&, fml::ThreadConfig const)::$_0>) (in Flutter:204) libsystem_pthread.dylib __pthread_start (in libsystem_pthread.dylib) libsystem_pthread.dylib _thread_start (in libsystem_pthread.dylib) Thread 99 name: MyApp.1.1.io (cpu_usage: 0.00%) libsystem_kernel.dylib _mach_msg2_trap (in libsystem_kernel.dylib) libsystem_kernel.dylib _mach_msg2_internal (in libsystem_kernel.dylib) libsystem_kernel.dylib _mach_msg_overwrite (in libsystem_kernel.dylib) libsystem_kernel.dylib _mach_msg (in libsystem_kernel.dylib) CoreFoundation ___CFRunLoopServiceMachPort (in CoreFoundation) CoreFoundation ___CFRunLoopRun (in CoreFoundation) CoreFoundation _CFRunLoopRunSpecific (in CoreFoundation) Flutter fml::MessageLoopDarwin::Run() (in Flutter:message_loop_darwin.mm:51) Flutter std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000] >, fml::Thread::Thread(std::_LIBCPP_ABI_NAMESPACE::function const&, fml::ThreadConfig const)::$_0> >(std::_LIBCPP_ABI_NAMESPACE::tuple >, fml::Thread::Thread(std::_LIBCPP_ABI_NAMESPACE::function const&, fml::ThreadConfig const)::$_0>) (in Flutter:204) libsystem_pthread.dylib __pthread_start (in libsystem_pthread.dylib) libsystem_pthread.dylib _thread_start (in libsystem_pthread.dylib) Thread 100 name: io.worker.1 (cpu_usage: 0.00%) libsystem_kernel.dylib ___psynch_cvwait (in libsystem_kernel.dylib) libsystem_pthread.dylib __pthread_cond_wait (in libsystem_pthread.dylib) Flutter std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock&) (in Flutter:16) Flutter std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000] >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(std::_LIBCPP_ABI_NAMESPACE::tuple >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>) (in Flutter:thread:295) libsystem_pthread.dylib __pthread_start (in libsystem_pthread.dylib) libsystem_pthread.dylib _thread_start (in libsystem_pthread.dylib) Thread 101 name: io.worker.2 (cpu_usage: 0.00%) libsystem_kernel.dylib ___psynch_cvwait (in libsystem_kernel.dylib) libsystem_pthread.dylib __pthread_cond_wait (in libsystem_pthread.dylib) Flutter std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock&) (in Flutter:16) Flutter std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000] >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(std::_LIBCPP_ABI_NAMESPACE::tuple >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>) (in Flutter:thread:295) libsystem_pthread.dylib __pthread_start (in libsystem_pthread.dylib) libsystem_pthread.dylib _thread_start (in libsystem_pthread.dylib) Thread 102 name: io.worker.3 (cpu_usage: 0.00%) libsystem_kernel.dylib ___psynch_cvwait (in libsystem_kernel.dylib) libsystem_pthread.dylib __pthread_cond_wait (in libsystem_pthread.dylib) Flutter std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock&) (in Flutter:16) Flutter std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000] >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(std::_LIBCPP_ABI_NAMESPACE::tuple >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>) (in Flutter:thread:295) libsystem_pthread.dylib __pthread_start (in libsystem_pthread.dylib) libsystem_pthread.dylib _thread_start (in libsystem_pthread.dylib) Thread 103 name: io.worker.4 (cpu_usage: 0.00%) libsystem_kernel.dylib ___psynch_cvwait (in libsystem_kernel.dylib) libsystem_pthread.dylib __pthread_cond_wait (in libsystem_pthread.dylib) Flutter std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock&) (in Flutter:16) Flutter std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000] >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(std::_LIBCPP_ABI_NAMESPACE::tuple >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>) (in Flutter:thread:295) libsystem_pthread.dylib __pthread_start (in libsystem_pthread.dylib) libsystem_pthread.dylib _thread_start (in libsystem_pthread.dylib) Thread 104 name: io.worker.5 (cpu_usage: 0.00%) libsystem_kernel.dylib ___psynch_cvwait (in libsystem_kernel.dylib) libsystem_pthread.dylib __pthread_cond_wait (in libsystem_pthread.dylib) Flutter std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock&) (in Flutter:16) Flutter std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000] >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(std::_LIBCPP_ABI_NAMESPACE::tuple >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>) (in Flutter:thread:295) libsystem_pthread.dylib __pthread_start (in libsystem_pthread.dylib) libsystem_pthread.dylib _thread_start (in libsystem_pthread.dylib) Thread 105 name: io.worker.6 (cpu_usage: 0.00%) libsystem_kernel.dylib ___psynch_cvwait (in libsystem_kernel.dylib) libsystem_pthread.dylib __pthread_cond_wait (in libsystem_pthread.dylib) Flutter std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock&) (in Flutter:16) Flutter std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000] >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(std::_LIBCPP_ABI_NAMESPACE::tuple >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>) (in Flutter:thread:295) libsystem_pthread.dylib __pthread_start (in libsystem_pthread.dylib) libsystem_pthread.dylib _thread_start (in libsystem_pthread.dylib) Thread 106 name: dart:io EventHandler (cpu_usage: 0.00%) libsystem_kernel.dylib _kevent (in libsystem_kernel.dylib) Flutter dart::bin::EventHandlerImplementation::EventHandlerEntry(unsigned long) (in Flutter:eventhandler_macos.cc:459) Flutter dart::bin::ThreadStart(void*) (in Flutter:thread_macos.cc:91) libsystem_pthread.dylib __pthread_start (in libsystem_pthread.dylib) libsystem_pthread.dylib _thread_start (in libsystem_pthread.dylib) Thread 107 name: io.worker.1 (cpu_usage: 0.00%) libsystem_kernel.dylib ___psynch_cvwait (in libsystem_kernel.dylib) libsystem_pthread.dylib __pthread_cond_wait (in libsystem_pthread.dylib) Flutter std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock&) (in Flutter:16) Flutter std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000] >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(std::_LIBCPP_ABI_NAMESPACE::tuple >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>) (in Flutter:thread:295) libsystem_pthread.dylib __pthread_start (in libsystem_pthread.dylib) libsystem_pthread.dylib _thread_start (in libsystem_pthread.dylib) Thread 108 name: io.worker.2 (cpu_usage: 0.00%) libsystem_kernel.dylib ___psynch_cvwait (in libsystem_kernel.dylib) libsystem_pthread.dylib __pthread_cond_wait (in libsystem_pthread.dylib) Flutter std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock&) (in Flutter:16) Flutter std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000] >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(std::_LIBCPP_ABI_NAMESPACE::tuple >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>) (in Flutter:thread:295) libsystem_pthread.dylib __pthread_start (in libsystem_pthread.dylib) libsystem_pthread.dylib _thread_start (in libsystem_pthread.dylib) Thread 109 name: io.worker.3 (cpu_usage: 0.00%) libsystem_kernel.dylib ___psynch_cvwait (in libsystem_kernel.dylib) libsystem_pthread.dylib __pthread_cond_wait (in libsystem_pthread.dylib) Flutter std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock&) (in Flutter:16) Flutter std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000] >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(std::_LIBCPP_ABI_NAMESPACE::tuple >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>) (in Flutter:thread:295) libsystem_pthread.dylib __pthread_start (in libsystem_pthread.dylib) libsystem_pthread.dylib _thread_start (in libsystem_pthread.dylib) Thread 110 name: io.worker.4 (cpu_usage: 0.00%) libsystem_kernel.dylib ___psynch_cvwait (in libsystem_kernel.dylib) libsystem_pthread.dylib __pthread_cond_wait (in libsystem_pthread.dylib) Flutter std::_LIBCPP_ABI_NAMESPACE::condition_variable::wait(std::_LIBCPP_ABI_NAMESPACE::unique_lock&) (in Flutter:16) Flutter std::_LIBCPP_ABI_NAMESPACE::__thread_proxy[abi:v15000] >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(std::_LIBCPP_ABI_NAMESPACE::tuple >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0>) (in Flutter:thread:295) libsystem_pthread.dylib __pthread_start (in libsystem_pthread.dylib) libsystem_pthread.dylib _thread_start (in libsystem_pthread.dylib) ```

Flutter Doctor output

Doctor output ```console [!] Flutter (Channel [user-branch], 3.13.8, on macOS 13.5 22G74 darwin-arm64, locale en-CN) ! Flutter version 3.13.8 on channel [user-branch] at /Users/jayden/Flutter/flutter Currently on an unknown channel. Run `flutter channel` to switch to an official channel. If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install. ! Upstream repository unknown source is not a standard remote. Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error. [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] VS Code (version 1.87.2) [✓] Connected device (3 available) [✓] Network resources ```
danagbemava-nc commented 1 month ago

Hi @jayden320, what device(s) are you seeing this crash on?

Also, it appears you're using an older version of flutter. Can you try upgrading to the latest version of flutter stable to see if you still experience this issue?

jayden320 commented 1 month ago

image Hello. It appeared on most iOS devices, such as: iPhone 7, iPhone Xs Max, iPhone 11~15. iOS system version in 15, 16, and 17.

OK, thanks. We will upgrade flutter to 3.19.5 in the near future

danagbemava-nc commented 1 month ago

Please keep up us updated if you still face this issue after upgrading to the latest stable

github-actions[bot] commented 2 weeks ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

github-actions[bot] commented 2 days ago

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.