{"action":"created","issue":{"url":"https://api.github.com/repos/bkaradzic/bgfx/issues/268","labels_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/268/labels{/name}","comments_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/268/comments","events_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/268/events","html_url":"https://github.com/bkaradzic/bgfx/issues/268","id":58911600,"number":268,"title":"Parameter checking","user":{"login":"attilaz","id":4198194,"avatar_url":"https://avatars.githubusercontent.com/u/4198194?v=3","gravatar_id":"","url":"https://api.github.com/users/attilaz","html_url":"https://github.com/attilaz","followers_url":"https://api.github.com/users/attilaz/followers","following_url":"https://api.github.com/users/attilaz/following{/other_user}","gists_url":"https://api.github.com/users/attilaz/gists{/gist_id}","starred_url":"https://api.github.com/users/attilaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attilaz/subscriptions","organizations_url":"https://api.github.com/users/attilaz/orgs","repos_url":"https://api.github.com/users/attilaz/repos","events_url":"https://api.github.com/users/attilaz/events{/privacy}","received_events_url":"https://api.github.com/users/attilaz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-25T14:47:07Z","updated_at":"2015-02-25T18:22:25Z","closed_at":null,"body":"More parameter checking could help to detect problems earlier ( sometimes these errors crash inside gl driver or deep in bgfx).\r\nBX_CHECK asserts could help to catch them when calling the API:\r\n\r\n- check for valid handles in update/destroy functions ( static-dynamic indexbuffer/vertexbuffer, shader/program, texture )\r\n- allocation of too large dynamic vb/ib (larger than BGFX_CONFIG_DYNAMIC_VERTEX_BUFFER_SIZE / BGFX_CONFIG_DYNAMIC_INDEX_BUFFER_SIZE)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bkaradzic/bgfx/issues/comments/76022995","html_url":"https://github.com/bkaradzic/bgfx/issues/268#issuecomment-76022995","issue_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/268","id":76022995,"user":{"login":"attilaz","id":4198194,"avatar_url":"https://avatars.githubusercontent.com/u/4198194?v=3","gravatar_id":"","url":"https://api.github.com/users/attilaz","html_url":"https://github.com/attilaz","followers_url":"https://api.github.com/users/attilaz/followers","following_url":"https://api.github.com/users/attilaz/following{/other_user}","gists_url":"https://api.github.com/users/attilaz/gists{/gist_id}","starred_url":"https://api.github.com/users/attilaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attilaz/subscriptions","organizations_url":"https://api.github.com/users/attilaz/orgs","repos_url":"https://api.github.com/users/attilaz/repos","events_url":"https://api.github.com/users/attilaz/events{/privacy}","received_events_url":"https://api.github.com/users/attilaz/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T18:22:25Z","updated_at":"2015-02-25T18:22:25Z","body":"I allocated a too large dynamic vb(larger than BGFX_CONFIG_DYNAMIC_VERTEX_BUFFER_SIZE). Returned id was invalid_handle, but there was no assert.\r\nI used this vb handle for rendering. The app crashed in glDraw** in RendererContextGL::submit.\r\nThe crash was somewhat random. Possibly using some uninitalized data because using out of bound index here:\r\nhttps://github.com/bkaradzic/bgfx/blob/master/src/bgfx_p.h#L3179"}}