{"action":"created","issue":{"url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/4215","labels_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/4215/labels{/name}","comments_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/4215/comments","events_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/4215/events","html_url":"https://github.com/openframeworks/openFrameworks/issues/4215","id":100026047,"number":4215,"title":"3DPrimitivesExample segfault","user":{"login":"avilleret","id":504914,"avatar_url":"https://avatars.githubusercontent.com/u/504914?v=3","gravatar_id":"","url":"https://api.github.com/users/avilleret","html_url":"https://github.com/avilleret","followers_url":"https://api.github.com/users/avilleret/followers","following_url":"https://api.github.com/users/avilleret/following{/other_user}","gists_url":"https://api.github.com/users/avilleret/gists{/gist_id}","starred_url":"https://api.github.com/users/avilleret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avilleret/subscriptions","organizations_url":"https://api.github.com/users/avilleret/orgs","repos_url":"https://api.github.com/users/avilleret/repos","events_url":"https://api.github.com/users/avilleret/events{/privacy}","received_events_url":"https://api.github.com/users/avilleret/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openframeworks/openFrameworks/labels/bug","name":"bug","color":"b31d1d"},{"url":"https://api.github.com/repos/openframeworks/openFrameworks/labels/critical","name":"critical","color":"ff0000"},{"url":"https://api.github.com/repos/openframeworks/openFrameworks/labels/example","name":"example","color":"d1af26"},{"url":"https://api.github.com/repos/openframeworks/openFrameworks/labels/section-3D","name":"section-3D","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/openframeworks/openFrameworks/milestones/8","html_url":"https://github.com/openframeworks/openFrameworks/milestones/0.9.0","labels_url":"https://api.github.com/repos/openframeworks/openFrameworks/milestones/8/labels","id":88731,"number":8,"title":"0.9.0","description":"Originally aimed for release on November 10th with initial emscripten support, Apothecary compiled libs and C++11/64-bit support on OSX. Pushed back to January 12, multiwindow support was added. Deadline removed on January 4. Deadline added again on February 8 as May 18.","creator":{"login":"bilderbuchi","id":327442,"avatar_url":"https://avatars.githubusercontent.com/u/327442?v=3","gravatar_id":"","url":"https://api.github.com/users/bilderbuchi","html_url":"https://github.com/bilderbuchi","followers_url":"https://api.github.com/users/bilderbuchi/followers","following_url":"https://api.github.com/users/bilderbuchi/following{/other_user}","gists_url":"https://api.github.com/users/bilderbuchi/gists{/gist_id}","starred_url":"https://api.github.com/users/bilderbuchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bilderbuchi/subscriptions","organizations_url":"https://api.github.com/users/bilderbuchi/orgs","repos_url":"https://api.github.com/users/bilderbuchi/repos","events_url":"https://api.github.com/users/bilderbuchi/events{/privacy}","received_events_url":"https://api.github.com/users/bilderbuchi/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":260,"state":"open","created_at":"2012-02-25T01:34:28Z","updated_at":"2015-08-10T17:01:10Z","due_on":"2015-05-18T04:00:00Z","closed_at":null},"comments":1,"created_at":"2015-08-10T10:05:07Z","updated_at":"2015-08-10T17:12:52Z","closed_at":null,"body":"here is the step to reproduce :\r\n\r\n1. Run the 3DPrimitiveExample\r\n2. Enter Mode 3 (where faces moves)\r\n3. Reduce vertex resolution by pressing `1` for example.\r\n\r\nThen it crashes.\r\n\r\nHere is the full backtrace.\r\n\r\n~~~~\r\n$ gdb ./3DPrimitivesExample_debug \r\nGNU gdb (Ubuntu 7.9-1ubuntu1) 7.9\r\nCopyright (C) 2015 Free Software Foundation, Inc.\r\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r\nThis is free software: you are free to change and redistribute it.\r\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\r\nand \"show warranty\" for details.\r\nThis GDB was configured as \"x86_64-linux-gnu\".\r\nType \"show configuration\" for configuration details.\r\nFor bug reporting instructions, please see:\r\n<http://www.gnu.org/software/gdb/bugs/>.\r\nFind the GDB manual and other documentation resources online at:\r\n<http://www.gnu.org/software/gdb/documentation/>.\r\nFor help, type \"help\".\r\nType \"apropos word\" to search for commands related to \"word\"...\r\nReading symbols from ./3DPrimitivesExample_debug...done.\r\n(gdb) run \r\nStarting program: /home/antoine/lib-src/openFrameworks/examples/3d/3DPrimitivesExample/bin/3DPrimitivesExample_debug \r\n[Thread debugging using libthread_db enabled]\r\nUsing host libthread_db library \"/lib/x86_64-linux-gnu/libthread_db.so.1\".\r\n[notice ] ofGstVideoGrabber: Probing devices with udev...\r\n[notice ] ofGstVideoGrabber: Found device 0c45:642a, getting capabilities...\r\n[notice ] ofGstVideoGrabber: detected v4l2 device: Laptop_Integrated_Webcam_2HDM\r\n[notice ] ofGstVideoGrabber: driver: uvcvideo, version: 201480\r\n[notice ] ofGstVideoGrabber: Capabilities: 0x84200001\r\n[notice ] ofGstVideoGrabber: initGrabber(): selected device: Laptop_Integrated_Webcam_2HDM\r\n[notice ] ofGstVideoGrabber: initGrabber(): selected format: 640x480 video/x-raw RGB framerate: 30/1\r\n[notice ] ofGstUtils: setPipelineWithSink(): gstreamer pipeline: v4l2src name=video_source device=/dev/video0 ! video/x-raw,format=RGB,width=640,height=480,framerate=30/1    ! appsink name=ofappsink enable-last-sample=0 caps=\"video/x-raw, format=RGB, width=640, height=480\"\r\n[warning] ofMesh :: getMeshForIndices : found some indices less than 0, setting them to 0: \r\n[remove lots of warning]\r\n[warning] ofMesh :: getMeshForIndices : found some indices less than 0, setting them to 0: \r\n[New Thread 0x7fffe3fff700 (LWP 25638)]\r\n[New Thread 0x7fffe905b700 (LWP 25637)]\r\n[New Thread 0x7fffe985c700 (LWP 25636)]\r\n\r\nProgram received signal SIGSEGV, Segmentation fault.\r\n0x0000000000428d53 in ofMesh::getIndex (this=0x1155360, i=1156776) at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/3d/ofMesh.cpp:228\r\n228\t\treturn indices[i];\r\n(gdb)  bt\r\n#0  0x0000000000428d53 in ofMesh::getIndex (this=0x1155360, i=1156776) at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/3d/ofMesh.cpp:228\r\n#1  0x000000000042d4e9 in ofMesh::getMeshForIndices (this=0x1155360, startIndex=0, endIndex=4294967288, startVertIndex=0, endVertIndex=0)\r\n    at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/3d/ofMesh.cpp:1170\r\n#2  0x0000000000454857 in ofCylinderPrimitive::getTopCapMesh (this=0x115b7d8) at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/3d/of3dPrimitives.cpp:665\r\n#3  0x0000000000420d35 in ofApp::draw (this=0x115b1e0) at /home/antoine/lib-src/openFrameworks/examples/3d/3DPrimitivesExample/src/ofApp.cpp:266\r\n#4  0x00000000004242ef in ofBaseApp::draw (this=0x115b1e0, args=...) at ../../../libs/openFrameworks/app/ofBaseApp.h:69\r\n#5  0x00000000005a4b54 in of::priv::Function<ofEventArgs> ofEvent<ofEventArgs, std::mutex>::make_function<ofBaseApp>(ofBaseApp*, void (ofBaseApp::*)(ofEventArgs&), int)::{lambda(void const*, ofEventArgs&)#1}::operator()(void const*, ofEventArgs&) const (__closure=0xc37810, t=...)\r\n    at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/events/ofEvent.h:219\r\n#6  0x00000000005aaf93 in std::_Function_handler<bool (void const*, ofEventArgs&), of::priv::Function<ofEventArgs> ofEvent<ofEventArgs, std::mutex>::make_function<ofBaseApp>(ofBaseApp*, void (ofBaseApp::*)(ofEventArgs&), int)::{lambda(void const*, ofEventArgs&)#1}>::_M_invoke(std::_Any_data const&, void const*, ofEventArgs&)\r\n    (__functor=..., __args#0=0x0, __args#1=...) at /usr/include/c++/4.9/functional:2025\r\n#7  0x000000000045de79 in std::function<bool (void const*, ofEventArgs&)>::operator()(void const*, ofEventArgs&) const (this=0xc37db8, __args#0=0x0, __args#1=...)\r\n    at /usr/include/c++/4.9/functional:2439\r\n#8  0x000000000045c3ee in ofEvent<ofEventArgs, std::mutex>::notify (this=0xaeeb58, sender=0x0, param=...)\r\n    at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/events/ofEvent.h:289\r\n#9  0x000000000045b537 in ofNotifyEvent<ofEvent<ofEventArgs, std::mutex>, ofEventArgs> (event=..., args=...)\r\n    at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/events/ofEventUtils.h:222\r\n#10 0x0000000000459909 in ofCoreEvents::notifyDraw (this=0xaeeac8) at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/events/ofEvents.cpp:204\r\n#11 0x00000000005c1ccf in ofAppGLFWWindow::draw (this=0xaeeac0) at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/app/ofAppGLFWWindow.cpp:332\r\n#12 0x00000000005a067d in ofMainLoop::loopOnce (this=0xaee9c0) at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/app/ofMainLoop.cpp:141\r\n#13 0x00000000005a04e2 in ofMainLoop::loop (this=0xaee9c0) at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/app/ofMainLoop.cpp:123\r\n#14 0x0000000000466b72 in ofRunMainLoop () at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/app/ofAppRunner.cpp:159\r\n#15 0x0000000000466a43 in ofRunApp (app=std::shared_ptr (count 2, weak 0) 0x115b1e0)\r\n    at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/app/ofAppRunner.cpp:145\r\n#16 0x000000000046699d in ofRunApp (OFSA=0x115b1e0) at /home/antoine/lib-src/openFrameworks/libs/openFrameworks/app/ofAppRunner.cpp:139\r\n#17 0x0000000000427a49 in main () at /home/antoine/lib-src/openFrameworks/examples/3d/3DPrimitivesExample/src/main.cpp:6\r\n(gdb) \r\n~~~~"},"comment":{"url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/comments/129529637","html_url":"https://github.com/openframeworks/openFrameworks/issues/4215#issuecomment-129529637","issue_url":"https://api.github.com/repos/openframeworks/openFrameworks/issues/4215","id":129529637,"user":{"login":"arturoc","id":48240,"avatar_url":"https://avatars.githubusercontent.com/u/48240?v=3","gravatar_id":"","url":"https://api.github.com/users/arturoc","html_url":"https://github.com/arturoc","followers_url":"https://api.github.com/users/arturoc/followers","following_url":"https://api.github.com/users/arturoc/following{/other_user}","gists_url":"https://api.github.com/users/arturoc/gists{/gist_id}","starred_url":"https://api.github.com/users/arturoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arturoc/subscriptions","organizations_url":"https://api.github.com/users/arturoc/orgs","repos_url":"https://api.github.com/users/arturoc/repos","events_url":"https://api.github.com/users/arturoc/events{/privacy}","received_events_url":"https://api.github.com/users/arturoc/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T17:12:52Z","updated_at":"2015-08-10T17:12:52Z","body":"@bakercp @tpltnt this seems to be related to the changes you've done to use unsigned types. the example is constantly printing:\r\n\r\n```\r\n[warning] ofMesh :: getMeshForIndices : found some indices less than 0, setting them to 0:\r\n```\r\n\r\nand git blame points to you 2 : )\r\n\r\ncan you take a look?"}}