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
166.19k stars 27.49k forks source link

App crashes with void* std::_fl::__libcpp_operator_new #153266

Closed WinJayQ closed 2 months ago

WinJayQ commented 3 months ago

Steps to reproduce

This is an occasional crash, I don't know what causes it. testflight feedback some logs.

Code sample

Code sample ```dart [Paste your code here] ```

What target platforms are you seeing this bug on?

iOS

OS/Browser name and version | Device information

iPhone 13,iOS 15.2

Does the problem occur on emulator/simulator as well as on physical devices?

Unknown

Logs

Logs ```console Thread 29 Crashed: 0 libsystem_kernel.dylib 0x00000001b7d51964 __pthread_kill + 8 (:-1) 1 libsystem_pthread.dylib 0x00000001f198d378 pthread_kill + 268 (pthread.c:1668) 2 libsystem_c.dylib 0x000000018b5d0420 __abort + 128 (abort.c:155) 3 libsystem_c.dylib 0x000000018b578f5c abort + 176 (abort.c:126) 4 libsystem_malloc.dylib 0x00000001923aba08 malloc_vreport + 552 (malloc_printf.c:183) 5 libsystem_malloc.dylib 0x00000001923abca4 malloc_zone_error + 104 (malloc_printf.c:219) 6 libsystem_malloc.dylib 0x00000001923a6178 nanov2_allocate_from_block + 568 (nanov2_malloc.c:2216) 7 libsystem_malloc.dylib 0x00000001923a521c nanov2_allocate + 128 (nanov2_malloc.c:2591) 8 libsystem_malloc.dylib 0x00000001923a5138 nanov2_malloc + 64 (nanov2_malloc.c:1013) 9 libsystem_malloc.dylib 0x0000000192395258 _malloc_zone_malloc + 156 (malloc.c:1606) 10 Flutter 0x000000011a9534bc operator new(unsigned long) + 12 (new.cpp:67) 11 Flutter 0x000000011a9534bc void* std::_fl::__libcpp_operator_new[abi:v15000](unsigned long) + 12 (new:246) 12 Flutter 0x000000011a9534bc std::_fl::__libcpp_allocate[abi:v15000](unsigned long, unsigned long) + 12 (new:272) 13 Flutter 0x000000011a9534bc std::_fl::allocator::allocate[abi:v15000](unsigned long) + 28 (allocator.h:112) 14 Flutter 0x000000011a9534bc std::_fl::__allocation_result>::pointer> std::_fl::__allocate_at_least[abi:v15000]>(std::_fl::allocator&, ... + 40 (allocate_at_least.h:54) 15 Flutter 0x000000011a953378 std::_fl::__split_buffer&>::__split_buffer(unsigned long, unsigned long, std::_fl::allocator&) + 8 (__split_buffer:307) 16 Flutter 0x000000011a953378 std::_fl::__split_buffer&>::__split_buffer(unsigned long, unsigned long, std::_fl::allocator&) + 8 (__split_buffer:303) 17 Flutter 0x000000011a953378 void std::_fl::vector>::__push_back_slow_path(SkRect const&) + 60 (vector:1477) 18 Flutter 0x000000011a953378 std::_fl::vector>::push_back[abi:v15000](SkRect const&) + 88 (vector:1494) 19 Flutter 0x000000011a953378 flutter::RTreeBoundsAccumulator::accumulate(SkRect const&, int) + 152 (dl_bounds_accumulator.cc:78) 20 Flutter 0x000000011a946a6c flutter::DisplayListBuilder::AccumulateBounds(SkRect&) + 132 (dl_builder.cc:1448) 21 Flutter 0x000000011a946a6c flutter::DisplayListBuilder::AccumulateOpBounds(SkRect&, flutter::DisplayListAttributeFlags) + 1024 (dl_builder.cc:1439) 22 Flutter 0x000000011a940ecc flutter::DisplayListBuilder::AccumulateOpBounds(SkRect const&, flutter::DisplayListAttributeFlags) + 20 (dl_builder.h:766) 23 Flutter 0x000000011a940ecc flutter::DisplayListBuilder::drawTextFrame(std::_fl::shared_ptr const&, float, float) + 264 (dl_builder.cc:1311) 24 Flutter 0x000000011aa1c87c flutter::DisplayListBuilder::DrawTextFrame(std::_fl::shared_ptr const&, float, float, flutter::DlPaint const&) + 28 (dl_builder.cc:1337) 25 Flutter 0x000000011aa1c87c txt::(anonymous namespace)::DisplayListParagraphPainter::drawTextBlob(sk_sp const&, float, float, std::_fl::variant const&) + 1000 (paragraph_skia.cc:96) 26 Flutter 0x000000011aa8f148 skia::textlayout::TextLine::TextBlobRecord::paint(skia::textlayout::ParagraphPainter*, float, float) + 100 (TextLine.cpp:388) 27 Flutter 0x000000011aa8f148 skia::textlayout::TextLine::paint(skia::textlayout::ParagraphPainter*, float, float) + 348 (TextLine.cpp:215) 28 Flutter 0x000000011aa88ec4 skia::textlayout::ParagraphImpl::paint(skia::textlayout::ParagraphPainter*, float, float) + 72 (ParagraphImpl.cpp:249) 29 Flutter 0x000000011aa1ae00 txt::ParagraphSkia::Paint(flutter::DisplayListBuilder*, double, double) + 68 (paragraph_skia.cc:337) 30 App 0x00000001219214f8 stub CallNativeThroughSafepoint + 88 31 App 0x0000000121c14ef8 NativeParagraph.__paint$Method$FfiNative + 144 (text.dart:0) 32 App 0x0000000121c14e48 _NativeParagraph._paint + 40 (text.dart:3267) 33 App 0x0000000121c14e48 NativeCanvas.drawParagraph + 200 (painting.dart:6112) 34 App 0x0000000121c14d2c TextPainter.paint + 460 (text_painter.dart:1199) 35 App 0x00000001222a6b74 RenderParagraph.paint + 544 (paragraph.dart:923) 36 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 37 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 38 App 0x000000012229a30c RenderShiftedBox.paint (#2) + 152 (shifted_box.dart:74) 39 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 40 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 41 App 0x00000001222a0de0 RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:130) 42 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 43 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 44 App 0x00000001222a0de0 RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:130) 45 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 46 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 47 App 0x00000001222a0de0 RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:130) 48 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 49 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 50 App 0x00000001222a0de0 RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:130) 51 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 52 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 53 App 0x00000001222a2288 RenderBoxContainerDefaultsMixin.defaultPaint + 228 (box.dart:2882) 54 App 0x00000001222a208c RenderFlex.paint + 84 (flex.dart:1041) 55 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 56 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 57 App 0x00000001222a2288 RenderBoxContainerDefaultsMixin.defaultPaint + 228 (box.dart:2882) 58 App 0x00000001222a208c RenderFlex.paint + 84 (flex.dart:1041) 59 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 60 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 61 App 0x000000012229a30c RenderShiftedBox.paint (#2) + 152 (shifted_box.dart:74) 62 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 63 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 64 App 0x00000001222a0de0 RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:130) 65 App 0x000000012229dd74 RenderDecoratedBox.paint + 396 (proxy_box.dart:2307) 66 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 67 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 68 App 0x00000001222a2288 RenderBoxContainerDefaultsMixin.defaultPaint + 228 (box.dart:2882) 69 App 0x00000001222a208c RenderFlex.paint + 84 (flex.dart:1041) 70 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 71 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 72 App 0x00000001222a0de0 RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:130) 73 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 74 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 75 App 0x00000001222a0de0 RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:130) 76 App 0x000000012229f378 RenderFractionalTranslation.paint + 196 (proxy_box.dart:2942) 77 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 78 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 79 App 0x00000001222afd90 RenderBoxContainerDefaultsMixin.defaultPaint (#5) + 228 (box.dart:2882) 80 App 0x00000001222afbe8 RenderStack.paintStack + 40 (stack.dart:641) 81 App 0x00000001222afbe8 RenderStack.paint + 344 (stack.dart:657) 82 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 83 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 84 App 0x00000001222a2288 RenderBoxContainerDefaultsMixin.defaultPaint + 228 (box.dart:2882) 85 App 0x00000001222a208c RenderFlex.paint + 84 (flex.dart:1041) 86 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 87 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 88 App 0x00000001222aac14 RenderBoxContainerDefaultsMixin.defaultPaint (#3) + 228 (box.dart:2882) 89 App 0x00000001222aab18 RenderCustomMultiChildLayoutBox.paint + 48 (custom_layout.dart:409) 90 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 91 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 92 App 0x00000001222a0de0 RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:130) 93 App 0x000000012229bb38 RenderInkFeatures.paint + 676 (material.dart:662) 94 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 95 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 96 App 0x00000001222a0de0 RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:130) 97 App 0x000000012229d6d4 RenderPhysicalShape.paint. + 244 98 App 0x000000012229b3fc PaintingContext.pushClipRRect + 260 (object.dart:575) 99 App 0x000000012229d5a4 RenderPhysicalModel.paint + 916 (proxy_box.dart:2036) 100 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 101 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 102 App 0x00000001222afd90 RenderBoxContainerDefaultsMixin.defaultPaint (#5) + 228 (box.dart:2882) 103 App 0x00000001222afbe8 RenderStack.paintStack + 40 (stack.dart:641) 104 App 0x00000001222afbe8 RenderStack.paint + 344 (stack.dart:657) 105 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 106 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 107 App 0x00000001222a0de0 RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:130) 108 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 109 App 0x0000000122294bcc PaintingContext.paintChild + 192 (object.dart:250) 110 App 0x00000001222a0de0 RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:130) 111 App 0x0000000122294c84 RenderObject._paintWithContext + 148 (object.dart:3237) 112 App 0x00000001222955ac PaintingContext._repaintCompositedChild + 344 (object.dart:166) 113 App 0x000000012288120c PaintingContext.repaintCompositedChild + 84 (object.dart:109) 114 App 0x000000012288120c PipelineOwner.flushPaint + 520 (object.dart:1182) 115 App 0x000000012288113c PipelineOwner.flushPaint + 312 (object.dart:1192) 116 App 0x000000012287986c RendererBinding.drawFrame + 96 (binding.dart:584) 117 App 0x00000001228793bc WidgetsBinding.drawFrame + 176 (binding.dart:991) 118 App 0x0000000122878cdc RendererBinding._handlePersistentFrameCallback (#2) + 36 (binding.dart:448) 119 App 0x0000000122878ca4 RendererBinding._handlePersistentFrameCallback + 48 (binding.dart:447) 120 App 0x000000012197934c SchedulerBinding._invokeFrameCallback + 52 (binding.dart:1386) 121 App 0x0000000121979264 SchedulerBinding.handleDrawFrame + 756 (binding.dart:1311) 122 App 0x0000000121978f54 SchedulerBinding._handleDrawFrame (#2) + 280 (binding.dart:1169) 123 App 0x0000000121978e28 SchedulerBinding._handleDrawFrame + 44 (binding.dart:1151) 124 App 0x000000012193651c rootRun + 140 (zone.dart:1399) 125 App 0x00000001219365dc rootRun (#2) + 128 126 App 0x000000012289bb04 CustomZone.run + 160 (zone.dart:1301) 127 App 0x000000012289bf5c CustomZone.runGuarded + 52 (zone.dart:1209) 128 App 0x0000000121958940 invoke + 160 (hooks.dart:314) 129 App 0x000000012195b4c0 PlatformDispatcher._drawFrame + 44 (platform_dispatcher.dart:399) 130 App 0x000000012195b47c drawFrame + 60 (hooks.dart:283) 131 App 0x000000012195b4f0 drawFrame (#2) + 24 (hooks.dart:281) 132 App 0x0000000121923b74 stub InvokeDartCode + 216 133 Flutter 0x000000011abfee28 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&) + 284 (dart_entry.cc:125) 134 Flutter 0x000000011ad18930 Dart_InvokeClosure + 1100 (dart_api_impl.cc:4816) 135 Flutter 0x000000011a9ff3b8 tonic::DartInvokeVoid(_Dart_Handle*) + 12 (dart_invoke.cc:30) 136 Flutter 0x000000011a9ff3b8 flutter::PlatformConfiguration::BeginFrame(fml::TimePoint, unsigned long long) + 372 (platform_configuration.cc:384) 137 Flutter 0x000000011a9ff3b8 flutter::RuntimeController::BeginFrame(fml::TimePoint, unsigned long long) + 384 (runtime_controller.cc:230) 138 Flutter 0x000000011a9ff3b8 flutter::Engine::BeginFrame(fml::TimePoint, unsigned long long) + 388 (engine.cc:262) 139 Flutter 0x000000011a9ff3b8 flutter::Shell::OnAnimatorBeginFrame(fml::TimePoint, unsigned long long) + 480 (shell.cc:1215) 140 Flutter 0x000000011a9e0610 flutter::Animator::BeginFrame(std::_fl::unique_ptr>) + 444 (animator.cc:114) 141 Flutter 0x000000011a9e0610 flutter::Animator::AwaitVSync()::$_0::operator()(std::_fl::unique_ptr>) const + 744 (animator.cc:258) 142 Flutter 0x000000011a9e0610 decltype(std::declval()(std::declval>>())) std::_f... + 896 (invoke.h:403) 143 Flutter 0x000000011a9e0610 void std::_fl::__invoke_void_return_wrapper::__call, void (std::_fl::unique_ptr, void (std::_fl::unique_ptr>)>::operator()[abi:v15000](std::_fl::unique_ptr<... + 24 (function.h:512) 147 Flutter 0x000000011aa11d50 std::_fl::function>)>::operator()(std::_fl::unique_ptr()()) std::_fl::__invoke[abi:v15000]::__call(flutter::VsyncWaiter::FireCallback(fml::TimePoint, fm... + 148 (invoke.h:488) 151 Flutter 0x000000011aa11d50 std::_fl::__function::__alloc_func::operator()[abi:v15000]() const + 12 (function.h:512) 154 Flutter 0x000000011a8e0f08 std::_fl::function::operator()() const + 12 (function.h:1187) 155 Flutter 0x000000011a8e0f08 fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 568 (message_loop_impl.cc:126) 156 Flutter 0x000000011a8e46bc fml::MessageLoopImpl::RunExpiredTasksNow() + 8 (message_loop_impl.cc:139) 157 Flutter 0x000000011a8e46bc fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 32 (message_loop_darwin.mm:85) 158 CoreFoundation 0x00000001806ca318 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:1812) 159 CoreFoundation 0x000000018064ecf0 __CFRunLoopDoTimer + 1076 (CFRunLoop.c:2420) 160 CoreFoundation 0x00000001806494ec __CFRunLoopDoTimers + 328 (CFRunLoop.c:2580) 161 CoreFoundation 0x0000000180627d08 __CFRunLoopRun + 1944 (CFRunLoop.c:3116) 162 CoreFoundation 0x000000018063b468 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268) 163 Flutter 0x000000011a8e47a8 + -1 (message_loop_darwin.mm:51) 164 Flutter 0x000000011a8e3e20 + -1 (:-1) 165 libsystem_pthread.dylib 0x00000001f19879a4 _pthread_start + 148 (pthread.c:891) 166 libsystem_pthread.dylib 0x00000001f1986ea0 thread_start + 8 (:-1) ```

