flutter [IOS] SkData::PrivateNewWithCopy(void const*, unsigned long) | Skia后端

kulphzqa  于 8个月前  发布在  Flutter
关注(0)|答案(5)|浏览(80)

重现步骤

没有具体内容,
我的假设与旧设备(iPhone 7、8、X、XR)的低RAM有关。
示例:
型号:iPhone 8 Plus
方向:纵向
RAM空闲:79.86 MB
型号:iPhone X
方向:纵向
RAM空闲:56.56 MB
型号:iPhone 8 Plus
方向:纵向
RAM空闲:33.75 MB
型号: iPhone XR
方向:纵向
RAM空闲:43.08 MB
型号: iPhone 8 Plus
方向:纵向
RAM空闲:86.31 MB
型号:iPhone X
方向:纵向
RAM空闲:33.84 MB
型号: iPhone 8 Plus
方向:纵向
RAM空闲:30.22 MB
型号: iPhone X
方向:纵向
RAM空闲:34.91 MB

预期结果

无崩溃

实际结果

崩溃是随机发生的。

代码示例

这里没有什么可分享的;请查看堆栈跟踪。

截图或视频

截图/视频演示
[在这里上传媒体]

日志

日志

Crashed: SingleEngine-deeplinkMain.8.io
0  Flutter                        0x97e7c SkData::PrivateNewWithCopy(void const*, unsigned long) + 910 (atomic:910)
1  Flutter                        0xfd694 MakeRasterCopyPriv(SkPixmap const&, unsigned int) + 145 (SkPixmap.h:145)
2  Flutter                        0x21d0c0 SkImages::CrossContextTextureFromPixmap(GrDirectContext*, SkPixmap const&, bool, bool) + 83 (SkImage_RasterFactories.cpp:83)
3  Flutter                        0x55aef8 std::_fl::__function::__func<flutter::UploadRasterImage(sk_sp<SkImage>, fml::WeakPtr<flutter::IOManager> const&, fml::tracing::TraceFlow const&)::$_1, std::_fl::allocator<flutter::UploadRasterImage(sk_sp<SkImage>, fml::WeakPtr<flutter::IOManager> const&, fml::tracing::TraceFlow const&)::$_1>, void ()>::operator()() + 303 (SkRefCnt.h:303)
4  Flutter                        0x2ea89c fml::SyncSwitch::Execute(fml::SyncSwitch::Handlers const&) const + 29 (shared_mutex.h:29)
5  Flutter                        0x55a948 std::_fl::__function::__func<fml::internal::CopyableLambda<flutter::ImageDecoderSkia::Decode(fml::RefPtr<flutter::ImageDescriptor>, unsigned int, unsigned int, std::_fl::function<void (sk_sp<flutter::DlImage>, std::_fl::basic_string<char, std::_fl::char_traits<char>, std::_fl::allocator<char>>)> const&)::$_1::operator()()::'lambda'()>, std::_fl::allocator<fml::internal::CopyableLambda<flutter::ImageDecoderSkia::Decode(fml::RefPtr<flutter::ImageDescriptor>, unsigned int, unsigned int, std::_fl::function<void (sk_sp<flutter::DlImage>, std::_fl::basic_string<char, std::_fl::char_traits<char>, std::_fl::allocator<char>>)> const&)::$_1::operator()()::'lambda'()>>, void ()>::operator()() + 470 (function.h:470)
6  Flutter                        0x2e8f08 fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 128 (message_loop_impl.cc:128)
7  Flutter                        0x2ec6bc fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 86 (message_loop_darwin.mm:86)
8  CoreFoundation                 0xc1bb0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
9  CoreFoundation                 0x82de4 __CFRunLoopDoTimer + 884
10 CoreFoundation                 0x2c0fc __CFRunLoopDoTimers + 284
11 CoreFoundation                 0x755bc __CFRunLoopRun + 1940
12 CoreFoundation                 0x79d20 CFRunLoopRunSpecific + 584
13 Flutter                        0x2ec7a8 fml::MessageLoopDarwin::Run() + 52 (message_loop_darwin.mm:52)
14 Flutter                        0x2ebe20 void* std::_fl::__thread_proxy[abi:v15000]<std::_fl::tuple<std::_fl::unique_ptr<std::_fl::__thread_struct, std::_fl::default_delete<std::_fl::__thread_struct>>, fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>>(void*) + 94 (message_loop_impl.cc:94)
15 libsystem_pthread.dylib        0x30ec _pthread_start + 116
16 libsystem_pthread.dylib        0x172c thread_start + 8
mepcadol

mepcadol1#

查看崩溃日志,它看起来类似于#115253,你可以检查并看看它是否能帮助你进一步解决问题。

xpszyzbs

xpszyzbs2#

