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

Crash: gl::PushGroupMarkerEXT(...): Error GL_INVALID_ENUM #1550

Closed
friedbunny opened this issue May 13, 2015 · 5 comments
Closed

Crash: gl::PushGroupMarkerEXT(...): Error GL_INVALID_ENUM #1550

friedbunny opened this issue May 13, 2015 · 5 comments

Comments

@friedbunny
Copy link
Contributor

Crashed on device unlock, after being idle for some tens of minutes. Was testing my location-annotation branch (#1222), which is even with master @ 1d38b63.

Failed to bind EAGLDrawable: <CAEAGLLayer: 0x14d71fc0> to GL_RENDERBUFFER 1
Failed to make complete framebuffer object 8cd6
libc++abi.dylib: terminating with uncaught exception of type mbgl::gl::Error: gl::PushGroupMarkerEXT(GLsizei(str.size() + 1), str.c_str()): Error GL_INVALID_ENUM - include/mbgl/platform/gl.hpp:162
* thread #14: tid = 0xb9253, 0x3a6fcdf0 libsystem_kernel.dylib`__pthread_kill + 8, name = 'Map', stop reason = signal SIGABRT
frame #0: 0x3a6fcdf0 libsystem_kernel.dylib`__pthread_kill + 8
frame #1: 0x3a77bcc6 libsystem_pthread.dylib`pthread_kill + 62
frame #2: 0x3a698908 libsystem_c.dylib`abort + 76
frame #3: 0x399c49c8 libc++abi.dylib`abort_message + 88
frame #4: 0x399de63a libc++abi.dylib`default_terminate_handler() + 214
frame #5: 0x3a0a6f48 libobjc.A.dylib`_objc_terminate() + 228
frame #6: 0x399dbde2 libc++abi.dylib`std::__terminate(void (*)()) + 78
frame #7: 0x399dbee0 libc++abi.dylib`std::terminate() + 156
frame #8: 0x001285c0 Mapbox GL`__clang_call_terminate + 16
* frame #9: 0x00164db8 Mapbox GL`mbgl::gl::start_group(this=0x0436e214)::'lambda0'()::operator()() const::__MBGL_C_E::~__MBGL_C_E() + 196 at gl.hpp:162
frame #10: 0x00164cd4 Mapbox GL`mbgl::gl::start_group(this=0x0436e214)::'lambda0'()::operator()() const::__MBGL_C_E::~__MBGL_C_E() + 32 at gl.hpp:162
frame #11: 0x00164c40 Mapbox GL`mbgl::gl::start_group(this=0x0436e2b8)::'lambda0'()::operator()() const + 372 at gl.hpp:162
frame #12: 0x001648be Mapbox GL`mbgl::gl::start_group(str=0x0436eb78) + 86 at gl.hpp:162
frame #13: 0x0016484a Mapbox GL`mbgl::gl::group::group(this=0x0436eb84, str=0x0436eb78) + 38 at gl.hpp:182
frame #14: 0x001bed34 Mapbox GL`mbgl::gl::group::group(this=0x0436eb84, str=0x0436eb78) + 36 at gl.hpp:182
frame #15: 0x001b9c12 Mapbox GL`mbgl::Painter::render(this=0x1585ae00, style=0x14ddbd60, state_=TransformState at 0x0436ec28, time=mbgl::TimePoint at 0x0436ebb4) + 890 at painter.cpp:215
frame #16: 0x00144a24 Mapbox GL`mbgl::MapContext::render(this=0x04374bc0) + 1124 at map_context.cpp:232
frame #17: 0x0013d1b6 Mapbox GL`std::__1::__packaged_task_func<std::__1::__bind<void (mbgl::MapContext::*&)(), mbgl::MapContext*&>, std::__1::allocator<std::__1::__bind<void (mbgl::MapContext::*&)(), mbgl::MapContext*&> >, void ()>::operator()() [inlined] decltype(__f=0x16fe1ffc, __a0=0x16fe2004)).*fp(std::__1::forward<>(fp1))) std::__1::__invoke<void (mbgl::MapContext::*&)(), mbgl::MapContext*&, void>(void (mbgl::MapContext::*&&&)(), mbgl::MapContext*&&&) + 68 at __functional_base:380
frame #18: 0x0013d172 Mapbox GL`std::__1::__packaged_task_func<std::__1::__bind<void (mbgl::MapContext::*&)(), mbgl::MapContext*&>, std::__1::allocator<std::__1::__bind<void (mbgl::MapContext::*&)(), mbgl::MapContext*&> >, void ()>::operator()() [inlined] std::__1::__bind_return<void (mbgl::MapContext::*)(), std::__1::tuple<mbgl::MapContext*>, std::__1::tuple<>, _is_valid_bind_return<void (mbgl::MapContext::*)(), std::__1::tuple<mbgl::MapContext*>, std::__1::tuple<> >::value>::type std::__1::__apply_functor<void (__f=0x16fe1ffc, __bound_args=0x16fe2004, (null)=__tuple_indices<0> at 0x0436f1a0, __args=0x0436f1c0)(), std::__1::tuple<mbgl::MapContext*>, 0ul, std::__1::tuple<> >(void (mbgl::MapContext::*&)(), std::__1::tuple<mbgl::MapContext*>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) + 20 at functional:2023
frame #19: 0x0013d15e Mapbox GL`std::__1::__packaged_task_func<std::__1::__bind<void (mbgl::MapContext::*&)(), mbgl::MapContext*&>, std::__1::allocator<std::__1::__bind<void (mbgl::MapContext::*&)(), mbgl::MapContext*&> >, void ()>::operator()() [inlined] std::__1::__bind_return<void (mbgl::MapContext::*)(), std::__1::tuple<mbgl::MapContext*>, std::__1::tuple<>, _is_valid_bind_return<void (mbgl::MapContext::*)(), std::__1::tuple<mbgl::MapContext*>, std::__1::tuple<> >::value>::type std::__1::__bind<void (this=0x16fe1ffc)(), mbgl::MapContext*&>::operator()<>() + 14 at functional:2086
frame #20: 0x0013d150 Mapbox GL`std::__1::__packaged_task_func<std::__1::__bind<void (mbgl::MapContext::*&)(), mbgl::MapContext*&>, std::__1::allocator<std::__1::__bind<void (mbgl::MapContext::*&)(), mbgl::MapContext*&> >, void ()>::operator()() [inlined] decltype(__f=0x16fe1ffc)(), mbgl::MapContext*&>&>(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<std::__1::__bind<void (mbgl::MapContext::*&)(), mbgl::MapContext*&>&>(std::__1::__bind<void (mbgl::MapContext::*&)(), mbgl::MapContext*&>&&&) + 4 at __functional_base:413
frame #21: 0x0013d14c Mapbox GL`std::__1::__packaged_task_func<std::__1::__bind<void (mbgl::MapContext::*&)(), mbgl::MapContext*&>, std::__1::allocator<std::__1::__bind<void (mbgl::MapContext::*&)(), mbgl::MapContext*&> >, void ()>::operator(this=0x16fe1ff8)() + 32 at future:1817
frame #22: 0x0013cb78 Mapbox GL`std::__1::packaged_task<void ()>::operator()() [inlined] std::__1::__packaged_task_function<void ()>::operator(this=0x16fe1ff8)() const + 12 at future:1999
frame #23: 0x0013cb6c Mapbox GL`std::__1::packaged_task<void ()>::operator(this=0x16fe1ff8)() + 532 at future:2221
frame #24: 0x0013c854 Mapbox GL`mbgl::util::RunLoop::Invoker<std::__1::packaged_task<void ()> >::operator(this=0x16fe1ff0)() + 32 at run_loop.hpp:71
frame #25: 0x002cb0b2 Mapbox GL`mbgl::util::RunLoop::process(this=0x04374ca0) + 466 at run_loop.cpp:27
frame #26: 0x002cdf0e Mapbox GL`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()() [inlined] decltype(__f=0x04374cf4, __a0=0x04374cfc)).*fp(std::__1::forward<>(fp1))) std::__1::__invoke<void (mbgl::util::RunLoop::*&)(), mbgl::util::RunLoop*&, void>(void (mbgl::util::RunLoop::*&&&)(), mbgl::util::RunLoop*&&&) + 68 at __functional_base:380
frame #27: 0x002cdeca Mapbox GL`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()() [inlined] std::__1::__bind_return<void (mbgl::util::RunLoop::*)(), std::__1::tuple<mbgl::util::RunLoop*>, std::__1::tuple<>, _is_valid_bind_return<void (mbgl::util::RunLoop::*)(), std::__1::tuple<mbgl::util::RunLoop*>, std::__1::tuple<> >::value>::type std::__1::__apply_functor<void (__f=0x04374cf4, __bound_args=0x04374cfc, (null)=__tuple_indices<0> at 0x0436f554, __args=0x0436f574)(), std::__1::tuple<mbgl::util::RunLoop*>, 0ul, std::__1::tuple<> >(void (mbgl::util::RunLoop::*&)(), std::__1::tuple<mbgl::util::RunLoop*>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) + 20 at functional:2023
frame #28: 0x002cdeb6 Mapbox GL`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()() [inlined] std::__1::__bind_return<void (mbgl::util::RunLoop::*)(), std::__1::tuple<mbgl::util::RunLoop*>, std::__1::tuple<>, _is_valid_bind_return<void (mbgl::util::RunLoop::*)(), std::__1::tuple<mbgl::util::RunLoop*>, std::__1::tuple<> >::value>::type std::__1::__bind<void (this=0x04374cf4)(), mbgl::util::RunLoop*>::operator()<>() + 14 at functional:2086
frame #29: 0x002cdea8 Mapbox GL`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()() [inlined] decltype(__f=0x04374cf4)(), mbgl::util::RunLoop*>&>(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<std::__1::__bind<void (mbgl::util::RunLoop::*)(), mbgl::util::RunLoop*>&>(std::__1::__bind<void (mbgl::util::RunLoop::*)(), mbgl::util::RunLoop*>&&&) + 4 at __functional_base:413
frame #30: 0x002cdea4 Mapbox GL`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(this=0x04374cf0)() + 32 at functional:1370
frame #31: 0x0014bbbc Mapbox GL`std::__1::function<void ()>::operator(this=0x04374cf0)() const + 116 at functional:1756
frame #32: 0x0014bb2c Mapbox GL`uv::async::async_cb(a=0x14d71750, (null)=0) + 36 at uv_detail.hpp:120
frame #33: 0x0033921a Mapbox GL`uv__async_event(loop=0x14e78180, w=0x14e78258, nevents=2) + 118 at async.c:80
frame #34: 0x00339488 Mapbox GL`uv__async_io(loop=0x14e78180, w=0x14e7825c, events=1) + 164 at async.c:156
frame #35: 0x0034a804 Mapbox GL`uv__io_poll(loop=0x14e78180, timeout=-1) + 2076 at kqueue.c:233
frame #36: 0x003398ea Mapbox GL`uv_run(loop=0x14e78180, mode=UV_RUN_DEFAULT) + 122 at core.c:317
frame #37: 0x00140782 Mapbox GL`uv::loop::run(this=0x04374bbc) + 34 at uv_detail.hpp:55
frame #38: 0x00128128 Mapbox GL`void mbgl::util::Thread<mbgl::MapContext>::run<std::__1::tuple<mbgl::View&, mbgl::FileSource&, mbgl::MapData&>, 0ul, 1ul, 2ul>(this=0x14d71660, params=0x009237c8, (null)=index_sequence<0, 1, 2> at 0x04374b90)::index_sequence<0ul, 1ul, 2ul>) + 248 at thread.hpp:142
frame #39: 0x0014073e Mapbox GL`mbgl::util::Thread<mbgl::MapContext>::Thread<mbgl::View&, mbgl::FileSource&, mbgl::MapData&>(this=0x14d71740)::'lambda'()::operator()() const + 162 at thread.hpp:123
frame #40: 0x0014056a Mapbox GL`std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::MapContext>::Thread<mbgl::View&, mbgl::FileSource&, mbgl::MapData&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, mbgl::util::ThreadPriority, mbgl::View&&&, mbgl::FileSource&&&, mbgl::MapData&&&)::'lambda'()> >(void*, void*) [inlined] std::__1::__invoke<mbgl::util::Thread<mbgl::MapContext>::Thread<mbgl::View&, mbgl::FileSource&, mbgl::MapData&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, mbgl::util::ThreadPriority, mbgl::View&&&, mbgl::FileSource&&&, mbgl::MapData&&&)::'lambda'()>(__f=0x14d71740)::'lambda'()>(fp)(std::__1::forward<>(fp0))), mbgl::util::Thread<mbgl::MapContext>::Thread<mbgl::View&, mbgl::FileSource&, mbgl::MapData&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, mbgl::util::ThreadPriority, mbgl::View&&&, mbgl::FileSource&&&, mbgl::MapData&&&)::'lambda'()&&) + 10 at __functional_base:413
frame #41: 0x00140560 Mapbox GL`std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::MapContext>::Thread<mbgl::View&, mbgl::FileSource&, mbgl::MapData&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, mbgl::util::ThreadPriority, mbgl::View&&&, mbgl::FileSource&&&, mbgl::MapData&&&)::'lambda'()> >(void*, void*) [inlined] _ZNSt3__116__thread_executeIZN4mbgl4util6ThreadINS1_10MapContextEEC1IJRNS1_4ViewERNS1_10FileSourceERNS1_7MapDataEEEERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS2_14ThreadPriorityEDpOT_EUlvE_JEJEEEvRNS_5tupleIJT_DpT0_EEENS_15__tuple_indicesIJXspT1_EEEE(__t=0x14d71740, (null)=__tuple_indices<> at 0x04374eb8) + 8 at thread:332
frame #42: 0x00140558 Mapbox GL`std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::MapContext>::Thread<mbgl::View&, mbgl::FileSource&, mbgl::MapData&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, mbgl::util::ThreadPriority, mbgl::View&&&, mbgl::FileSource&&&, mbgl::MapData&&&)::'lambda'()> >(__vp=0x14d71740) + 252 at thread:342
frame #43: 0x3a77ae22 libsystem_pthread.dylib`_pthread_body + 138
frame #44: 0x3a77ad96 libsystem_pthread.dylib`_pthread_start + 118
frame #45: 0x3a778b20 libsystem_pthread.dylib`thread_start + 8

/cc @jfirebaugh @kkaefer

@friedbunny
Copy link
Contributor Author

Got this again on vanilla master @ 4db34bd.

Steps to reproduce:

  1. Turn on location+heading tracking mode
  2. Lock the device while the heading is being updated and the map redrawn (i.e., physically rotate the device)

This happens a second or so after locking:

2015-05-13 18:51:21.953 Mapbox GL[2730:808566] Failed to bind EAGLDrawable: <CAEAGLLayer: 0x145d9a70> to GL_RENDERBUFFER 1
2015-05-13 18:51:21.955 Mapbox GL[2730:808566] Failed to make complete framebuffer object 8cd6

And then it crashes on unlock:

libc++abi.dylib: terminating with uncaught exception of type mbgl::gl::Error: gl::PushGroupMarkerEXT(GLsizei(str.size() + 1), str.c_str()): Error GL_INVALID_ENUM - include/mbgl/platform/gl.hpp:162

@friedbunny
Copy link
Contributor Author

Still happens on current master, except it does not crash:

2015-08-24 15:55:51.062 Mapbox GL[536:131059] Failed to bind EAGLDrawable: <CAEAGLLayer: 0x165379f0> to GL_RENDERBUFFER 1
2015-08-24 15:55:51.063 Mapbox GL[536:131059] Failed to make complete framebuffer object 8cd6

@kkaefer
Copy link
Contributor

kkaefer commented Sep 14, 2015

@friedbunny do you still remember what you were doing? Anything in particular or just a random crash?

@friedbunny
Copy link
Contributor Author

@kkaefer Yes, this is reproducible using iosapp following the steps above.

Trying it again on the latest master (5ef7011), I got a different crash:

2015-09-14 10:09:34.566 Mapbox GL[245:10112] Failed to bind EAGLDrawable: <CAEAGLLayer: 0x16dd86c0> to GL_RENDERBUFFER 1
2015-09-14 10:09:34.567 Mapbox GL[245:10112] Failed to make complete framebuffer object 8cd6
libc++abi.dylib: terminating with uncaught exception of type mbgl::gl::Error: glBindTexture(GL_TEXTURE_2D, texture): Error GL_INVALID_ENUM - /mapbox-gl-native/src/mbgl/geometry/sprite_atlas.cpp:207
(lldb) bt
* thread #14: tid = 0x27d8, 0x35ff4d24 libsystem_kernel.dylib`__pthread_kill + 8, name = 'Map', stop reason = signal SIGABRT
    frame #0: 0x35ff4d24 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x36094b5a libsystem_pthread.dylib`pthread_kill + 62
    frame #2: 0x35f8cf50 libsystem_c.dylib`abort + 108
    frame #3: 0x34fca7dc libc++abi.dylib`abort_message + 108
    frame #4: 0x34fe366a libc++abi.dylib`default_terminate_handler() + 214
    frame #5: 0x357fb0bc libobjc.A.dylib`_objc_terminate() + 228
    frame #6: 0x34fe0e16 libc++abi.dylib`std::__terminate(void (*)()) + 78
    frame #7: 0x34fe0f3a libc++abi.dylib`std::terminate() + 190
    frame #8: 0x0011c810 Mapbox GL`__clang_call_terminate + 16
  * frame #9: 0x0009861c Mapbox GL`mbgl::SpriteAtlas::bind(this=0x405a01f4)::$_4::operator()() const::__MBGL_C_E::~__MBGL_C_E() + 196 at sprite_atlas.cpp:207
    frame #10: 0x00098538 Mapbox GL`mbgl::SpriteAtlas::bind(this=0x405a01f4)::$_4::operator()() const::__MBGL_C_E::~__MBGL_C_E() + 32 at sprite_atlas.cpp:207
    frame #11: 0x00097924 Mapbox GL`mbgl::SpriteAtlas::bind(this=0x405a0324)::$_4::operator()() const + 132 at sprite_atlas.cpp:207
    frame #12: 0x000967f0 Mapbox GL`mbgl::SpriteAtlas::bind(this=0x16e6a430, linear=false) + 212 at sprite_atlas.cpp:207
    frame #13: 0x00096700 Mapbox GL`mbgl::SpriteAtlas::upload(this=0x16e6a430) + 124 at sprite_atlas.cpp:162
    frame #14: 0x001a945e Mapbox GL`mbgl::Painter::render(this=0x17a6ba00, style=0x16de0bb0, state_=<unavailable>, frame_=0x1b19db38, time=0x405a0e34) + 954 at painter.cpp:191
    frame #15: 0x0011860c Mapbox GL`mbgl::MapContext::renderSync(this=0x405a6af0, state=0x1b19dae0, frame=0x1b19db38) + 1076 at map_context.cpp:343
    frame #16: 0x000fda48 Mapbox GL`std::__1::__packaged_task_func<std::__1::__bind<bool (mbgl::MapContext::*&)(mbgl::TransformState const&, mbgl::FrameData const&), mbgl::MapContext*&, mbgl::TransformState const&, mbgl::FrameData&>, std::__1::allocator<std::__1::__bind<bool (mbgl::MapContext::*&)(mbgl::TransformState const&, mbgl::FrameData const&), mbgl::MapContext*&, mbgl::TransformState const&, mbgl::FrameData&> >, bool ()>::operator()() [inlined] decltype(__f=0x1b19dad4, __a0=0x1b19dadc, __args=0x1b19dae0, __args=0x1b19db38)).*fp(std::__1::forward<mbgl::TransformState&, mbgl::FrameData&>(fp1))) std::__1::__invoke<bool (mbgl::MapContext::*&)(mbgl::TransformState const&, mbgl::FrameData const&), mbgl::MapContext*&, mbgl::TransformState&, mbgl::FrameData&, void>(bool (mbgl::MapContext::*&&&)(mbgl::TransformState const&, mbgl::FrameData const&), mbgl::MapContext*&&&, mbgl::TransformState&&&, mbgl::FrameData&&&) + 82 at __functional_base:382
    ...

@friedbunny
Copy link
Contributor Author

This no longer happens at all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants