{"action":"created","issue":{"url":"https://api.github.com/repos/plredmond/GPipe-GLFW/issues/6","labels_url":"https://api.github.com/repos/plredmond/GPipe-GLFW/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/plredmond/GPipe-GLFW/issues/6/comments","events_url":"https://api.github.com/repos/plredmond/GPipe-GLFW/issues/6/events","html_url":"https://github.com/plredmond/GPipe-GLFW/issues/6","id":105398838,"number":6,"title":"Crash when running basic triangle example on OSX","user":{"login":"tobbebex","id":250614,"avatar_url":"https://avatars.githubusercontent.com/u/250614?v=3","gravatar_id":"","url":"https://api.github.com/users/tobbebex","html_url":"https://github.com/tobbebex","followers_url":"https://api.github.com/users/tobbebex/followers","following_url":"https://api.github.com/users/tobbebex/following{/other_user}","gists_url":"https://api.github.com/users/tobbebex/gists{/gist_id}","starred_url":"https://api.github.com/users/tobbebex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobbebex/subscriptions","organizations_url":"https://api.github.com/users/tobbebex/orgs","repos_url":"https://api.github.com/users/tobbebex/repos","events_url":"https://api.github.com/users/tobbebex/events{/privacy}","received_events_url":"https://api.github.com/users/tobbebex/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-08T14:51:30Z","updated_at":"2015-09-08T22:38:44Z","closed_at":"2015-09-08T18:44:09Z","body":"Reported by @BlackBrane on tobbebex/GPipe-Core#6:\r\n\r\n---------------------------------------------------------------\r\n\r\nI tried to run the basic triangle example described in [GPU programming in Haskell using GPipe - Part 1](http://tobbebex.blogspot.se/2015/09/gpu-programming-in-haskell-using-gpipe.html) on a Late 2013 MacBook Pro.\r\n\r\nI installed with:\r\n\r\n```\r\ncabal update\r\ncabal install GPipe\r\ncabal install GPipe-GLFW\r\n```\r\n\r\nThen I copied the contents of that example to a Haskell source file. It compiled fine, but crashed on trying to run:\r\n\r\n```\r\nghc -threaded hellotriangle.hs\r\nLinking hellotriangle ...\r\n./hellotriangle \r\n2015-09-07 13:40:41.667 hellotriangle[13945:8036447] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-1153.20/Misc.subproj/NSUndoManager.m:340\r\n2015-09-07 13:40:41.667 hellotriangle[13945:8036447] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.\r\n2015-09-07 13:40:41.674 hellotriangle[13945:8036447] (\r\n\t0   CoreFoundation                      0x00007fff84a9903c __exceptionPreprocess + 172\r\n\t1   libobjc.A.dylib                     0x00007fff89a0e76e objc_exception_throw + 43\r\n\t2   CoreFoundation                      0x00007fff84a98e1a +[NSException raise:format:arguments:] + 106\r\n\t3   Foundation                          0x00007fff8808d8cb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195\r\n\t4   Foundation                          0x00007fff8800f57f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 156\r\n\t5   AppKit                              0x00007fff81c82b95 -[NSApplication run] + 756\r\n\t6   hellotriangle                       0x00000001040e6b8e _glfwPlatformCreateWindow + 1406\r\n\t7   hellotriangle                       0x00000001040e1fd5 glfwCreateWindow + 597\r\n\t8   hellotriangle                       0x0000000104012f85 c2efY_info + 205\r\n)\r\n2015-09-07 13:40:41.674 hellotriangle[13945:8036447] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-1153.20/Misc.subproj/NSUndoManager.m:340\r\n2015-09-07 13:40:41.676 hellotriangle[13945:8036447] An uncaught exception was raised\r\n2015-09-07 13:40:41.676 hellotriangle[13945:8036447] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.\r\n2015-09-07 13:40:41.676 hellotriangle[13945:8036447] (\r\n\t0   CoreFoundation                      0x00007fff84a9903c __exceptionPreprocess + 172\r\n\t1   libobjc.A.dylib                     0x00007fff89a0e76e objc_exception_throw + 43\r\n\t2   CoreFoundation                      0x00007fff84a98e1a +[NSException raise:format:arguments:] + 106\r\n\t3   Foundation                          0x00007fff8808d8cb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195\r\n\t4   Foundation                          0x00007fff8800f57f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 156\r\n\t5   AppKit                              0x00007fff81c82c41 -[NSApplication run] + 928\r\n\t6   hellotriangle                       0x00000001040e6b8e _glfwPlatformCreateWindow + 1406\r\n\t7   hellotriangle                       0x00000001040e1fd5 glfwCreateWindow + 597\r\n\t8   hellotriangle                       0x0000000104012f85 c2efY_info + 205\r\n)\r\n2015-09-07 13:40:41.677 hellotriangle[13945:8036447] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.'\r\n*** First throw call stack:\r\n(\r\n\t0   CoreFoundation                      0x00007fff84a9903c __exceptionPreprocess + 172\r\n\t1   libobjc.A.dylib                     0x00007fff89a0e76e objc_exception_throw + 43\r\n\t2   CoreFoundation                      0x00007fff84a98e1a +[NSException raise:format:arguments:] + 106\r\n\t3   Foundation                          0x00007fff8808d8cb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195\r\n\t4   Foundation                          0x00007fff8800f57f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 156\r\n\t5   AppKit                              0x00007fff81c82c41 -[NSApplication run] + 928\r\n\t6   hellotriangle                       0x00000001040e6b8e _glfwPlatformCreateWindow + 1406\r\n\t7   hellotriangle                       0x00000001040e1fd5 glfwCreateWindow + 597\r\n\t8   hellotriangle                       0x0000000104012f85 c2efY_info + 205\r\n)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\nAbort trap: 6\r\n```"},"comment":{"url":"https://api.github.com/repos/plredmond/GPipe-GLFW/issues/comments/138723432","html_url":"https://github.com/plredmond/GPipe-GLFW/issues/6#issuecomment-138723432","issue_url":"https://api.github.com/repos/plredmond/GPipe-GLFW/issues/6","id":138723432,"user":{"login":"tobbebex","id":250614,"avatar_url":"https://avatars.githubusercontent.com/u/250614?v=3","gravatar_id":"","url":"https://api.github.com/users/tobbebex","html_url":"https://github.com/tobbebex","followers_url":"https://api.github.com/users/tobbebex/followers","following_url":"https://api.github.com/users/tobbebex/following{/other_user}","gists_url":"https://api.github.com/users/tobbebex/gists{/gist_id}","starred_url":"https://api.github.com/users/tobbebex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobbebex/subscriptions","organizations_url":"https://api.github.com/users/tobbebex/orgs","repos_url":"https://api.github.com/users/tobbebex/repos","events_url":"https://api.github.com/users/tobbebex/events{/privacy}","received_events_url":"https://api.github.com/users/tobbebex/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T22:38:44Z","updated_at":"2015-09-08T22:38:44Z","body":"Hmm, seems like glfw requires even more things to run on the main thread. Will need to take another look at this in the next couple of days. At least you are not blocked for now..."}}