{"action":"created","issue":{"url":"https://api.github.com/repos/leezer3/OpenBVE/issues/44","repository_url":"https://api.github.com/repos/leezer3/OpenBVE","labels_url":"https://api.github.com/repos/leezer3/OpenBVE/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/leezer3/OpenBVE/issues/44/comments","events_url":"https://api.github.com/repos/leezer3/OpenBVE/issues/44/events","html_url":"https://github.com/leezer3/OpenBVE/pull/44","id":139728753,"number":44,"title":"Fix load error deadlock","user":{"login":"JakubVanek","id":6003171,"avatar_url":"https://avatars.githubusercontent.com/u/6003171?v=3","gravatar_id":"","url":"https://api.github.com/users/JakubVanek","html_url":"https://github.com/JakubVanek","followers_url":"https://api.github.com/users/JakubVanek/followers","following_url":"https://api.github.com/users/JakubVanek/following{/other_user}","gists_url":"https://api.github.com/users/JakubVanek/gists{/gist_id}","starred_url":"https://api.github.com/users/JakubVanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakubVanek/subscriptions","organizations_url":"https://api.github.com/users/JakubVanek/orgs","repos_url":"https://api.github.com/users/JakubVanek/repos","events_url":"https://api.github.com/users/JakubVanek/events{/privacy}","received_events_url":"https://api.github.com/users/JakubVanek/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-09T23:03:06Z","updated_at":"2016-03-09T23:54:17Z","closed_at":"2016-03-09T23:36:36Z","pull_request":{"url":"https://api.github.com/repos/leezer3/OpenBVE/pulls/44","html_url":"https://github.com/leezer3/OpenBVE/pull/44","diff_url":"https://github.com/leezer3/OpenBVE/pull/44.diff","patch_url":"https://github.com/leezer3/OpenBVE/pull/44.patch"},"body":"How to reproduce bug: throw exception inside LoadEverythingThreaded\r\nWhat happens during the bug: Loading.Cancel becomes true, LoadingScreenLoop ends, but the window **and it's loop** are still there. Loop is generating ~85% CPU on my dualcore Intel P8600.\r\nWhat is causing the deadlock: Well, technically, it might not be a deadlock but it looks it is. Draw() is returning immediately because firstFrame is the wrong value because Loading.Complete is false. The CPU load is just Update().\r\nWhat this fix does: When Loading.Cancel becomes true, LoadingScreenLoops calls Close() on the window. This fixes the deadlock.\r\nPS: do you know where to find trainscript train plugin? OdakyUfan's web is down and google didn't find anything useful at the first glance. Alstom Metropolis requires it and I don't have it, so it throws an exception."},"comment":{"url":"https://api.github.com/repos/leezer3/OpenBVE/issues/comments/194572233","html_url":"https://github.com/leezer3/OpenBVE/pull/44#issuecomment-194572233","issue_url":"https://api.github.com/repos/leezer3/OpenBVE/issues/44","id":194572233,"user":{"login":"leezer3","id":7688245,"avatar_url":"https://avatars.githubusercontent.com/u/7688245?v=3","gravatar_id":"","url":"https://api.github.com/users/leezer3","html_url":"https://github.com/leezer3","followers_url":"https://api.github.com/users/leezer3/followers","following_url":"https://api.github.com/users/leezer3/following{/other_user}","gists_url":"https://api.github.com/users/leezer3/gists{/gist_id}","starred_url":"https://api.github.com/users/leezer3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leezer3/subscriptions","organizations_url":"https://api.github.com/users/leezer3/orgs","repos_url":"https://api.github.com/users/leezer3/repos","events_url":"https://api.github.com/users/leezer3/events{/privacy}","received_events_url":"https://api.github.com/users/leezer3/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T23:54:17Z","updated_at":"2016-03-09T23:54:17Z","body":"No problem.\r\n\r\nAnother thing on my list of things to twiddle with is to provide a central plugin database, where trains can requests a Plugin XXX, version 1.0 or greater etc.\r\nI've also got half a thought to a add a subset of BVEC_ATS to the main source, and automatically try upgrading OS_ATS based trains on non-Windows architecture, as AFAIK it now actually supports **all** features of that automatically.\r\nDon't really want to start including too much into the main tree though....."}}