{"action":"created","issue":{"url":"https://api.github.com/repos/Polytonic/Glitter/issues/8","labels_url":"https://api.github.com/repos/Polytonic/Glitter/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/Polytonic/Glitter/issues/8/comments","events_url":"https://api.github.com/repos/Polytonic/Glitter/issues/8/events","html_url":"https://github.com/Polytonic/Glitter/issues/8","id":103899390,"number":8,"title":"Glitter seems to build fine but segfaults on glfwWindowShouldClose()","user":{"login":"ronjouch","id":522085,"avatar_url":"https://avatars.githubusercontent.com/u/522085?v=3","gravatar_id":"","url":"https://api.github.com/users/ronjouch","html_url":"https://github.com/ronjouch","followers_url":"https://api.github.com/users/ronjouch/followers","following_url":"https://api.github.com/users/ronjouch/following{/other_user}","gists_url":"https://api.github.com/users/ronjouch/gists{/gist_id}","starred_url":"https://api.github.com/users/ronjouch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronjouch/subscriptions","organizations_url":"https://api.github.com/users/ronjouch/orgs","repos_url":"https://api.github.com/users/ronjouch/repos","events_url":"https://api.github.com/users/ronjouch/events{/privacy}","received_events_url":"https://api.github.com/users/ronjouch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-08-30T03:44:46Z","updated_at":"2015-08-30T04:13:16Z","closed_at":null,"body":"Hi @Polytonic, here's a followup to [this hn discussion](https://news.ycombinator.com/item?id=10141937). Below is what I am doing and the start of a debugging session.\r\n\r\nFeel free to ask for more debug info and, again, I know nothing about OpenGL and might be doing something wrong, sorry if the problem is between the keyboard & the chair, and in this case I'll be glad to submit a PR improving the documentation.\r\n\r\n---\r\n\r\n\t~/Glitter  ± master  mkdir -p Build && cd Build\r\n\r\n\r\n\t ~/Glitter/Build  ± master  cmake ..\r\n\t-- The C compiler identification is GNU 5.2.0\r\n\t-- The CXX compiler identification is GNU 5.2.0\r\n\t-- Check for working C compiler: /usr/bin/cc\r\n\t-- Check for working C compiler: /usr/bin/cc -- works\r\n\t-- Detecting C compiler ABI info\r\n\t-- Detecting C compiler ABI info - done\r\n\t-- Detecting C compile features\r\n\t-- Detecting C compile features - done\r\n\t-- Check for working CXX compiler: /usr/bin/c++\r\n\t-- Check for working CXX compiler: /usr/bin/c++ -- works\r\n\t-- Detecting CXX compiler ABI info\r\n\t-- Detecting CXX compiler ABI info - done\r\n\t-- Detecting CXX compile features\r\n\t-- Detecting CXX compile features - done\r\n\t-- Found OpenGL: /usr/lib64/libGL.so  \r\n\t-- Looking for include file pthread.h\r\n\t-- Looking for include file pthread.h - found\r\n\t-- Looking for pthread_create\r\n\t-- Looking for pthread_create - not found\r\n\t-- Looking for pthread_create in pthreads\r\n\t-- Looking for pthread_create in pthreads - not found\r\n\t-- Looking for pthread_create in pthread\r\n\t-- Looking for pthread_create in pthread - found\r\n\t-- Found Threads: TRUE  \r\n\t-- Using X11 for window creation\r\n\t-- Using GLX for context creation\r\n\t-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so\r\n\t-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found\r\n\t-- Looking for gethostbyname\r\n\t-- Looking for gethostbyname - found\r\n\t-- Looking for connect\r\n\t-- Looking for connect - found\r\n\t-- Looking for remove\r\n\t-- Looking for remove - found\r\n\t-- Looking for shmat\r\n\t-- Looking for shmat - found\r\n\t-- Looking for IceConnectionNumber in ICE\r\n\t-- Looking for IceConnectionNumber in ICE - found\r\n\t-- Found X11: /usr/lib64/libX11.so\r\n\t-- Found PkgConfig: /usr/bin/pkg-config (found version \"0.28\") \r\n\t-- Building a non-boost version of Assimp.\r\n\t-- Looking for ZLIB...\r\n\t-- checking for module 'zzip-zlib-config'\r\n\t--   package 'zzip-zlib-config' not found\r\n\t-- Found ZLIB: optimized;/usr/lib64/libz.so;debug;/usr/lib64/libz.so\r\n\t-- checking for module 'minizip'\r\n\t--   package 'minizip' not found\r\n\t-- Enabled formats: 3DS AC ASE ASSBIN ASSXML B3D BVH COLLADA DXF CSM HMP IRR LWO LWS MD2 MD3 MD5 MD C MDL NFF NDO OFF OBJ OGRE OPENGEX PLY MS3D COB BLEND IFC XGL FBX Q3D Q3BSP RAW SMD STL TERRAGEN 3D X\r\n\t-- Disabled formats:\r\n\t-- Configuring done\r\n\t-- Generating done\r\n\t-- Build files have been written to: /home/ronj/Glitter/Build\r\n\t ~/Glitter/Build  ± master  make                                                          [302/460]\r\n\tScanning dependencies of target assimp\r\n\t[  1%] Building CXX object Glitter/Vendor/assimp/code/CMakeFiles/assimp.dir/Assimp.cpp.o\r\n\t[  1%] Building CXX object Glitter/Vendor/assimp/code/CMakeFiles/assimp.dir/BaseImporter.cpp.o\r\n\t<<<cut text... tons of assimp code compiled, a few warnings>>>\r\n\t[ 91%] Linking CXX static library libassimp.a\r\n\t[ 91%] Built target assimp\r\n\tScanning dependencies of target glfw\r\n\t[ 91%] Building C object Glitter/Vendor/glfw/src/CMakeFiles/glfw.dir/context.c.o\r\n\t[ 92%] Building C object Glitter/Vendor/glfw/src/CMakeFiles/glfw.dir/init.c.o\r\n\t[ 92%] Building C object Glitter/Vendor/glfw/src/CMakeFiles/glfw.dir/input.c.o\r\n\t[ 93%] Building C object Glitter/Vendor/glfw/src/CMakeFiles/glfw.dir/monitor.c.o\r\n\t[ 93%] Building C object Glitter/Vendor/glfw/src/CMakeFiles/glfw.dir/window.c.o\r\n\t[ 94%] Building C object Glitter/Vendor/glfw/src/CMakeFiles/glfw.dir/x11_init.c.o\r\n\t[ 95%] Building C object Glitter/Vendor/glfw/src/CMakeFiles/glfw.dir/x11_monitor.c.o\r\n\t[ 95%] Building C object Glitter/Vendor/glfw/src/CMakeFiles/glfw.dir/x11_window.c.o\r\n\t[ 96%] Building C object Glitter/Vendor/glfw/src/CMakeFiles/glfw.dir/xkb_unicode.c.o\r\n\t[ 96%] Building C object Glitter/Vendor/glfw/src/CMakeFiles/glfw.dir/linux_joystick.c.o\r\n\t[ 97%] Building C object Glitter/Vendor/glfw/src/CMakeFiles/glfw.dir/posix_time.c.o\r\n\t[ 97%] Building C object Glitter/Vendor/glfw/src/CMakeFiles/glfw.dir/posix_tls.c.o\r\n\t[ 98%] Building C object Glitter/Vendor/glfw/src/CMakeFiles/glfw.dir/glx_context.c.o\r\n\t[ 99%] Linking C static library libglfw3.a\r\n\t[ 99%] Built target glfw\r\n\tScanning dependencies of target Glitter\r\n\t[ 99%] Building CXX object CMakeFiles/Glitter.dir/Glitter/Sources/main.cpp.o\r\n\t/home/ronj/Glitter/Glitter/Sources/main.cpp:12:14: warning: unused parameter ‘argc’ [-Wunused-parameter]\r\n\t int main(int argc, char * argv[]) {\r\n\t              ^\r\n\t/home/ronj/Glitter/Glitter/Sources/main.cpp:12:32: warning: unused parameter ‘argv’ [-Wunused-parameter]\r\n\t int main(int argc, char * argv[]) {\r\n\t                                ^\r\n\t[100%] Building C object CMakeFiles/Glitter.dir/Glitter/Vendor/glad/src/glad.c.o\r\n\t[100%] Linking CXX executable Glitter/Glitter\r\n\t[100%] Built target Glitter\r\n\r\n\r\n\t~/Glitter/Build  ± master   cd Glitter\r\n\r\n\r\n\t~/Glitter/Build/Glitter  ± master  ./Glitter         \r\n\tOpenGL (null)\r\n\t[1]    22649 segmentation fault (core dumped)  ./Glitter\r\n\r\n\r\n\t ✘  ~/Glitter/Build/Glitter  ± master  gdb ./Glitter \r\n\tGNU gdb (GDB) 7.9.1\r\n\tCopyright (C) 2015 Free Software Foundation, Inc.\r\n\tLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r\n\tThis is free software: you are free to change and redistribute it.\r\n\tThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\r\n\tand \"show warranty\" for details.\r\n\tThis GDB was configured as \"x86_64-unknown-linux-gnu\".\r\n\tType \"show configuration\" for configuration details.\r\n\tFor bug reporting instructions, please see:\r\n\t<http://www.gnu.org/software/gdb/bugs/>.\r\n\tFind the GDB manual and other documentation resources online at:\r\n\t<http://www.gnu.org/software/gdb/documentation/>.\r\n\tFor help, type \"help\".\r\n\tType \"apropos word\" to search for commands related to \"word\"...\r\n\tReading symbols from ./Glitter...(no debugging symbols found)...done.\r\n\r\n\t(gdb) run\r\n\tStarting program: /home/ronj/Glitter/Build/Glitter/Glitter \r\n\t[Thread debugging using libthread_db enabled]\r\n\tUsing host libthread_db library \"/usr/lib/libthread_db.so.1\".\r\n\tOpenGL (null)\r\n\t[New Thread 0x7fffeeca7700 (LWP 22699)]\r\n\tProgram received signal SIGSEGV, Segmentation fault.\r\n\t0x000000000046cbe2 in glfwWindowShouldClose ()\r\n\r\n\t(gdb) backtrace\r\n\t#0  0x000000000046cbe2 in glfwWindowShouldClose ()\r\n\t#1  0x000000000044e082 in main ()"},"comment":{"url":"https://api.github.com/repos/Polytonic/Glitter/issues/comments/136083749","html_url":"https://github.com/Polytonic/Glitter/issues/8#issuecomment-136083749","issue_url":"https://api.github.com/repos/Polytonic/Glitter/issues/8","id":136083749,"user":{"login":"ronjouch","id":522085,"avatar_url":"https://avatars.githubusercontent.com/u/522085?v=3","gravatar_id":"","url":"https://api.github.com/users/ronjouch","html_url":"https://github.com/ronjouch","followers_url":"https://api.github.com/users/ronjouch/followers","following_url":"https://api.github.com/users/ronjouch/following{/other_user}","gists_url":"https://api.github.com/users/ronjouch/gists{/gist_id}","starred_url":"https://api.github.com/users/ronjouch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronjouch/subscriptions","organizations_url":"https://api.github.com/users/ronjouch/orgs","repos_url":"https://api.github.com/users/ronjouch/repos","events_url":"https://api.github.com/users/ronjouch/events{/privacy}","received_events_url":"https://api.github.com/users/ronjouch/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T04:13:16Z","updated_at":"2015-08-30T04:13:16Z","body":"> Unfortunately, this does not compile for me using gcc-5 (Homebrew gcc5 5.2.0) 5.2.0 (OSX) so I can't reproduce your issue locally. I think @metiulekm was using MinGW under Windows though -- not sure if he's seen this before.\r\n\r\nI have clang installed too, may using it change anything? Is it easy to tell cmake to switch to it?"}}