Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS crash with newer devices when loading large images #948

Open
TimBaumgart opened this issue May 22, 2024 · 0 comments
Open

iOS crash with newer devices when loading large images #948

TimBaumgart opened this issue May 22, 2024 · 0 comments

Comments

@TimBaumgart
Copy link

馃悰 Bug Report

My app crashed for some of my ios users (5-10%, mostly iPhone 13-15) when displaying a screen with CachedNetworkImage and the image was too big (like 2000x3000px). This was the crashlytics stacktrace:

      Crashed: io.flutter.1.ui
0  libsystem_kernel.dylib         0xa974 __pthread_kill + 8
1  libsystem_pthread.dylib        0x60ec pthread_kill + 268
2  libsystem_c.dylib              0x75b80 abort + 180
3  Flutter                        0x5cb72c InternalFlutterGpu_Texture_AsImage + 50508
4  Flutter                        0x6b1578 InternalFlutterGpu_Texture_AsImage + 992152
5  Flutter                        0x618a30 InternalFlutterGpu_Texture_AsImage + 366672
6  Flutter                        0x677494 InternalFlutterGpu_Texture_AsImage + 754356
7  Flutter                        0x5e09f4 InternalFlutterGpu_Texture_AsImage + 137236
8  Flutter                        0x62aa50 InternalFlutterGpu_Texture_AsImage + 440432
9  App                            0xbe6c stub CallBootstrapNative + 32364
10 App                            0x31950 SendPort._sendInternal + 250 (isolate_patch.dart:250)
11 App                            0x2b654 IOService._dispatch + 231 (isolate_patch.dart:231)
12 App                            0x6ef328 RawSecureSocket._pushAllFilterStages + 1145 (secure_socket.dart:1145)
13 App                            0x6ee9b0 RawSecureSocket._tryFilter + 1006 (secure_socket.dart:1006)
14 App                            0x6ee90c RawSecureSocket._scheduleFilter + 989 (secure_socket.dart:989)
15 App                            0x6f09c0 RawSecureSocket._readHandler + 863 (secure_socket.dart:863)
16 App                            0x6f08c8 RawSecureSocket._eventDispatcher + 854 (secure_socket.dart:854)
17 App                            0x6f0e68 RawSecureSocket._eventDispatcher (#2) + 849 (secure_socket.dart:849)
18 App                            0x787ad8 RootZone.runUnaryGuarded + 1594 (zone.dart:1594)
19 App                            0x742c6c BufferingStreamSubscription._sendData + 341 (stream_impl.dart:341)
20 App                            0x6d6b20 BufferingStreamSubscription._add + 273 (stream_impl.dart:273)
21 App                            0x6d69d0 StreamController._add + 660 (stream_controller.dart:660)
22 App                            0x66a50 StreamController.add (#3) + 605 (stream_controller.dart:605)
23 App                            0x6ec270 new _RawSocket.<anonymous closure> (#4) + 1936 (socket_patch.dart:1936)
24 App                            0x6e9d78 NativeSocket.issueReadEvent.issue + 1380 (socket_patch.dart:1380)
25 App                            0x1be6c microtaskLoop + 34 (schedule_microtask.dart:34)
26 App                            0x1bd6c startMicrotaskLoop (#2) + 54 (schedule_microtask.dart:54)
27 App                            0x1bd30 startMicrotaskLoop + 44 (schedule_microtask.dart:44)
28 App                            0xbb74 stub InvokeDartCode + 31604
29 Flutter                        0x60712c InternalFlutterGpu_Texture_AsImage + 294732
30 Flutter                        0x720c34 InternalFlutterGpu_Texture_AsImage + 1448532
31 Flutter                        0x41c050 (Fehlt UUID 4c4c447355553144a149a4a73b6eae0b)
32 Flutter                        0x2e91a4 (Fehlt UUID 4c4c447355553144a149a4a73b6eae0b)
33 Flutter                        0x2ec6bc (Fehlt UUID 4c4c447355553144a149a4a73b6eae0b)
34 CoreFoundation                 0xad6e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
35 CoreFoundation                 0xad388 __CFRunLoopDoTimer + 1004
36 CoreFoundation                 0x37184 __CFRunLoopDoTimers + 288
37 CoreFoundation                 0x3418c __CFRunLoopRun + 1856
38 CoreFoundation                 0x33968 CFRunLoopRunSpecific + 608
39 Flutter                        0x2ec7a8 (Fehlt UUID 4c4c447355553144a149a4a73b6eae0b)
40 Flutter                        0x2ebe20 (Fehlt UUID 4c4c447355553144a149a4a73b6eae0b)
41 libsystem_pthread.dylib        0x2a90 _pthread_start + 136
42 libsystem_pthread.dylib        0x1fcc thread_start + 8
    

The solution to this problem is to add reasonable values to maxHeightDiskCache or maxWidthDiskCache, but it took me some time to find that out.

Expected behavior

App should not crash, even when not specifying maxHeightDiskCache and maxWidthDiskCache

Reproduction steps

Display an large image using CachedNetworkImage

Configuration

Version: 3.3.1

Platform:

  • 馃摫 iOS (mostly iPhone 13-15)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant