This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
iOS 9: Crash in mbgl::HTTPRequest::start() #1911
Copy link
Copy link
Closed
Description
Top of master, hitting the assertion in the first line of the function. Here's the stack:
#3 0x00000001004c308c in mbgl::HTTPRequest::start() at /Users/admin/Developer/mapbox-gl-native/platform/darwin/http_request_nsurl.mm:152
#4 0x00000001004c7060 in mbgl::HTTPRequest::retry()::$_2::operator()() const at /Users/admin/Developer/mapbox-gl-native/platform/darwin/http_request_nsurl.mm:361
#5 0x00000001004c6e5c in decltype(std::__1::forward<mbgl::HTTPRequest::retry()::$_2&>(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<mbgl::HTTPRequest::retry()::$_2&>(mbgl::HTTPRequest::retry()::$_2&&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__functional_base:413
#6 0x00000001004c6e48 in std::__1::__function::__func<mbgl::HTTPRequest::retry()::$_2, std::__1::allocator<mbgl::HTTPRequest::retry()::$_2>, void ()>::operator()() at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1370
#7 0x000000010026fffc in std::__1::function<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1756
#8 0x00000001004c96dc in uv::timer::timer_cb(uv_timer_s*, int) at /Users/admin/Developer/mapbox-gl-native/src/mbgl/util/uv_detail.hpp:161
#9 0x0000000100548c58 in uv__run_timers at /Users/admin/Developer/mapbox-gl-native/mason_packages/.build/libuv-0.10.28/src/unix/timer.c:146
#10 0x0000000100541e00 in uv_run at /Users/admin/Developer/mapbox-gl-native/mason_packages/.build/libuv-0.10.28/src/unix/core.c:308
#11 0x000000010017f6d4 in uv::loop::run() at /Users/admin/Developer/mapbox-gl-native/src/mbgl/util/uv_detail.hpp:62
#12 0x000000010036e178 in 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>) at /Users/admin/Developer/mapbox-gl-native/src/mbgl/util/thread.hpp:125
#13 0x000000010036e02c in 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 at /Users/admin/Developer/mapbox-gl-native/src/mbgl/util/thread.hpp:104
#14 0x000000010036dd10 in 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'()>(decltype(std::__1::forward<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'()>(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'()&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__functional_base:413
#15 0x000000010036dd04 in _ZNSt3__116__thread_executeIZN4mbgl4util6ThreadINS1_17DefaultFileSource4ImplEEC1IJRPNS1_9FileCacheERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEEEERKNS2_13ThreadContextEDpOT_EUlvE_JEJEEEvRNS_5tupleIJT_DpT0_EEENS_15__tuple_indicesIJXspT1_EEEE [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/thread:332
#16 0x000000010036dcf4 in 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*) at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/thread:342
Running iOS 9 beta 4.
Activity
quicklywilliam commentedon Jul 22, 2015
Cannot reproduce this on iOS 8.4.
quicklywilliam commentedon Jul 22, 2015
To be clear, I'm not positive this is caused by iOS 9b4, just haven't had luck reproducing on my 8.4 device yet.
incanus commentedon Jul 22, 2015
I'm testing
masteras of 93e1ced, built in Xcode 6.4 against 8.4 (since we don't yet have Mason libs for 9.0), and running on an iPod touch with 9.0b4. Not seeing this happen.@quicklywilliam Is this sporadic, very frequent, ?? Any particular triggers?
incanus commentedon Jul 23, 2015
[got access to @quicklywilliam's custom style]
Not sure if it's a factor, but I still don't get the crash. I am seeing a lot of e.g.
1ec5 commentedon Jul 27, 2015
This assertion failure reproduces every time on a stock iosapp running in the iOS 9.0 Simulator in Xcode 7.
1ec5 commentedon Jul 27, 2015
The failure occurs because of a reachability notification that fires on iOS 9 but not earlier OSes, causing a call to
HTTPRequest::retry()that’s probably unexpected:/cc @kkaefer @jfirebaugh
[-]Crash in mbgl::HTTPRequest::start()[/-][+]iOS 9: Crash in mbgl::HTTPRequest::start()[/+]1ec5 commentedon Jul 27, 2015
The reachability notification shouldn’t be firing, since (at least in my case) we start out reachable.
1ec5 commentedon Jul 28, 2015
This is a change in behavior in SystemConfiguration in iOS 9. Radar forthcoming.
1ec5 commentedon Jul 28, 2015
Here’s the Radar, and a workaround is in #1958.
Ignore redundant initial reachability notification on iOS 9
1ec5 commentedon Aug 5, 2015
The Radar was closed as a duplicate of rdar://problem/21882003.
Ignore redundant initial reachability notification on iOS 9