{"action":"created","issue":{"url":"https://api.github.com/repos/glfw/glfw/issues/503","labels_url":"https://api.github.com/repos/glfw/glfw/issues/503/labels{/name}","comments_url":"https://api.github.com/repos/glfw/glfw/issues/503/comments","events_url":"https://api.github.com/repos/glfw/glfw/issues/503/events","html_url":"https://github.com/glfw/glfw/issues/503","id":70314481,"number":503,"title":"Full screen + Command Tab causes crash","user":{"login":"MasonRemaley","id":5516083,"avatar_url":"https://avatars.githubusercontent.com/u/5516083?v=3","gravatar_id":"","url":"https://api.github.com/users/MasonRemaley","html_url":"https://github.com/MasonRemaley","followers_url":"https://api.github.com/users/MasonRemaley/followers","following_url":"https://api.github.com/users/MasonRemaley/following{/other_user}","gists_url":"https://api.github.com/users/MasonRemaley/gists{/gist_id}","starred_url":"https://api.github.com/users/MasonRemaley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasonRemaley/subscriptions","organizations_url":"https://api.github.com/users/MasonRemaley/orgs","repos_url":"https://api.github.com/users/MasonRemaley/repos","events_url":"https://api.github.com/users/MasonRemaley/events{/privacy}","received_events_url":"https://api.github.com/users/MasonRemaley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/glfw/glfw/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/glfw/glfw/labels/OS%20X","name":"OS X","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"elmindreda","id":133714,"avatar_url":"https://avatars.githubusercontent.com/u/133714?v=3","gravatar_id":"","url":"https://api.github.com/users/elmindreda","html_url":"https://github.com/elmindreda","followers_url":"https://api.github.com/users/elmindreda/followers","following_url":"https://api.github.com/users/elmindreda/following{/other_user}","gists_url":"https://api.github.com/users/elmindreda/gists{/gist_id}","starred_url":"https://api.github.com/users/elmindreda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmindreda/subscriptions","organizations_url":"https://api.github.com/users/elmindreda/orgs","repos_url":"https://api.github.com/users/elmindreda/repos","events_url":"https://api.github.com/users/elmindreda/events{/privacy}","received_events_url":"https://api.github.com/users/elmindreda/received_events","type":"User","site_admin":false},"milestone":null,"comments":12,"created_at":"2015-04-23T05:36:51Z","updated_at":"2015-05-20T04:13:34Z","closed_at":null,"body":"I was getting a crash when command tabbing in and out of my full screen application, so to figure out what was going on I wrote a small test program that just creates a full screen window and keeps it open.\r\n\r\nWhen I run this code on OSX 10.10.3 and command tab out and then back in, it crashes on the call to glfwPollEvents. This seems like a bug to me, I think whatever was at 0x608000060000 before I command tabbed in and out is no longer there or something. Below is the test program and the console output after the crash. Let me know if I'm missing something or if you need any more info on my end to figure this out.\r\n\r\n<pre>\r\nint main()\r\n{\r\n\tglfwInit();\r\n\tGLFWwindow* window = glfwCreateWindow(512, 512, \"Window\", glfwGetPrimaryMonitor(), nullptr);\r\n\tglfwMakeContextCurrent(window);\r\n\t\r\n\twhile (!glfwWindowShouldClose(window))\r\n\t{\r\n\t\tglfwPollEvents();\r\n\t}\r\n}\r\n</pre>\r\n\r\n<pre>\r\n2015-04-23 01:28:24.670 Demo[12201:1127695] -[__NSMallocBlock__ frame]: unrecognized selector sent to instance 0x608000060000\r\n2015-04-23 01:28:24.671 Demo[12201:1127695] An uncaught exception was raised\r\n2015-04-23 01:28:24.671 Demo[12201:1127695] -[__NSMallocBlock__ frame]: unrecognized selector sent to instance 0x608000060000\r\n2015-04-23 01:28:24.671 Demo[12201:1127695] (\r\n\t0   CoreFoundation                      0x00007fff84e7003c __exceptionPreprocess + 172\r\n\t1   libobjc.A.dylib                     0x00007fff92b8f76e objc_exception_throw + 43\r\n\t2   CoreFoundation                      0x00007fff84e730ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205\r\n\t3   CoreFoundation                      0x00007fff84db8e24 ___forwarding___ + 1028\r\n\t4   CoreFoundation                      0x00007fff84e716c8 __forwarding_prep_1___ + 120\r\n\t5   Demo                                0x000000010002aa16 enterFullscreenMode + 79\r\n\t6   Demo                                0x000000010002a97c -[GLFWWindowDelegate windowDidBecomeKey:] + 33\r\n\t7   CoreFoundation                      0x00007fff84e2c45c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12\r\n\t8   CoreFoundation                      0x00007fff84d1c634 _CFXNotificationPost + 3140\r\n\t9   Foundation                          0x00007fff889c79d1 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66\r\n\t10  AppKit                              0x00007fff89de5bd9 -[NSWindow becomeKeyWindow] + 1406\r\n\t11  AppKit                              0x00007fff89ffbdda _NXShowKeyAndMain + 186\r\n\t12  AppKit                              0x00007fff89e15a01 -[NSApplication sendEvent:] + 8375\r\n\t13  Demo                                0x000000010002b9af -[GLFWApplication sendEvent:] + 146\r\n\t14  Demo                                0x000000010002c908 _glfwPlatformPollEvents + 67\r\n\t15  Demo                                0x0000000100001e6d main + 109\r\n\t16  libdyld.dylib                       0x00007fff83b115c9 start + 1\r\n)\r\n2015-04-23 01:28:24.876 Demo[12201:1127695] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSMallocBlock__ frame]: unrecognized selector sent to instance 0x608000060000'\r\n*** First throw call stack:\r\n(\r\n\t0   CoreFoundation                      0x00007fff84e7003c __exceptionPreprocess + 172\r\n\t1   libobjc.A.dylib                     0x00007fff92b8f76e objc_exception_throw + 43\r\n\t2   CoreFoundation                      0x00007fff84e730ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205\r\n\t3   CoreFoundation                      0x00007fff84db8e24 ___forwarding___ + 1028\r\n\t4   CoreFoundation                      0x00007fff84e716c8 __forwarding_prep_1___ + 120\r\n\t5   Demo                                0x000000010002aa16 enterFullscreenMode + 79\r\n\t6   Demo                                0x000000010002a97c -[GLFWWindowDelegate windowDidBecomeKey:] + 33\r\n\t7   CoreFoundation                      0x00007fff84e2c45c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12\r\n\t8   CoreFoundation                      0x00007fff84d1c634 _CFXNotificationPost + 3140\r\n\t9   Foundation                          0x00007fff889c79d1 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66\r\n\t10  AppKit                              0x00007fff89de5bd9 -[NSWindow becomeKeyWindow] + 1406\r\n\t11  AppKit                              0x00007fff89ffbdda _NXShowKeyAndMain + 186\r\n\t12  AppKit                              0x00007fff89e15a01 -[NSApplication sendEvent:] + 8375\r\n\t13  Demo                                0x000000010002b9af -[GLFWApplication sendEvent:] + 146\r\n\t14  Demo                                0x000000010002c908 _glfwPlatformPollEvents + 67\r\n\t15  Demo                                0x0000000100001e6d main + 109\r\n\t16  libdyld.dylib                       0x00007fff83b115c9 start + 1\r\n)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\n</pre>"},"comment":{"url":"https://api.github.com/repos/glfw/glfw/issues/comments/103749800","html_url":"https://github.com/glfw/glfw/issues/503#issuecomment-103749800","issue_url":"https://api.github.com/repos/glfw/glfw/issues/503","id":103749800,"user":{"login":"MasonRemaley","id":5516083,"avatar_url":"https://avatars.githubusercontent.com/u/5516083?v=3","gravatar_id":"","url":"https://api.github.com/users/MasonRemaley","html_url":"https://github.com/MasonRemaley","followers_url":"https://api.github.com/users/MasonRemaley/followers","following_url":"https://api.github.com/users/MasonRemaley/following{/other_user}","gists_url":"https://api.github.com/users/MasonRemaley/gists{/gist_id}","starred_url":"https://api.github.com/users/MasonRemaley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasonRemaley/subscriptions","organizations_url":"https://api.github.com/users/MasonRemaley/orgs","repos_url":"https://api.github.com/users/MasonRemaley/repos","events_url":"https://api.github.com/users/MasonRemaley/events{/privacy}","received_events_url":"https://api.github.com/users/MasonRemaley/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T04:13:34Z","updated_at":"2015-05-20T04:13:34Z","body":"I finally got a chance to try it out on my friend's computer and I couldn't get it to crash. Furthermore, I made a new account on my computer and it didn't crash there either. It also didn't pause during start up in either place like it does on my account. On my account, it has taken on a new pattern of alternating between running correctly and then crashing every other time I open it.\r\n\r\nI have no idea how, but it seems like it's just an issue with my account and I'll have to reinstall--thank you guys for helping trying to figure this one out! Let me know if you think there's anything more to this, but otherwise feel free to close the issue."}}