{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4841","repository_url":"https://api.github.com/repos/mapbox/mapbox-gl-native","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4841/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4841/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4841/events","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/4841","id":151051630,"number":4841,"title":"Fatal Exception: mapbox::sqlite::Exception: disk I/O error","user":{"login":"MikeKasperlik","id":1431474,"avatar_url":"https://avatars.githubusercontent.com/u/1431474?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeKasperlik","html_url":"https://github.com/MikeKasperlik","followers_url":"https://api.github.com/users/MikeKasperlik/followers","following_url":"https://api.github.com/users/MikeKasperlik/following{/other_user}","gists_url":"https://api.github.com/users/MikeKasperlik/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeKasperlik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeKasperlik/subscriptions","organizations_url":"https://api.github.com/users/MikeKasperlik/orgs","repos_url":"https://api.github.com/users/MikeKasperlik/repos","events_url":"https://api.github.com/users/MikeKasperlik/events{/privacy}","received_events_url":"https://api.github.com/users/MikeKasperlik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/crash","name":"crash","color":"ff00ff"},{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/iOS","name":"iOS","color":"207de5"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-04-26T06:28:39Z","updated_at":"2016-07-06T17:45:08Z","closed_at":null,"body":"We see a crash that happens frequently. I don't know how to trigger this. We also do nothing fancy with mapbox currently, only setting the camera to the users location + creating some annotations.\r\n\r\nAccording to crashlytics this only happens when the app is not in foreground - maybe an issue with file protection?\r\n\r\n**Platform:** iOS 9.2.1 - iOS 9.3.1\r\n**Mapbox SDK version:** 3.2.1\r\n\r\n```\r\nCrashed: DefaultFileSource\r\n0  PACEApp                        0x1005075ac CLSProcessRecordAllThreads + 4300240300\r\n1  PACEApp                        0x1005075ac CLSProcessRecordAllThreads + 4300240300\r\n2  PACEApp                        0x1005079cc CLSProcessRecordAllThreads + 4300241356\r\n3  PACEApp                        0x1004f8680 CLSHandler + 4300179072\r\n4  PACEApp                        0x100505cc4 __CLSExceptionRecord_block_invoke + 4300233924\r\n5  libdispatch.dylib              0x1811fd47c _dispatch_client_callout + 16\r\n6  libdispatch.dylib              0x181208728 _dispatch_barrier_sync_f_invoke + 100\r\n7  PACEApp                        0x100505770 CLSExceptionRecord + 4300232560\r\n8  PACEApp                        0x1005052f4 CLSTerminateHandler() + 4300231412\r\n9  libc++abi.dylib                0x180e0af44 std::__terminate(void (*)()) + 16\r\n10 libc++abi.dylib                0x180e0a85c __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 134\r\n11 Mapbox                         0x10149fc04 mapbox::sqlite::Statement::run() + 156\r\n12 Mapbox                         0x10149a50c long long mbgl::OfflineDatabase::getPragma<long long>(char const*) + 36\r\n13 Mapbox                         0x101498f80 mbgl::OfflineDatabase::evict(unsigned long long) + 72\r\n14 Mapbox                         0x101498e74 mbgl::OfflineDatabase::putInternal(mbgl::Resource const&, mbgl::Response const&, bool) + 280\r\n15 Mapbox                         0x101489f40 mbgl::DefaultFileSource::Impl::Task::Task(mbgl::Resource, std::__1::function<void (mbgl::Response)>, mbgl::DefaultFileSource::Impl*)::'lambda'(mbgl::Response)::operator()(mbgl::Response) const + 40\r\n16 Mapbox                         0x101489e84 _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN4mbgl17DefaultFileSource4Impl4TaskC1ENS3_8ResourceENS_8functionIFvNS3_8ResponseEEEEPS5_EUlS9_E_S9_EEEvDpOT_ + 40\r\n17 Mapbox                         0x10148f368 mbgl::util::RunLoop::Invoker<auto std::__1::unique_ptr<mbgl::WorkRequest, std::__1::default_delete<std::__1::default_delete> > mbgl::util::RunLoop::invokeWithCallback<auto mbgl::util::Thread<mbgl::OnlineFileSource::Impl>::bind<void (mbgl::OnlineFileSource::Impl::*)(mbgl::FileRequest*, mbgl::Resource, std::__1::function<void (mbgl::Response)>)>(void (mbgl::OnlineFileSource::Impl::*)(mbgl::FileRequest*, mbgl::Resource, std::__1::function<void (mbgl::Response)>))::'lambda'(void (mbgl::OnlineFileSource::Impl::*&&)(mbgl::FileRequest*, mbgl::Resource, std::__1::function<void (mbgl::Response)>)), std::__1::function<void (mbgl::Response)>&, mbgl::OnlineFileSource::request(mbgl::Resource const&, std::__1::function<void (mbgl::Response)>)::OnlineFileRequest*, mbgl::Resource&>(void (mbgl::OnlineFileSource::Impl::*&&)(mbgl::FileRequest*, mbgl::Resource, std::__1::function<void (mbgl::Response)>), std::__1::function<void (mbgl::Response)>&&&, mbgl::OnlineFileSource::request(mbgl::Resource const&, std::__1::function<void (mbgl::Response)>)::OnlineFileRequest*&&, mbgl::Resource&&&)::'lambda'(auto mbgl::util::Thread<mbgl::OnlineFileSource::Impl>::bind<void (mbgl::OnlineFileSource::Impl::*)(mbgl::FileRequest*, mbgl::Resource, std::__1::function<void (mbgl::Response)>)>(void (mbgl::OnlineFileSource::Impl::*)(mbgl::FileRequest*, mbgl::Resource, std::__1::function<void (mbgl::Response)>))::'lambda'(void (mbgl::OnlineFileSource::Impl::*&&)(mbgl::FileRequest*, mbgl::Resource, std::__1::function<void (mbgl::Response)>)))::operator()<mbgl::Response>(auto mbgl::util::Thread<mbgl::OnlineFileSource::Impl>::bind<void (mbgl::OnlineFileSource::Impl::*)(mbgl::FileRequest*, mbgl::Resource, std::__1::function<void (mbgl::Response)>)>(void (mbgl::OnlineFileSource::Impl::*)(mbgl::FileRequest*, mbgl::Resource, std::__1::function<void (mbgl::Response)>))::'lambda'(void (mbgl::OnlineFileSource::Impl::*&&)(mbgl::FileRequest*, mbgl::Resource, std::__1::function<void (mbgl::Response)>))) const::'lambda'(auto mbgl::util::Thread<mbgl::OnlineFileSource::Impl>::bind<void (mbgl::OnlineFileSource::Impl::*)(mbgl::FileRequest*, mbgl::Resource, std::__1::function<void (mbgl::Response)>)>(void (mbgl::OnlineFileSource::Impl::*)(mbgl::FileRequest*, mbgl::Resource, std::__1::function<void (mbgl::Response)>))::'lambda'(void (mbgl::OnlineFileSource::Impl::*&&)(mbgl::FileRequest*, mbgl::Resource, std::__1::function<void (mbgl::Response)>))), std::__1::tuple<mbgl::Response> >::operator()() + 108\r\n18 Mapbox                         0x101482754 mbgl::util::RunLoop::process() + 320\r\n19 Mapbox                         0x1014eac38 uv__async_event + 80\r\n20 Mapbox                         0x1014eadf8 uv__async_io + 168\r\n21 Mapbox                         0x1014f6780 uv__io_poll + 1248\r\n22 Mapbox                         0x1014eb30c uv_run + 424\r\n23 Mapbox                         0x1014879d0 void mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::run<std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>, 0ul, 1ul>(mbgl::util::ThreadContext, std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>) + 164\r\n24 Mapbox                         0x1014878cc std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(mbgl::util::ThreadContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&, unsigned long long&&&)::'lambda'()> >(void*, void*) + 168\r\n25 libsystem_pthread.dylib        0x181417b28 _pthread_body + 156\r\n26 libsystem_pthread.dylib        0x181417a8c _pthread_body + 154\r\n27 libsystem_pthread.dylib        0x181415028 thread_start + 4\r\n```\r\n\r\nOther threads:\r\n```\r\nOnlineFileSource\r\n0  libsystem_kernel.dylib         0x181335528 kevent + 8\r\n1  Mapbox                         0x1014f6538 uv__io_poll (kqueue.c:142)\r\n2  Mapbox                         0x1014eb30c uv_run (core.c:341)\r\n3  Mapbox                         0x10148fba4 void mbgl::util::Thread<mbgl::OnlineFileSource::Impl>::run<std::__1::tuple<int>, 0ul>(mbgl::util::ThreadContext, std::__1::tuple<int>&&, std::__1::integer_sequence<unsigned long, 0ul>) + 116\r\n4  Mapbox                         0x10148fad0 std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::OnlineFileSource::Impl>::Thread<int>(mbgl::util::ThreadContext const&, int&&)::'lambda'()> >(void*, void*) + 168\r\n5  libsystem_pthread.dylib        0x181417b28 _pthread_body + 156\r\n6  libsystem_pthread.dylib        0x181417a8c _pthread_body + 154\r\n7  libsystem_pthread.dylib        0x181415028 thread_start + 4\r\n```\r\n\r\n```\r\nAssetFileSource\r\n0  libsystem_kernel.dylib         0x181335528 kevent + 8\r\n1  Mapbox                         0x1014f6538 uv__io_poll (kqueue.c:142)\r\n2  Mapbox                         0x1014eb30c uv_run (core.c:341)\r\n3  Mapbox                         0x1014d69cc void mbgl::util::Thread<mbgl::AssetFileSource::Impl>::run<std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>, 0ul>(mbgl::util::ThreadContext, std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>&&, std::__1::integer_sequence<unsigned long, 0ul>) + 112\r\n4  Mapbox                         0x1014d68fc std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(mbgl::util::ThreadContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&)::'lambda'()> >(void*, void*) + 168\r\n5  libsystem_pthread.dylib        0x181417b28 _pthread_body + 156\r\n6  libsystem_pthread.dylib        0x181417a8c _pthread_body + 154\r\n7  libsystem_pthread.dylib        0x181415028 thread_start + \r\n```\r\n\r\n```\r\nMap\r\n0  libsystem_kernel.dylib         0x18134bf24 __psynch_cvwait + 8\r\n1  libsystem_pthread.dylib        0x181416ce8 _pthread_cond_wait + 648\r\n2  libc++.1.dylib                 0x180da342c std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56\r\n3  Mapbox                         0x101400144 mbgl::MapContext::pause() + 112\r\n4  Mapbox                         0x1013fc518 mbgl::util::RunLoop::Invoker<auto mbgl::util::Thread<mbgl::MapContext>::bind<void (mbgl::MapContext::*)()>(void (mbgl::MapContext::*)())::'lambda'(void (mbgl::MapContext::*&&)()), std::__1::tuple<> >::operator()() + 80\r\n5  Mapbox                         0x101482754 mbgl::util::RunLoop::process() + 320\r\n6  Mapbox                         0x1014eac38 uv__async_event + 80\r\n7  Mapbox                         0x1014eadf8 uv__async_io + 168\r\n8  Mapbox                         0x1014f6780 uv__io_poll + 1248\r\n9  Mapbox                         0x1014eb30c uv_run + 424\r\n10 Mapbox                         0x1013fb780 void mbgl::util::Thread<mbgl::MapContext>::run<std::__1::tuple<mbgl::View&, mbgl::FileSource&, mbgl::MapMode&, mbgl::GLContextMode&, float>, 0ul, 1ul, 2ul, 3ul, 4ul>(mbgl::util::ThreadContext, std::__1::tuple<mbgl::View&, mbgl::FileSource&, mbgl::MapMode&, mbgl::GLContextMode&, float>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul>) + 132\r\n11 Mapbox                         0x1013fb69c std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::MapContext>::Thread<mbgl::View&, mbgl::FileSource&, mbgl::MapMode&, mbgl::GLContextMode&, float>(mbgl::util::ThreadContext const&, mbgl::View&&&, mbgl::FileSource&&&, mbgl::MapMode&&&, mbgl::GLContextMode&&&, float&&)::'lambda'()> >(void*, void*) + 168\r\n12 libsystem_pthread.dylib        0x181417b28 _pthread_body + 156\r\n13 libsystem_pthread.dylib        0x181417a8c _pthread_body + 154\r\n14 libsystem_pthread.dylib        0x181415028 thread_start + 4\r\n```\r\n\r\n```\r\nWorker (4 instances with equal trace)\r\n0  libsystem_kernel.dylib         0x181335528 kevent + 8\r\n1  Mapbox                         0x1014f6538 uv__io_poll (kqueue.c:142)\r\n2  Mapbox                         0x1014eb30c uv_run (core.c:341)\r\n3  Mapbox                         0x101474510 void mbgl::util::Thread<mbgl::Worker::Impl>::run<std::__1::tuple<> >(mbgl::util::ThreadContext, std::__1::tuple<>&&, std::__1::integer_sequence<unsigned long>) + 96\r\n4  Mapbox                         0x101474450 std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::Worker::Impl>::Thread<>(mbgl::util::ThreadContext const&)::'lambda'()> >(void*, void*) + 168\r\n5  libsystem_pthread.dylib        0x181417b28 _pthread_body + 156\r\n6  libsystem_pthread.dylib        0x181417a8c _pthread_body + 154\r\n7  libsystem_pthread.dylib        0x181415028 thread_start + 4\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/comments/230849807","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/4841#issuecomment-230849807","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4841","id":230849807,"user":{"login":"jfirebaugh","id":98601,"avatar_url":"https://avatars.githubusercontent.com/u/98601?v=3","gravatar_id":"","url":"https://api.github.com/users/jfirebaugh","html_url":"https://github.com/jfirebaugh","followers_url":"https://api.github.com/users/jfirebaugh/followers","following_url":"https://api.github.com/users/jfirebaugh/following{/other_user}","gists_url":"https://api.github.com/users/jfirebaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/jfirebaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfirebaugh/subscriptions","organizations_url":"https://api.github.com/users/jfirebaugh/orgs","repos_url":"https://api.github.com/users/jfirebaugh/repos","events_url":"https://api.github.com/users/jfirebaugh/events{/privacy}","received_events_url":"https://api.github.com/users/jfirebaugh/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T17:45:08Z","updated_at":"2016-07-06T17:45:08Z","body":"Actually, I take that back -- you would want offline downloads to continue in the background. The pause/resume API should only be about automatic revalidation."}}
{"actor":{"display_login":"jfirebaugh"}}