fluttercommunity / flutter_uploader

background upload plugin for flutter
MIT License
210 stars 140 forks source link

iOS crash on entering background #236

Open barees63 opened 2 years ago

barees63 commented 2 years ago

I'm having a weird issue with the current beta, I can run the example app fine and it works in foreground and background, but my own app crashes whenever it is backgrounded with active uploads...

0   libsystem_kernel.dylib                 0x10e07900e __pthread_kill + 10
1   libsystem_pthread.dylib                0x10e0df1ff pthread_kill + 263
2   libsystem_c.dylib                      0x10dd886b7 abort + 130
3   GCDWebServer                           0x1085408d0 -[GCDWebServer dealloc] + 112 (GCDWebServer.m:198)
4   libobjc.A.dylib                        0x10d6767b7 objc_object::sidetable_release(bool, bool) + 177
5   GCDWebServer                           0x108540b2d __destroy_helper_block_e8_32s + 29
6   libsystem_blocks.dylib                 0x109c9d438 _Block_release + 130
7   libdispatch.dylib                      0x10de10b25 _dispatch_client_callout + 8
8   libdispatch.dylib                      0x10de1e043 _dispatch_main_queue_drain + 1050
9   libdispatch.dylib                      0x10de1dc1b _dispatch_main_queue_callback_4CF + 31
10  CoreFoundation                         0x10ed52ed5 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
11  CoreFoundation                         0x10ed4d6ca __CFRunLoopRun + 2761
12  CoreFoundation                         0x10ed4c704 CFRunLoopRunSpecific + 562
13  GraphicsServices                       0x111da6c8e GSEventRunModal + 139
14  UIKitCore                              0x12469865a -[UIApplication _run] + 928
15  UIKitCore                              0x12469d2b5 UIApplicationMain + 101
16  Runner                                 0x1040801df main + 63 (AppDelegate.swift:13)
17  dyld_sim                               0x10568ff21 start_sim + 10
18  dyld                                   0x10c43d51e start + 462

Line 198 in GCDWebSever.m is:

GWS_DCHECK(_activeConnections == 0);

Does this ring a bell for anyone?

PS. This might be a simulator issue, I'm not seeing it so far on a physical device.

waqadArshad commented 1 year ago

Hi @barees63 , are u sure you are not seeing it on real device?