{"action":"created","issue":{"url":"https://api.github.com/repos/bmx-ng/brl.mod/issues/43","repository_url":"https://api.github.com/repos/bmx-ng/brl.mod","labels_url":"https://api.github.com/repos/bmx-ng/brl.mod/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/bmx-ng/brl.mod/issues/43/comments","events_url":"https://api.github.com/repos/bmx-ng/brl.mod/issues/43/events","html_url":"https://github.com/bmx-ng/brl.mod/issues/43","id":193340773,"number":43,"title":"SetGraphics CanvasGraphics() causes hang","user":{"login":"noroads2015","id":19446592,"avatar_url":"https://avatars.githubusercontent.com/u/19446592?v=3","gravatar_id":"","url":"https://api.github.com/users/noroads2015","html_url":"https://github.com/noroads2015","followers_url":"https://api.github.com/users/noroads2015/followers","following_url":"https://api.github.com/users/noroads2015/following{/other_user}","gists_url":"https://api.github.com/users/noroads2015/gists{/gist_id}","starred_url":"https://api.github.com/users/noroads2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noroads2015/subscriptions","organizations_url":"https://api.github.com/users/noroads2015/orgs","repos_url":"https://api.github.com/users/noroads2015/repos","events_url":"https://api.github.com/users/noroads2015/events{/privacy}","received_events_url":"https://api.github.com/users/noroads2015/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-12-04T09:15:29Z","updated_at":"2016-12-13T09:45:57Z","closed_at":null,"body":"Program below compiles without error.  Window opens, but hangs.  The line SetGraphics CanvasGraphics(Canvas) is highlighted.  Have all updated bcc, bmx, and modules\r\n\r\n```blitzmax\r\nSuperStrict\r\nImport maxgui.drivers\r\n\r\nGlobal Window:TGadget = CreateWindow(\"test\",10,10,640,400)\r\nGlobal Canvas:TGadget = CreateCanvas(0,0,ClientWidth(Window),ClientHeight(Window),Window)\r\n\r\nGlobal Timer:TTimer = CreateTimer(30)\r\n\r\nGlobal x:Int = 0\r\n\r\nAddHook EmitEventHook, EventHook\r\n\r\nRepeat\r\n\tWaitEvent()\r\nForever\r\n\r\nFunction EventHook:Object(id:Int,data:Object,context:Object)\r\n\tLocal event:TEvent = TEvent(data)\r\n\t\r\n\tSelect event.id\r\n\t\tCase EVENT_WINDOWCLOSE, EVENT_APPTERMINATE\r\n\t\t\tEnd\r\n\t\tCase EVENT_TIMERTICK\r\n\t\t\tx :+ 1\r\n\t\t\tIf x > 799 Then x = 0\r\n\t\t\tRedrawGadget Canvas\r\n\t\tCase EVENT_GADGETPAINT\r\n\t\t\tSetGraphics CanvasGraphics(Canvas)\r\n\t\t\tCls\r\n\t\t\tDrawOval x-5,100,10,10\r\n\t\t\tFlip\r\n\tEnd Select\r\nEnd Function\r\n\t\t\t\r\n```"},"comment":{"url":"https://api.github.com/repos/bmx-ng/brl.mod/issues/comments/266693003","html_url":"https://github.com/bmx-ng/brl.mod/issues/43#issuecomment-266693003","issue_url":"https://api.github.com/repos/bmx-ng/brl.mod/issues/43","id":266693003,"user":{"login":"GWRon","id":2625226,"avatar_url":"https://avatars.githubusercontent.com/u/2625226?v=3","gravatar_id":"","url":"https://api.github.com/users/GWRon","html_url":"https://github.com/GWRon","followers_url":"https://api.github.com/users/GWRon/followers","following_url":"https://api.github.com/users/GWRon/following{/other_user}","gists_url":"https://api.github.com/users/GWRon/gists{/gist_id}","starred_url":"https://api.github.com/users/GWRon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GWRon/subscriptions","organizations_url":"https://api.github.com/users/GWRon/orgs","repos_url":"https://api.github.com/users/GWRon/repos","events_url":"https://api.github.com/users/GWRon/events{/privacy}","received_events_url":"https://api.github.com/users/GWRon/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T09:45:57Z","updated_at":"2016-12-13T09:45:57Z","body":"I added a debugstop before \"SetHandle\" and then stepped \"into\" the function.\r\n\r\nIt iterated over win32maxguiex.bmx' `ClassWndProc`,`WndProc` and so on.\r\n\r\nThe for me __interesting part__ was: the \"msg:UInt\" changed over the iterations... it started with 31 ... went to 8 somewhen. It is interesting, because I do not see any edits to `msg`.\r\n\r\nHere is the calling order:\r\nma2d.bmx: Validate() -> SetHandle()\r\nSetHandle() -> win32maxguiex.bmx\r\n\r\nClassWndProc(..., 31, ...)  (skipping all cases just fetching owner)\r\n-> WndProc(..., 31, ...)\r\nWndProc(..., 31, ...) (skipping cases)\r\n-> Super.WndProc(..., 31, ...)\r\nSuper.WndProc(..., 31, ...) (skipping cases and if)\r\n-> return DefWindowProcW(..., 31, ...)\r\n\r\nNow this directly leads to `ClassWndProc` instead of `DefWindowProcW` and now the `msg` got __8__ instead of __31__\r\n\r\nDunno if this is \"OK\", or if this is flawed?\r\n\r\n\r\n"}}
{"actor":{"display_login":"GWRon"}}