@darshankawar,我在那里阅读了线程,最新的更新仍然没有修复。我们正在使用几乎最新的FirebaseCrashlytics 3.5.2
我看到了相似之处,但我仍然不确定它们是否是确切的原因。是否有任何数据需要确保这个问题非常相似,我们是否可以关闭这个线程以便专注于一个线程?

u5rb5r59

u5rb5r593#

由于您提到此问题出现在低RAM设备上,因此可能是内存不足错误。可能与 #141594 有关。
团队将保持此问题开放以进行跟踪。

hs1rzwqc

hs1rzwqc4#

代码在这里:https://github.com/flutter/engine/blob/a4f266f7eb1accfd9273aa85235cba1843e74d26/lib/ui/painting/image_decoder_skia.cc#L200-L209
我们认为这个问题不会在Impeller后端发生。在Skia后端,如果我们尝试复制超出边界的内容,可能会发生这种情况,但这是Skia后端的错误。

jvidinwx

jvidinwx5#

我们也面临着这个问题,当叶轮启用时,在最新的稳定版本(3.22.2)中。这里是堆栈:

Crashed: SingleEngine-deeplinkMain.5.ui
0  Flutter                        0x981dc SkData::PrivateNewWithCopy(void const*, unsigned long) + 910 (atomic:910)
1  Flutter                        0x5442b8 tonic::FfiDispatcher<void, _Dart_Handle* (*)(_Dart_Handle*, _Dart_Handle*, _Dart_Handle*), &flutter::ImmutableBuffer::init(_Dart_Handle*, _Dart_Handle*, _Dart_Handle*)>::Call(_Dart_Handle*, _Dart_Handle*, _Dart_Handle*) + 49 (typed_list.cc:49)
2  App                            0x957c kDartVmSnapshotInstructions + 21884
3  App                            0x35cf84 kDartIsolateSnapshotInstructions + 3467396
4  App                            0x35cea4 kDartIsolateSnapshotInstructions + 3467172
5  App                            0x26369c kDartIsolateSnapshotInstructions + 2445212
6  App                            0x35ce24 kDartIsolateSnapshotInstructions + 3467044
7  App                            0xbf88d4 kDartIsolateSnapshotInstructions + 12493268
8  App                            0xbf7fac kDartIsolateSnapshotInstructions + 12490924
9  App                            0xde7e60 kDartIsolateSnapshotInstructions + 14522208
10 App                            0x419e8 kDartIsolateSnapshotInstructions + 209640
11 App                            0x41884 kDartIsolateSnapshotInstructions + 209284
12 App                            0x1796c kDartIsolateSnapshotInstructions + 37484
13 App                            0x175f4 kDartIsolateSnapshotInstructions + 36596
14 App                            0x17568 kDartIsolateSnapshotInstructions + 36456
15 App                            0x173c4 kDartIsolateSnapshotInstructions + 36036
16 App                            0x172c4 kDartIsolateSnapshotInstructions + 35780
17 App                            0x17288 kDartIsolateSnapshotInstructions + 35720
18 App                            0xbbf8 kDartVmSnapshotInstructions + 31736
19 Flutter                        0x6054a4 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&) + 33 (allocation.h:33)
20 Flutter                        0x71d044 Dart_InvokeClosure + 4676 (dart_api_impl.cc:4676)
21 Flutter                        0x41c23c tonic::DartMicrotaskQueue::RunMicrotasks() + 77 (dart_microtask_queue.cc:77)
22 Flutter                        0x2eb710 fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 100 (wrap_iter.h:100)
23 Flutter                        0x2ee9f4 fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 86 (message_loop_darwin.mm:86)
24 CoreFoundation                 0xcb624 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
25 CoreFoundation                 0x88f4c __CFRunLoopDoTimer + 940
26 CoreFoundation                 0x2e71c __CFRunLoopDoTimers + 288
27 CoreFoundation                 0x7a4d4 __CFRunLoopRun + 1852
28 CoreFoundation                 0x7f3ec CFRunLoopRunSpecific + 612
29 Flutter                        0x2eeae0 fml::MessageLoopDarwin::Run() + 52 (message_loop_darwin.mm:52)
30 Flutter                        0x2ee728 std::_fl::__function::__func<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0, std::_fl::allocator<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>, void ()>::operator()() + 94 (message_loop_impl.cc:94)
31 Flutter                        0x2ee438 fml::ThreadHandle::ThreadHandle(std::_fl::function<void ()>&&)::$_0::__invoke(void*) + 470 (function.h:470)
32 libsystem_pthread.dylib        0x16b8 _pthread_start + 148
33 libsystem_pthread.dylib        0xb88 thread_start + 8

如果需要新的问题,请告诉我... @jonahwilliams

相关问题