Flutter Doctor output

Doctor output ```console [✓] Flutter (Channel stable, 3.19.5, on macOS 14.6 23G80 darwin-arm64, locale zh-Hans-CN) • Flutter version 3.19.5 on channel stable at /Users/quwenjie/Documents/FlutterSDK/flutter_3.19.5 • Upstream repository https://github.com/flutter/flutter.git • Framework revision 300451adae (5 months ago), 2024-03-27 21:54:07 -0500 • Engine revision e76c956498 • Dart version 3.3.3 • DevTools version 2.31.1 • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/quwenjie/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.4) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15F31d • CocoaPods version 1.13.0 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) [✓] VS Code (version 1.92.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension can be installed from: 🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [✓] Connected device (7 available) • iPhone14 Pro Max (mobile) • 00008120-0001296C3E83C01E • ios • iOS 18.0 22A5326f • dev的iPhone15Pro (mobile) • 00008130-000E0D0C01F0001C • ios • iOS 17.5.1 21F90 • macOS (desktop) • macos • darwin-arm64 • macOS 14.6 23G80 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 127.0.6533.100 ```
huycozy commented 3 months ago

Here is the symbolized stack trace:

Output ```console ➜ Desktop dart pub global run symbolizer:symbolize https://github.com/flutter/flutter/issues/153266\#issue-2460424752 "flutter#300451a arm64 release force ios" INFO: 2024-08-12 18:21:01.494341: checking for llvm-{symbolizer,readobj,objdump} in $PATH INFO: 2024-08-12 18:21:01.525467: checking for llvm-{symbolizer,readobj,objdump} in tools/android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/bin/ INFO: 2024-08-12 18:21:01.559126: checking for llvm-{symbolizer,readobj,objdump} in /Users/huynq/Library/Android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/darwin-x86_64/bin/ INFO: 2024-08-12 18:21:02.907192: looking for load base of EngineBuild(engineHash: e76c956498841e1ab458577d3892003e553e4f3c, variant: EngineVariant(os: ios, arch: arm64, mode: release)) based on [4740953276, 4740952952, 4740901484, 4740878028, 4741777532, 4742246728, 4742221508, 4741770752, 4743753256, 4744907056, 4741657528, 4741531152, 4741733712, 4740484872, 4740499132, 4740499368, 4740496928] INFO: 2024-08-12 18:21:07.021807: Symbolizing using /var/folders/2j/3q66vxk13y5cx0ch1dywgx5m0000gn/T/symbols-cache/e76c956498841e1ab458577d3892003e553e4f3c-ios-release/Flutter.dSYM/Contents/Resources/DWARF/Flutter -------------------------------------------------------------------------------- symbolized using symbols for e76c956498841e1ab458577d3892003e553e4f3c ios-arm64-release #00 00000001b7d51964 libsystem_kernel.dylib __pthread_kill + 8 (:-) #01 00000001f198d378 libsystem_pthread.dylib pthread_kill + 268 (pthread.c:166) #02 000000018b5d0420 libsystem_c.dylib __abort + 128 (abort.c:15) #03 000000018b578f5c libsystem_c.dylib abort + 176 (abort.c:12) #04 00000001923aba08 libsystem_malloc.dylib malloc_vreport + 552 (malloc_printf.c:18) #05 00000001923abca4 libsystem_malloc.dylib malloc_zone_error + 104 (malloc_printf.c:21) #06 00000001923a6178 libsystem_malloc.dylib nanov2_allocate_from_block + 568 (nanov2_malloc.c:221) #07 00000001923a521c libsystem_malloc.dylib nanov2_allocate + 128 (nanov2_malloc.c:259) #08 00000001923a5138 libsystem_malloc.dylib nanov2_malloc + 64 (nanov2_malloc.c:101) #09 0000000192395258 libsystem_malloc.dylib _malloc_zone_malloc + 156 (malloc.c:160) #10 000000011a9534bc Flutter (Missing) (new.cpp:6) #11 000000011a9534bc Flutter (Missing) (new:24) #12 000000011a9534bc Flutter (Missing) (new:27) #13 000000011a9534bc Flutter (Missing) (allocator.h:11) #14 000000011a9534bc Flutter (Missing) (allocate_at_least.h:5) #15 000000011a953378 Flutter (Missing) (__split_buffer:30) #16 000000011a953378 Flutter (Missing) (__split_buffer:30) #17 000000011a953378 Flutter (Missing) (vector:147) #18 000000011a953378 Flutter (Missing) (vector:149) #19 000000011a953378 Flutter (Missing) (dl_bounds_accumulator.cc:7) #20 000000011a946a6c Flutter (Missing) (dl_builder.cc:144) #21 000000011a946a6c Flutter (Missing) (dl_builder.cc:143) #22 000000011a940ecc Flutter (Missing) (dl_builder.h:76) #23 000000011a940ecc Flutter (Missing) (dl_builder.cc:131) #24 000000011aa1c87c Flutter (Missing) (dl_builder.cc:133) #25 000000011aa1c87c Flutter (Missing) (paragraph_skia.cc:9) #26 000000011aa8f148 Flutter (Missing) (TextLine.cpp:38) #27 000000011aa8f148 Flutter (Missing) (TextLine.cpp:21) #28 000000011aa88ec4 Flutter (Missing) (ParagraphImpl.cpp:24) #29 000000011aa1ae00 Flutter (Missing) (paragraph_skia.cc:33) #30 00000001219214f8 App stub CallNativeThroughSafepoint + 88 #31 0000000121c14ef8 App NativeParagraph.__paint$Method$FfiNative + 144 (text.dart:) #32 0000000121c14e48 App _NativeParagraph._paint + 40 (text.dart:326) #33 0000000121c14e48 App NativeCanvas.drawParagraph + 200 (painting.dart:611) #34 0000000121c14d2c App TextPainter.paint + 460 (text_painter.dart:119) #35 00000001222a6b74 App RenderParagraph.paint + 544 (paragraph.dart:92) #36 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #37 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #38 000000012229a30c App RenderShiftedBox.paint (#2) + 152 (shifted_box.dart:7) #39 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #40 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #41 00000001222a0de0 App RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:13) #42 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #43 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #44 00000001222a0de0 App RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:13) #45 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #46 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #47 00000001222a0de0 App RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:13) #48 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #49 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #50 00000001222a0de0 App RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:13) #51 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #52 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #53 00000001222a2288 App RenderBoxContainerDefaultsMixin.defaultPaint + 228 (box.dart:288) #54 00000001222a208c App RenderFlex.paint + 84 (flex.dart:104) #55 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #56 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #57 00000001222a2288 App RenderBoxContainerDefaultsMixin.defaultPaint + 228 (box.dart:288) #58 00000001222a208c App RenderFlex.paint + 84 (flex.dart:104) #59 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #60 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #61 000000012229a30c App RenderShiftedBox.paint (#2) + 152 (shifted_box.dart:7) #62 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #63 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #64 00000001222a0de0 App RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:13) #65 000000012229dd74 App RenderDecoratedBox.paint + 396 (proxy_box.dart:230) #66 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #67 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #68 00000001222a2288 App RenderBoxContainerDefaultsMixin.defaultPaint + 228 (box.dart:288) #69 00000001222a208c App RenderFlex.paint + 84 (flex.dart:104) #70 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #71 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #72 00000001222a0de0 App RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:13) #73 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #74 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #75 00000001222a0de0 App RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:13) #76 000000012229f378 App RenderFractionalTranslation.paint + 196 (proxy_box.dart:294) #77 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #78 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #79 00000001222afd90 App RenderBoxContainerDefaultsMixin.defaultPaint (#5) + 228 (box.dart:288) #80 00000001222afbe8 App RenderStack.paintStack + 40 (stack.dart:64) #81 00000001222afbe8 App RenderStack.paint + 344 (stack.dart:65) #82 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #83 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #84 00000001222a2288 App RenderBoxContainerDefaultsMixin.defaultPaint + 228 (box.dart:288) #85 00000001222a208c App RenderFlex.paint + 84 (flex.dart:104) #86 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #87 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #88 00000001222aac14 App RenderBoxContainerDefaultsMixin.defaultPaint (#3) + 228 (box.dart:288) #89 00000001222aab18 App RenderCustomMultiChildLayoutBox.paint + 48 (custom_layout.dart:40) #90 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #91 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #92 00000001222a0de0 App RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:13) #93 000000012229bb38 App RenderInkFeatures.paint + 676 (material.dart:66) #94 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #95 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #96 00000001222a0de0 App RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:13) #97 000000012229d6d4 App RenderPhysicalShape.paint. + 244 #98 000000012229b3fc App PaintingContext.pushClipRRect + 260 (object.dart:57) #99 000000012229d5a4 App RenderPhysicalModel.paint + 916 (proxy_box.dart:203) #100 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #101 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #102 00000001222afd90 App RenderBoxContainerDefaultsMixin.defaultPaint (#5) + 228 (box.dart:288) #103 00000001222afbe8 App RenderStack.paintStack + 40 (stack.dart:64) #104 00000001222afbe8 App RenderStack.paint + 344 (stack.dart:65) #105 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #106 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #107 00000001222a0de0 App RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:13) #108 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #109 0000000122294bcc App PaintingContext.paintChild + 192 (object.dart:25) #110 00000001222a0de0 App RenderProxyBoxMixin.paint (#2) + 76 (proxy_box.dart:13) #111 0000000122294c84 App RenderObject._paintWithContext + 148 (object.dart:323) #112 00000001222955ac App PaintingContext._repaintCompositedChild + 344 (object.dart:16) #113 000000012288120c App PaintingContext.repaintCompositedChild + 84 (object.dart:10) #114 000000012288120c App PipelineOwner.flushPaint + 520 (object.dart:118) #115 000000012288113c App PipelineOwner.flushPaint + 312 (object.dart:119) #116 000000012287986c App RendererBinding.drawFrame + 96 (binding.dart:58) #117 00000001228793bc App WidgetsBinding.drawFrame + 176 (binding.dart:99) #118 0000000122878cdc App RendererBinding._handlePersistentFrameCallback (#2) + 36 (binding.dart:44) #119 0000000122878ca4 App RendererBinding._handlePersistentFrameCallback + 48 (binding.dart:44) #120 000000012197934c App SchedulerBinding._invokeFrameCallback + 52 (binding.dart:138) #121 0000000121979264 App SchedulerBinding.handleDrawFrame + 756 (binding.dart:131) #122 0000000121978f54 App SchedulerBinding._handleDrawFrame (#2) + 280 (binding.dart:116) #123 0000000121978e28 App SchedulerBinding._handleDrawFrame + 44 (binding.dart:115) #124 000000012193651c App rootRun + 140 (zone.dart:139) #125 00000001219365dc App rootRun (#2) + 128 #126 000000012289bb04 App CustomZone.run + 160 (zone.dart:130) #127 000000012289bf5c App CustomZone.runGuarded + 52 (zone.dart:120) #128 0000000121958940 App invoke + 160 (hooks.dart:31) #129 000000012195b4c0 App PlatformDispatcher._drawFrame + 44 (platform_dispatcher.dart:39) #130 000000012195b47c App drawFrame + 60 (hooks.dart:28) #131 000000012195b4f0 App drawFrame (#2) + 24 (hooks.dart:28) #132 0000000121923b74 App stub InvokeDartCode + 216 #133 000000011abfee28 Flutter (Missing) (dart_entry.cc:12) #134 000000011ad18930 Flutter (Missing) (dart_api_impl.cc:481) #135 000000011a9ff3b8 Flutter (Missing) (dart_invoke.cc:3) #136 000000011a9ff3b8 Flutter (Missing) (platform_configuration.cc:38) #137 000000011a9ff3b8 Flutter (Missing) (runtime_controller.cc:23) #138 000000011a9ff3b8 Flutter (Missing) (engine.cc:26) #139 000000011a9ff3b8 Flutter (Missing) (shell.cc:121) #140 000000011a9e0610 Flutter (Missing) (animator.cc:11) #141 000000011a9e0610 Flutter (Missing) (animator.cc:25) #142 000000011a9e0610 Flutter (Missing) (invoke.h:40) #143 000000011a9e0610 Flutter (Missing) (invoke.h:48) #144 000000011a9e0610 Flutter (Missing) (function.h:18) #145 000000011a9e0610 Flutter (Missing) (function.h:35) #146 000000011aa11d50 Flutter (Missing) (function.h:51) #147 000000011aa11d50 Flutter (Missing) (function.h:118) #148 000000011aa11d50 Flutter (Missing) (vsync_waiter.cc:14) #149 000000011aa11d50 Flutter (Missing) (invoke.h:40) #150 000000011aa11d50 Flutter (Missing) (invoke.h:48) #151 000000011aa11d50 Flutter (Missing) (function.h:18) #152 000000011aa11d50 Flutter (Missing) (function.h:35) #153 000000011a8e0f08 Flutter (Missing) (function.h:51) #154 000000011a8e0f08 Flutter (Missing) (function.h:118) #155 000000011a8e0f08 Flutter (Missing) (message_loop_impl.cc:12) #156 000000011a8e46bc Flutter (Missing) (message_loop_impl.cc:13) #157 000000011a8e46bc Flutter (Missing) (message_loop_darwin.mm:8) #158 00000001806ca318 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:181) #159 000000018064ecf0 CoreFoundation __CFRunLoopDoTimer + 1076 (CFRunLoop.c:242) #160 00000001806494ec CoreFoundation __CFRunLoopDoTimers + 328 (CFRunLoop.c:258) #161 0000000180627d08 CoreFoundation __CFRunLoopRun + 1944 (CFRunLoop.c:311) #162 000000018063b468 CoreFoundation CFRunLoopRunSpecific + 600 (CFRunLoop.c:326) #163 000000011a8e47a8 Flutter (Missing) (message_loop_darwin.mm:5) #164 000000011a8e3e20 Flutter (Missing) (:-) #165 00000001f19879a4 libsystem_pthread.dylib _pthread_start + 148 (pthread.c:89) #166 00000001f1986ea0 libsystem_pthread.dylib thread_start + 8 (:-) -------------------------------------------------------------------------------- ```
huycozy commented 3 months ago

