Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

FileSource HTTPNSURLRequest::start() crash #2123

Merged
merged 1 commit into from
Oct 27, 2015

Conversation

kkaefer
Copy link
Member

@kkaefer kkaefer commented Oct 27, 2015

Networking crash while panning around on iosapp.

iPhone 5, iOS 9b4, testing the perspective branch (#2116) @ f34e037.

Full crash log here.

Hardware Model:      iPhone5,1
Identifier:          com.mapbox.MapboxGL

Date/Time:           2015-08-18 17:38:57.57 -0400
Launch Time:         2015-08-18 17:19:26.26 -0400
OS Version:          iOS 9.0 (13A4325c)
Report Version:      105

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  4

Global Trace Buffer (reverse chronological seconds):
25.492606    CFNetwork                  0x0000000022c2a6a9 NSURLSessionTask finished with error - code: -999
25.509530    CFNetwork                  0x0000000022bd0c33 TCP Conn 0x16e0ac90 starting SSL negotiation
25.510032    CFNetwork                  0x0000000022c50715 TCP Conn 0x16e0ac90 complete. fd: 46, err: 0
25.511438    CFNetwork                  0x0000000022c51817 TCP Conn 0x16e0ac90 event 1. err: 0
25.567740    CFNetwork                  0x0000000022c51895 TCP Conn 0x16e0ac90 started
25.590485    CFNetwork                  0x0000000022c2a6a9 NSURLSessionTask finished with error - code: -999
27.339450    CFNetwork                  0x0000000022bd0cf9 TCP Conn 0x18fdead0 SSL Handshake DONE
27.579481    CFNetwork                  0x0000000022bd0c33 TCP Conn 0x18fdead0 starting SSL negotiation
27.580077    CFNetwork                  0x0000000022c50715 TCP Conn 0x18fdead0 complete. fd: 46, err: 0
27.580647    CFNetwork                  0x0000000022c51817 TCP Conn 0x18fdead0 event 1. err: 0
27.666185    CFNetwork                  0x0000000022c51895 TCP Conn 0x18fdead0 started
27.809069    CFNetwork                  0x0000000022c2a6a9 NSURLSessionTask finished with error - code: -999
27.811091    CFNetwork                  0x0000000022c2a6a9 NSURLSessionTask finished with error - code: -999
27.878498    CFNetwork                  0x0000000022c2a6a9 NSURLSessionTask finished with error - code: -999
27.885424    CFNetwork                  0x0000000022c2a6a9 NSURLSessionTask finished with error - code: -999
27.888641    CFNetwork                  0x0000000022c2a6a9 NSURLSessionTask finished with error - code: -999
27.893229    CFNetwork                  0x0000000022bd0cf9 TCP Conn 0x1c0767c0 SSL Handshake DONE
28.124076    CFNetwork                  0x0000000022bd0cf9 TCP Conn 0x1c0e9c20 SSL Handshake DONE
28.204113    CFNetwork                  0x0000000022bd0c33 TCP Conn 0x18fa0120 starting SSL negotiation
28.205444    CFNetwork                  0x0000000022bd0c33 TCP Conn 0x1c0767c0 starting SSL negotiation
28.205726    CFNetwork                  0x0000000022c50715 TCP Conn 0x18fa0120 complete. fd: 51, err: 0
28.206028    CFNetwork                  0x0000000022bd0cf9 TCP Conn 0x16d209c0 SSL Handshake DONE
28.206133    CFNetwork                  0x0000000022c50715 TCP Conn 0x1c0767c0 complete. fd: 46, err: 0
28.206941    CFNetwork                  0x0000000022c51817 TCP Conn 0x18fa0120 event 1. err: 0
28.206941    CFNetwork                  0x0000000022c51817 TCP Conn 0x1c0767c0 event 1. err: 0
28.213566    CFNetwork                  0x0000000022bd0cf9 TCP Conn 0x1c088870 SSL Handshake DONE
28.297061    CFNetwork                  0x0000000022c51895 TCP Conn 0x18fa0120 started
28.297061    CFNetwork                  0x0000000022c51895 TCP Conn 0x1c0767c0 started
28.455525    CFNetwork                  0x0000000022c2a6a9 NSURLSessionTask finished with error - code: -999
28.457548    CFNetwork                  0x0000000022bd0c33 TCP Conn 0x1c0e9c20 starting SSL negotiation
28.458989    CFNetwork                  0x0000000022c50715 TCP Conn 0x1c0e9c20 complete. fd: 59, err: 0
28.493677    CFNetwork                  0x0000000022c51817 TCP Conn 0x1c0e9c20 event 1. err: 0
28.585237    CFNetwork                  0x0000000022c51895 TCP Conn 0x1c0e9c20 started
28.609777    CFNetwork                  0x0000000022bd0c33 TCP Conn 0x16d209c0 starting SSL negotiation
28.611284    CFNetwork                  0x0000000022c50715 TCP Conn 0x16d209c0 complete. fd: 54, err: 0
28.619713    CFNetwork                  0x0000000022c51817 TCP Conn 0x16d209c0 event 1. err: 0



Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib          0x35138130 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x35137f30 mach_msg + 40
2   CoreFoundation                  0x2335a0cc __CFRunLoopServiceMachPort + 136
3   CoreFoundation                  0x23358452 __CFRunLoopRun + 1050
4   CoreFoundation                  0x232aad88 CFRunLoopRunSpecific + 516
5   CoreFoundation                  0x232aab7c CFRunLoopRunInMode + 108
6   GraphicsServices                0x2c47daf8 GSEventRunModal + 160
7   UIKit                           0x274d399c UIApplicationMain + 144
8   Mapbox GL                       0x000fd984 main (main.m:8)
9   libdyld.dylib                   0x3507c872 start + 2

Thread 4 name:  FileSource
Thread 4 Crashed:
0   libsystem_kernel.dylib          0x3514bd24 __pthread_kill + 8
1   libsystem_pthread.dylib         0x351ebb5a pthread_kill + 62
2   libsystem_c.dylib               0x350e3f50 abort + 108
3   libsystem_c.dylib               0x350c36de __assert_rtn + 302
4   Mapbox GL                       0x003e4738 mbgl::HTTPNSURLRequest::start() (http_request_nsurl.mm:123)
5   Mapbox GL                       0x003e8db4 mbgl::HTTPNSURLRequest::retry()::$_2::operator()() const (http_request_nsurl.mm:332)
6   Mapbox GL                       0x003e8d76 void std::__1::__invoke_void_return_wrapper<void>::__call<mbgl::HTTPNSURLRequest::retry()::$_2&>(mbgl::HTTPNSURLRequest::retry()::$_2&&&) (__functional_base:440)
7   Mapbox GL                       0x003e8c40 std::__1::__function::__func<mbgl::HTTPNSURLRequest::retry()::$_2, std::__1::allocator<mbgl::HTTPNSURLRequest::retry()::$_2>, void ()>::operator()() (functional:1407)
8   Mapbox GL                       0x001cc36c std::__1::function<void ()>::operator()() const (functional:1793)
9   Mapbox GL                       0x003e9c78 uv::timer::timer_cb(uv_timer_s*, int) (uv_detail.hpp:161)
10  Mapbox GL                       0x0040c43c uv__run_timers (timer.c:140)
11  Mapbox GL                       0x00401102 uv_run (core.c:309)
12  Mapbox GL                       0x003f225e uv::loop::run() (uv_detail.hpp:62)
13  Mapbox GL                       0x0029426e void mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::run<std::__1::tuple<mbgl::FileCache*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>, 0ul, 1ul>(mbgl::util::ThreadContext, std::__1::tuple<mbgl::FileCache*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>) (thread.hpp:125)
14  Mapbox GL                       0x00294104 mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<mbgl::FileCache*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(mbgl::util::ThreadContext const&, mbgl::FileCache*&&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&)::'lambda'()::operator()() const (thread.hpp:104)
15  Mapbox GL                       0x00293e86 std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<mbgl::FileCache*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(mbgl::util::ThreadContext const&, mbgl::FileCache*&&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&)::'lambda'()> >(void*, void*) (thread:347)
16  libsystem_pthread.dylib         0x351eac92 _pthread_body + 138
17  libsystem_pthread.dylib         0x351eac06 _pthread_start + 110
18  libsystem_pthread.dylib         0x351e8a24 thread_start + 8

Thread 6 name:  Map
Thread 6:
0   libsystem_pthread.dylib         0x351e8fcc pthread_mutex_unlock + 48
1   libc++.1.dylib                  0x340edd4e std::__1::mutex::unlock() + 82
2   Mapbox GL                       0x001fe6ac mbgl::TileWorker::getBucket(mbgl::StyleLayer const&) const (tile_worker.cpp:45)
3   Mapbox GL                       0x0022f864 mbgl::VectorTileData::getBucket(mbgl::StyleLayer const&) (vector_tile_data.cpp:99)
4   Mapbox GL                       0x0023374c mbgl::VectorTileData::redoPlacement(float, float, bool)::$_2::operator()() const (vector_tile_data.cpp:122)
5   Mapbox GL                       0x0023365a void std::__1::__invoke_void_return_wrapper<void>::__call<mbgl::VectorTileData::redoPlacement(float, float, bool)::$_2&>(mbgl::VectorTileData::redoPlacement(float, float, bool)::$_2&&&) (__functional_base:440)
6   Mapbox GL                       0x00233524 std::__1::__function::__func<mbgl::VectorTileData::redoPlacement(float, float, bool)::$_2, std::__1::allocator<mbgl::VectorTileData::redoPlacement(float, float, bool)::$_2>, void ()>::operator()() (functional:1407)
7   Mapbox GL                       0x001cc36c std::__1::function<void ()>::operator()() const (functional:1793)
8   Mapbox GL                       0x00394406 _ZZN4mbgl4util7RunLoop18invokeWithCallbackIZNS0_6ThreadINS_6Worker4ImplEE4bindIMS5_FvPNS_10TileWorkerEffbNSt3__18functionIFvvEEEEEEDaT_EUlDpOT_E_RSD_JS9_RfSN_RbEEENSA_10unique_ptrINS_11WorkRequestENSA_14default_deleteISQ_EEEEOSH_OT0_DpOT1_ENKUlSK_E_clIJEEEDaSK_ (run_loop.hpp:72)
9   Mapbox GL                       0x003943b8 _ZN4mbgl4util7RunLoop7InvokerIKZNS1_18invokeWithCallbackIZNS0_6ThreadINS_6Worker4ImplEE4bindIMS6_FvPNS_10TileWorkerEffbNSt3__18functionIFvvEEEEEEDaT_EUlDpOT_E_RSE_JSA_RfSO_RbEEENSB_10unique_ptrINS_11WorkRequestENSB_14default_deleteISR_EEEEOSI_OT0_DpOT1_EUlSL_E_NSB_5tupleIJEEEE6invokeIJEEEvNSB_16integer_sequenceImJXspT_EEEE (run_loop.hpp:133)
10  Mapbox GL                       0x0039421a _ZN4mbgl4util7RunLoop7InvokerIKZNS1_18invokeWithCallbackIZNS0_6ThreadINS_6Worker4ImplEE4bindIMS6_FvPNS_10TileWorkerEffbNSt3__18functionIFvvEEEEEEDaT_EUlDpOT_E_RSE_JSA_RfSO_RbEEENSB_10unique_ptrINS_11WorkRequestENSB_14default_deleteISR_EEEEOSI_OT0_DpOT1_EUlSL_E_NSB_5tupleIJEEEEclEv (run_loop.hpp:113)
11  Mapbox GL                       0x0036c316 mbgl::util::RunLoop::process() (run_loop.cpp:27)
12  Mapbox GL                       0x0036fca0 void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (mbgl::util::RunLoop::*)(), mbgl::util::RunLoop*>&>(std::__1::__bind<void (mbgl::util::RunLoop::*)(), mbgl::util::RunLoop*>&&&) (__functional_base:440)
13  Mapbox GL                       0x0036fb08 std::__1::__function::__func<std::__1::__bind<void (mbgl::util::RunLoop::*)(), mbgl::util::RunLoop*>, std::__1::allocator<std::__1::__bind<void (mbgl::util::RunLoop::*)(), mbgl::util::RunLoop*> >, void ()>::operator()() (functional:1407)
14  Mapbox GL                       0x001cc36c std::__1::function<void ()>::operator()() const (functional:1793)
15  Mapbox GL                       0x001cc130 uv::async::async_cb(uv_async_s*, int) (uv_detail.hpp:127)
16  Mapbox GL                       0x00400a6a uv__async_event (async.c:76)
17  Mapbox GL                       0x00400cd4 uv__async_io (async.c:156)
18  Mapbox GL                       0x00411f3e uv__io_poll (kqueue.c:234)
19  Mapbox GL                       0x00401132 uv_run (core.c:318)
20  Mapbox GL                       0x003f225e uv::loop::run() (uv_detail.hpp:62)
21  Mapbox GL                       0x0019b08c void mbgl::util::Thread<mbgl::MapContext>::run<std::__1::tuple<mbgl::View&, mbgl::FileSource&, mbgl::MapData&>, 0ul, 1ul, 2ul>(mbgl::util::ThreadContext, std::__1::tuple<mbgl::View&, mbgl::FileSource&, mbgl::MapData&>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul>) (thread.hpp:125)
22  Mapbox GL                       0x0019af14 mbgl::util::Thread<mbgl::MapContext>::Thread<mbgl::View&, mbgl::FileSource&, mbgl::MapData&>(mbgl::util::ThreadContext const&, mbgl::View&&&, mbgl::FileSource&&&, mbgl::MapData&&&)::'lambda'()::operator()() const (thread.hpp:104)
23  Mapbox GL                       0x0019ac96 std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::MapContext>::Thread<mbgl::View&, mbgl::FileSource&, mbgl::MapData&>(mbgl::util::ThreadContext const&, mbgl::View&&&, mbgl::FileSource&&&, mbgl::MapData&&&)::'lambda'()> >(void*, void*) (thread:347)
24  libsystem_pthread.dylib         0x351eac92 _pthread_body + 138
25  libsystem_pthread.dylib         0x351eac06 _pthread_start + 110
26  libsystem_pthread.dylib         0x351e8a24 thread_start + 8

...

/cc @tmpsantos @kkaefer

@friedbunny friedbunny added iOS Mapbox Maps SDK for iOS crash labels Aug 18, 2015
@webventil
Copy link

I got this crash today, using an iPhone 6 with iOS 9 GM. I am using the release-ios-v2.1.0 branch.

Thread 1 name:  Dispatch queue: NSOperationQueue 0x13e590e30 :: NSOperation 0x1423f4d80 (QOS: LEGACY)
Thread 1 Crashed:
0   libc++.1.dylib                  0x0000000198d17408 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string() + 16
1   Mapbox                          0x00000001007f1eac mbgl::HTTPNSURLRequest::handleResult(NSData*, NSURLResponse*, NSError*) (http_request_nsurl.mm:255)
2   Mapbox                          0x00000001007f1eac mbgl::HTTPNSURLRequest::handleResult(NSData*, NSURLResponse*, NSError*) (http_request_nsurl.mm:255)
3   CFNetwork                       0x00000001841cf49c __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 32
4   CFNetwork                       0x00000001841e2454 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 296
5   Foundation                      0x00000001859e382c __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
6   Foundation                      0x00000001859366c0 -[NSBlockOperation main] + 96
7   Foundation                      0x0000000185926918 -[__NSOperationInternal _start:] + 604
8   Foundation                      0x00000001859e5c20 __NSOQSchedule_f + 224
9   libdispatch.dylib               0x0000000199ea9770 _dispatch_client_callout + 16
10  libdispatch.dylib               0x0000000199eb575c _dispatch_queue_drain + 864
11  libdispatch.dylib               0x0000000199ead274 _dispatch_queue_invoke + 464
12  libdispatch.dylib               0x0000000199eb762c _dispatch_root_queue_drain + 728
13  libdispatch.dylib               0x0000000199eb734c _dispatch_worker_thread3 + 112
14  libsystem_pthread.dylib         0x000000019a0bd478 _pthread_wqthread + 1092
15  libsystem_pthread.dylib         0x000000019a0bd028 start_wqthread + 4

@friedbunny
Copy link
Contributor Author

Managed to reproduce this crash by having the network link conditioner set to "Very Bad Network" (slow, packet loss) and then toggling wifi on/off on my cellular-connected device. On master @ 5406048.

Assertion failed: (!task), function start, file /mapbox-gl-native/platform/darwin/http_request_nsurl.mm, line 123.
* thread #12: tid = 0xd318a, 0x000000019a1d3140 libsystem_kernel.dylib`__pthread_kill + 8, name = 'FileSource', stop reason = signal SIGABRT
    frame #0: 0x000000019a1d3140 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x000000019a29cef8 libsystem_pthread.dylib`pthread_kill + 112
    frame #2: 0x000000019a146b78 libsystem_c.dylib`abort + 140
    frame #3: 0x000000019a11bb50 libsystem_c.dylib`__assert_rtn + 324
  * frame #4: 0x000000010041b468 Mapbox GL`mbgl::HTTPNSURLRequest::start(this=0x000000012dec8340) + 124 at http_request_nsurl.mm:123
    frame #5: 0x0000000100421434 Mapbox GL`mbgl::HTTPNSURLRequest::retry(this=0x000000012dec8400)::$_2::operator()() const + 52 at http_request_nsurl.mm:335
    frame #6: 0x00000001004213d8 Mapbox GL`void std::__1::__invoke_void_return_wrapper<void>::__call<mbgl::HTTPNSURLRequest::retry()::$_2&>(mbgl::HTTPNSURLRequest::retry()::$_2&&&) [inlined] decltype(__f=0x000000012dec8400)::$_2&>(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<mbgl::HTTPNSURLRequest::retry()::$_2&>(mbgl::HTTPNSURLRequest::retry()::$_2&&&) + 20 at __functional_base:415
    frame #7: 0x00000001004213c4 Mapbox GL`void std::__1::__invoke_void_return_wrapper<void>::__call<mbgl::HTTPNSURLRequest::retry(__args=0x000000012dec8400)::$_2&>(mbgl::HTTPNSURLRequest::retry()::$_2&&&) + 52 at __functional_base:440
    frame #8: 0x0000000100421158 Mapbox GL`std::__1::__function::__func<mbgl::HTTPNSURLRequest::retry()::$_2, std::__1::allocator<mbgl::HTTPNSURLRequest::retry()::$_2>, void ()>::operator(this=0x000000012dec83f8)() + 68 at functional:1407
    frame #9: 0x000000010017d3c8 Mapbox GL`std::__1::function<void ()>::operator(this=0x000000012dec83f8)() const + 176 at functional:1793
    frame #10: 0x0000000100422544 Mapbox GL`uv::timer::timer_cb(t=0x000000012de23410) + 56 at uv_detail.hpp:161
    frame #11: 0x000000010044b3c8 Mapbox GL`uv__run_timers(loop=0x000000012e851000) + 28 at timer.c:165 [opt]
    frame #12: 0x0000000100441ba0 Mapbox GL`uv_run(loop=0x000000012e851000, mode=UV_RUN_DEFAULT) + 160 at core.c:332 [opt]
    frame #13: 0x0000000100266530 Mapbox GL`uv::loop::run(this=0x000000016e476a78) + 60 at uv_detail.hpp:70
    frame #14: 0x0000000100266230 Mapbox GL`void mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::run<std::__1::tuple<mbgl::FileCache*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>, 0ul, 1ul>(this=0x000000012de38610, context=<unavailable>, params=0x000000016fde8db8, (null)=std::__1::index_sequence<0UL, 1UL> @ 0x000000016e476a38) + 232 at thread.hpp:125
    frame #15: 0x00000001002660e4 Mapbox GL`mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<mbgl::FileCache*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(this=0x000000012de78b60)::'lambda'()::operator()() const + 332 at thread.hpp:104
    frame #16: 0x0000000100265d30 Mapbox GL`std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<mbgl::FileCache*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(mbgl::util::ThreadContext const&, mbgl::FileCache*&&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&)::'lambda'()> >(void*, void*) [inlined] std::__1::__invoke<mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<mbgl::FileCache*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(mbgl::util::ThreadContext const&, mbgl::FileCache*&&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&)::'lambda'()>(__f=0x000000012de78b60)::'lambda'()>(fp)(std::__1::forward<>(fp0))), mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<mbgl::FileCache*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(mbgl::util::ThreadContext const&, mbgl::FileCache*&&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&)::'lambda'()&&) + 12 at __functional_base:415
    frame #17: 0x0000000100265d24 Mapbox GL`std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<mbgl::FileCache*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(mbgl::util::ThreadContext const&, mbgl::FileCache*&&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&)::'lambda'()> >(void*, void*) [inlined] _ZNSt3__116__thread_executeIZN4mbgl4util6ThreadINS1_17DefaultFileSource4ImplEEC1IJRPNS1_9FileCacheERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEEEERKNS2_13ThreadContextEDpOT_EUlvE_JEJEEEvRNS_5tupleIJT_DpT0_EEENS_15__tuple_indicesIJXspT1_EEEE(__t=0x000000012de78b60, (null)=__tuple_indices<> @ 0x000000016e476ea8) + 16 at thread:337
    frame #18: 0x0000000100265d14 Mapbox GL`std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<mbgl::FileCache*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(mbgl::util::ThreadContext const&, mbgl::FileCache*&&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&)::'lambda'()> >(__vp=0x000000012de78b60) + 288 at thread:347
    frame #19: 0x000000019a29bb28 libsystem_pthread.dylib`_pthread_body + 156
    frame #20: 0x000000019a29ba8c libsystem_pthread.dylib`_pthread_start + 156

@friedbunny
Copy link
Contributor Author

Still reproduces after #2617 — toggle wifi on/off until it crashes. /cc @kkaefer

@kkaefer
Copy link
Member

kkaefer commented Oct 27, 2015

Managed to reproduce this on my phone, but not on my (Wi-Fi only) iPad; looks like it's related to switching between networks (cell <--> wifi).

I'm convinced that this happens in the following scenario: We're doing a request on one network, which takes some time (Network Link Conditioner helps here to prolong the time a request takes). Then, we're switching to another network mode, which triggers Reachability, which in turn calls retry on all requests. The idea is that the request wasn't active before due to missing network, but when multiple networks are available, that obviously isn't the case.

This particular issue is crashing on the assert we put in, but it seems very likely that in Release mode, this means that there will be more than one tasks, which in turn call handleResponse, which might be the cause for #2417 and #1837

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
crash iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants