{"action":"created","issue":{"url":"https://api.github.com/repos/exetoc/nim-glfw/issues/9","labels_url":"https://api.github.com/repos/exetoc/nim-glfw/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/exetoc/nim-glfw/issues/9/comments","events_url":"https://api.github.com/repos/exetoc/nim-glfw/issues/9/events","html_url":"https://github.com/exetoc/nim-glfw/issues/9","id":94544713,"number":9,"title":"Example `events.nim` doesn't run","user":{"login":"dgellow","id":2451004,"avatar_url":"https://avatars.githubusercontent.com/u/2451004?v=3","gravatar_id":"","url":"https://api.github.com/users/dgellow","html_url":"https://github.com/dgellow","followers_url":"https://api.github.com/users/dgellow/followers","following_url":"https://api.github.com/users/dgellow/following{/other_user}","gists_url":"https://api.github.com/users/dgellow/gists{/gist_id}","starred_url":"https://api.github.com/users/dgellow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgellow/subscriptions","organizations_url":"https://api.github.com/users/dgellow/orgs","repos_url":"https://api.github.com/users/dgellow/repos","events_url":"https://api.github.com/users/dgellow/events{/privacy}","received_events_url":"https://api.github.com/users/dgellow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-12T07:44:04Z","updated_at":"2015-07-12T08:56:30Z","closed_at":null,"body":"I have an error when I run `nim c -r events.nim` from within the examples directory.\r\n\r\n```\r\n/home/sam/Development/Nim/game_engine/nim-glfw/examples/events \r\nTraceback (most recent call last)\r\nevents.nim(102)          events\r\nglfw.nim(825)            update\r\nglfw.nim(814)            swapBufs\r\nSIGSEGV: Illegal storage access. (Attempt to read from nil?)\r\nError: execution of an external program failed\r\n```\r\n\r\nAs the stacktrace says the error occurred in `glfw.swapBuffs`:\r\n```nim\r\nproc swapBufs*(o: Win) =\r\n  wrapper.swapBuffers(o.handle) # <— o.handle shouldn't be nil\r\n\r\n# [...]\r\n\r\nproc update*(o: Win) =\r\n  o.swapBufs()\r\n  pollEvents()\r\n```"},"comment":{"url":"https://api.github.com/repos/exetoc/nim-glfw/issues/comments/120702298","html_url":"https://github.com/exetoc/nim-glfw/issues/9#issuecomment-120702298","issue_url":"https://api.github.com/repos/exetoc/nim-glfw/issues/9","id":120702298,"user":{"login":"exetoc","id":1609261,"avatar_url":"https://avatars.githubusercontent.com/u/1609261?v=3","gravatar_id":"","url":"https://api.github.com/users/exetoc","html_url":"https://github.com/exetoc","followers_url":"https://api.github.com/users/exetoc/followers","following_url":"https://api.github.com/users/exetoc/following{/other_user}","gists_url":"https://api.github.com/users/exetoc/gists{/gist_id}","starred_url":"https://api.github.com/users/exetoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exetoc/subscriptions","organizations_url":"https://api.github.com/users/exetoc/orgs","repos_url":"https://api.github.com/users/exetoc/repos","events_url":"https://api.github.com/users/exetoc/events{/privacy}","received_events_url":"https://api.github.com/users/exetoc/received_events","type":"User","site_admin":false},"created_at":"2015-07-12T08:56:30Z","updated_at":"2015-07-12T08:56:30Z","body":"I would assume that it's because \"failIf\" works differently now.\r\nWhat happens if you add \"assert result.handle != nil\" below this line https://github.com/exetoc/nim-glfw/blob/master/lib/glfw.nim#L669 ?"}}