openframeworks / openframeworks/openFrameworks
Tessellator failing on master iOS Nightly
Open
Nobody has claimed this yet.
bug
iOS
prelim-analysis
section-3D
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
on the iOS nightly with polygonExample ofGLRenderer.cpp fails on line 182
glDrawElements(drawMode,
vertexData.getNumIndices(),
GL_UNSIGNED_SHORT,
vertexData.getIndexPointer());
As I remember from another issue this may be related to the Tessellator?
0.9.8 works fine so maybe glm is involved?
[ error ] ofTessellator: performTessellation(): mesh polygon tessellation failed, winding mode 0
[ error ] ofTessellator: performTessellation(): mesh polygon tessellation failed, winding mode 0
[ error ] ofTessellator: performTessellation(): mesh polygon tessellation failed, winding mode 0
(lldb) bt
* thread #1: tid = 0x2e3653, 0x000000011edbde71 GLEngine`gleRunVertexSubmitImmediate + 9137, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x6100002b69fc)
frame #0: 0x000000011edbde71 GLEngine`gleRunVertexSubmitImmediate + 9137
frame #1: 0x000000011ed5b737 GLEngine`glDrawElements_IMM_Exec + 899
* frame #2: 0x000000010c2a6d9d polygonExample`ofGLRenderer::draw(this=0x00007fa99f805c00, vertexData=0x00007fa99f8076f8, renderType=OF_MESH_FILL, useColors=true, useTextures=true, useNormals=true)0>, glm::tvec3<float, (glm::precision)0>, ofColor_<float>, glm::tvec2<float, (glm::precision)0> > const&, ofPolyRenderMode, bool, bool, bool) const + 1373 at ofGLRenderer.cpp:182
frame #3: 0x000000010c38d7c2 polygonExample`ofBaseRenderer::draw(this=0x00007fa99f805c00, mesh=0x00007fa99f8076f8, renderType=OF_MESH_FILL)0>, glm::tvec3<float, (glm::precision)0>, ofColor_<float>, glm::tvec2<float, (glm::precision)0> > const&, ofPolyRenderMode) const + 146 at ofBaseTypes.cpp:151
frame #4: 0x000000010c2a776e polygonExample`ofGLRenderer::draw(this=0x00007fa99f805c00, shape=0x00007fa99f807698) const + 270 at ofGLRenderer.cpp:290
frame #5: 0x000000010c3678c6 polygonExample`ofEndShape(bClose=false) + 134 at ofGraphics.cpp:1239
frame #6: 0x000000010c233fd9 polygonExample`ofApp::draw(this=0x00006300001a10a0) + 2985 at ofApp.mm:255
frame #7: 0x000000010c230d55 polygonExample`ofBaseApp::draw(this=0x00006300001a10a0, args=0x000000010c4d5868) + 37 at ofBaseApp.h:68
frame #8: 0x000000010c4303c1 polygonExample`std::__1::shared_ptr<of::priv::Function<ofEventArgs, std::__1::recursive_mutex> > ofEvent<ofEventArgs, std::__1::recursive_mutex>::make_function<ofBaseApp>(this=0x000063000012e958, (null)=0x0000000000000000, t=0x000000010c4d5868)(ofEventArgs&), int)::'lambda'(void const*, ofEventArgs&)::operator()(void const*, ofEventArgs&) const + 113 at ofEvent.h:439
frame #9: 0x000000010c430340 polygonExample`bool std::__1::__invoke_void_return_wrapper<bool>::__call<std::__1::shared_ptr<of::priv::Function<ofEventArgs, std::__1::recursive_mutex> > ofEvent<ofEventArgs, std::__1::recursive_mutex>::make_function<ofBaseApp>(ofBaseApp*, void (ofBaseApp::*)(ofEventArgs&), int)::'lambda'(void const*, ofEventArgs&)&, void const*, ofEventArgs&>(std::__1::shared_ptr<of::priv::Function<ofEventArgs, std::__1::recursive_mutex> > ofEvent<ofEventArgs, std::__1::recursive_mutex>::make_function<ofBaseApp>(ofBaseApp*, void (ofBaseApp::*)(ofEventArgs&), int)::'lambda'(void const*, ofEventArgs&)&&&, void const*&&, ofEventArgs&&&) [inlined] decltype(__f=0x000063000012e958, __args=0x00007fff539cdd10, __args=0x000000010c4d5868)(std::__1::forward<void const*, ofEventArgs&>(fp0))) std::__1::__invoke<std::__1::shared_ptr<of::priv::Function<ofEventArgs, std::__1::recursive_mutex> > ofEvent<ofEventArgs, std::__1::recursive_mutex>::make_function<ofBaseApp>(ofBaseApp*, void (ofBaseApp::*)(ofEventArgs&), int)::'lambda'(void const*, ofEventArgs&)&, void const*, ofEventArgs&>(ofBaseApp&&, void const*&&, ofEventArgs&&&) + 112 at __functional_base:416
frame #10: 0x000000010c430314 polygonExample`bool std::__1::__invoke_void_return_wrapper<bool>::__call<std::__1::shared_ptr<of::priv::Function<ofEventArgs, std::__1::recursive_mutex> > ofEvent<ofEventArgs, std::__1::recursive_mutex>::make_function<ofBaseApp>(__args=0x000063000012e958, __args=0x00007fff539cdd10, __args=0x000000010c4d5868)(ofEventArgs&), int)::'lambda'(void const*, ofEventArgs&)&, void const*, ofEventArgs&>(std::__1::shared_ptr<of::priv::Function<ofEventArgs, std::__1::recursive_mutex> > ofEvent<ofEventArgs, std::__1::recursive_mutex>::make_function<ofBaseApp>(ofBaseApp*, void (ofBaseApp::*)(ofEventArgs&), int)::'lambda'(void const*, ofEventArgs&)&&&, void const*&&, ofEventArgs&&&) + 68 at __functional_base:437
frame #11: 0x000000010c4301b9 polygonExample`std::__1::__function::__func<std::__1::shared_ptr<of::priv::Function<ofEventArgs, std::__1::recursive_mutex> > ofEvent<ofEventArgs, std::__1::recursive_mutex>::make_function<ofBaseApp>(ofBaseApp*, void (ofBaseApp::*)(ofEventArgs&), int)::'lambda'(void const*, ofEventArgs&), std::__1::allocator<std::__1::shared_ptr<of::priv::Function<ofEventArgs, std::__1::recursive_mutex> > ofEvent<ofEventArgs, std::__1::recursive_mutex>::make_function<ofBaseApp>(ofBaseApp*, void (ofBaseApp::*)(ofEventArgs&), int)::'lambda'(void const*, ofEventArgs&)>, bool (void const*, ofEventArgs&)>::operator(this=0x000063000012e950, __arg=0x00007fff539cdd10, __arg=0x000000010c4d5868)(void const*&&, ofEventArgs&) + 73 at functional:1437
frame #12: 0x000000010c28dc44 polygonExample`std::__1::function<bool (void const*, ofEventArgs&)>::operator(this=0x000063000012e950, __arg=0x0000000000000000, __arg=0x000000010c4d5868)(void const*, ofEventArgs&) const + 180 at functional:1817
frame #13: 0x000000010c28d32d polygonExample`of::priv::Function<ofEventArgs, std::__1::recursive_mutex>::notify(this=0x000063000012e940, s=0x0000000000000000, t=0x000000010c4d5868) + 125 at ofEvent.h:90
frame #14: 0x000000010c28d0e4 polygonExample`ofEvent<ofEventArgs, std::__1::recursive_mutex>::notify(this=0x00007fa998e00b78, param=0x000000010c4d5868) + 644 at ofEvent.h:538
frame #15: 0x000000010c2847cd polygonExample`bool ofNotifyEvent<ofEvent<ofEventArgs, std::__1::recursive_mutex>, ofEventArgs>(event=0x00007fa998e00b78, args=0x000000010c4d5868) + 29 at ofEventUtils.h:214
frame #16: 0x000000010c28483d polygonExample`ofCoreEvents::notifyDraw(this=0x00007fa998e00b58) + 45 at ofEvents.cpp:260
frame #17: 0x000000010c45fd9d polygonExample`::-[ofxiOSEAGLView drawView](self=0x00007fa998e03bc0, _cmd="drawView") + 349 at ofxiOSEAGLView.mm:183
frame #18: 0x000000010c419277 polygonExample`-[EAGLView drawView:](self=0x00007fa998e03bc0, _cmd="drawView:", sender=0x0000658000171640) + 39 at EAGLView.m:181
frame #19: 0x000000010cbe18d4 Foundation`__NSFireTimer + 83
frame #20: 0x000000011068edb4 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
frame #21: 0x000000011068ea43 CoreFoundation`__CFRunLoopDoTimer + 1075
frame #22: 0x000000011068e5ca CoreFoundation`__CFRunLoopDoTimers + 250
frame #23: 0x00000001106862f1 CoreFoundation`__CFRunLoopRun + 2065
frame #24: 0x0000000110685884 CoreFoundation`CFRunLoopRunSpecific + 420
frame #25: 0x000000011149aa6f GraphicsServices`GSEventRunModal + 161
frame #26: 0x000000010d0aac68 UIKit`UIApplicationMain + 159
frame #27: 0x000000010c459bb5 polygonExample`ofAppiOSWindow::startAppWithDelegate(appDelegateClassName="ofxiOSAppDelegate") + 309 at ofAppiOSWindow.mm:137
frame #28: 0x000000010c459a48 polygonExample`ofAppiOSWindow::loop() + 40 at ofAppiOSWindow.mm:122
frame #29: 0x000000010c4226da polygonExample`void std::__1::__invoke_void_return_wrapper<void>::__call<void (*&)()>(void (*&&&)()) [inlined] decltype(__f=0x0000648000171458)()>(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<void (*&)()>(void (*&&&)()) + 42 at __functional_base:416
frame #30: 0x000000010c4226cc polygonExample`void std::__1::__invoke_void_return_wrapper<void>::__call<void (__args=0x0000648000171458)()>(void (*&&&)()) + 28 at __functional_base:468
frame #31: 0x000000010c4225a9 polygonExample`std::__1::__function::__func<void (*)(), std::__1::allocator<void (*)()>, void ()>::operator(this=0x0000648000171450)() + 41 at functional:1437
frame #32: 0x000000010c41e21e polygonExample`std::__1::function<void ()>::operator(this=0x0000648000171450)() const + 126 at functional:1817
frame #33: 0x000000010c41d7fd polygonExample`ofMainLoop::loop(this=0x0000648000171400) + 189 at ofMainLoop.cpp:126
frame #34: 0x000000010c27b86d polygonExample`ofRunMainLoop() + 29 at ofAppRunner.cpp:194
frame #35: 0x000000010c27b7f0 polygonExample`ofRunApp(OFSA=0x00006300001a10a0) + 96 at ofAppRunner.cpp:171
frame #36: 0x000000010c2304c8 polygonExample`main + 168 at main.mm:18
frame #37: 0x0000000110da168d libdyld.dylib`start + 1
frame #38: 0x0000000110da168d libdyld.dylib`start + 1
(lldb)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure in the iOS nightly using the polygonExample, starting at ofGLRenderer.cpp:182 and the preceding ofTessellator error messages. Compare the behavior with version 0.9.8 and investigate the stack frames through ofGraphics.cpp and ofApp.mm. Done means the example no longer reports tessellation failure or crashes in glDrawElements on iOS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, ios
- Domain
- computer-graphics, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100