Do you build app with Impeller enabled? Can you please try upgrading Flutter SDK to the latest version and retry to see if the crash still persists with the same trace?

WinJayQ commented 2 months ago

Do you build app with Impeller enabled? Can you please try upgrading Flutter SDK to the latest version and retry to see if the crash still persists with the same trace?

Flutter enables Impeller by default on iOS.We didn't actively disable it. Because the upgrade changes are relatively large, we have no plan to upgrade to the latest recently. In addition, this is an occasional bug, which is difficult to reproduce。

huycozy commented 2 months ago

Keeping this for further insight. This has a piece of Flutter traces similar to https://github.com/flutter/flutter/issues/126463:

10  Flutter                         0x000000011a9534bc operator new(unsigned long) + 12 (new.cpp:67)
11  Flutter                         0x000000011a9534bc void* std::_fl::__libcpp_operator_new[abi:v15000]<unsigned long>(unsigned long) + 12 (new:246)
12  Flutter                         0x000000011a9534bc std::_fl::__libcpp_allocate[abi:v15000](unsigned long, unsigned long) + 12 (new:272)
jonahwilliams commented 2 months ago

This trace doesn't have anything to do with Impeller. Instead the crash seems to be OOM, or invalid ptr, which is likely related to https://github.com/flutter/flutter/issues/149340

huycozy commented 2 months ago

@WinJayQ As the issue linked above, it's worth trying this on the latest Flutter stable 3.24.0 to see if the crash occurs on this version or not.

WinJayQ commented 2 months ago

@WinJayQ As the issue linked above, it's worth trying this on the latest Flutter stable 3.24.0 to see if the crash occurs on this version or not.

Ok, we'll consider upgrading the version

jonahwilliams commented 2 months ago

If you are able to repro the issue or can confirm it is no longer happening please reopen. Otherwise closing as this is not actionable for us.

github-actions[bot] commented 2 months 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.