{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/338","labels_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/338/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/338/comments","events_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/338/events","html_url":"https://github.com/HaxeFoundation/hxcpp/issues/338","id":121161166,"number":338,"title":"Null function pointer is a hard crash (not caught by debugger)","user":{"login":"jcward","id":2192439,"avatar_url":"https://avatars.githubusercontent.com/u/2192439?v=3","gravatar_id":"","url":"https://api.github.com/users/jcward","html_url":"https://github.com/jcward","followers_url":"https://api.github.com/users/jcward/followers","following_url":"https://api.github.com/users/jcward/following{/other_user}","gists_url":"https://api.github.com/users/jcward/gists{/gist_id}","starred_url":"https://api.github.com/users/jcward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcward/subscriptions","organizations_url":"https://api.github.com/users/jcward/orgs","repos_url":"https://api.github.com/users/jcward/repos","events_url":"https://api.github.com/users/jcward/events{/privacy}","received_events_url":"https://api.github.com/users/jcward/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-09T05:06:59Z","updated_at":"2015-12-16T06:02:49Z","closed_at":null,"body":"```\r\n    var func:Void->Void = null;\r\n    func(); // Should throw, but hard crashes\r\n```\r\nResults in hard runtime crash:\r\n```\r\nCalled from Main::main Main.hx line 24\r\nError : Null Function Pointer\r\n```\r\nEven with [HaxeFoundation/hxcpp-debugger](https://github.com/HaxeFoundation/hxcpp-debugger) attached. Ideally the debugger would catch this."},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/comments/165007166","html_url":"https://github.com/HaxeFoundation/hxcpp/issues/338#issuecomment-165007166","issue_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/338","id":165007166,"user":{"login":"hughsando","id":1665494,"avatar_url":"https://avatars.githubusercontent.com/u/1665494?v=3","gravatar_id":"","url":"https://api.github.com/users/hughsando","html_url":"https://github.com/hughsando","followers_url":"https://api.github.com/users/hughsando/followers","following_url":"https://api.github.com/users/hughsando/following{/other_user}","gists_url":"https://api.github.com/users/hughsando/gists{/gist_id}","starred_url":"https://api.github.com/users/hughsando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughsando/subscriptions","organizations_url":"https://api.github.com/users/hughsando/orgs","repos_url":"https://api.github.com/users/hughsando/repos","events_url":"https://api.github.com/users/hughsando/events{/privacy}","received_events_url":"https://api.github.com/users/hughsando/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T06:02:49Z","updated_at":"2015-12-16T06:02:49Z","body":"This is thrown like a \"normal\" exception, which can be caught:\r\n```\r\n    try\r\n    {\r\n       var func:Dynamic = null;\r\n       func(1);\r\n    }\r\n    catch(e:Dynamic)\r\n    {\r\n      trace(\"Error \" + e);\r\n    }\r\n```\r\nCan't remember the exact reasoning, but this is how neko works.\r\nI will put in a special hook for the debugger so it can stop in this case."}}