{"action":"created","issue":{"url":"https://api.github.com/repos/opentk/opentk/issues/376","repository_url":"https://api.github.com/repos/opentk/opentk","labels_url":"https://api.github.com/repos/opentk/opentk/issues/376/labels{/name}","comments_url":"https://api.github.com/repos/opentk/opentk/issues/376/comments","events_url":"https://api.github.com/repos/opentk/opentk/issues/376/events","html_url":"https://github.com/opentk/opentk/issues/376","id":146448268,"number":376,"title":"Mono crashes when creating new GameWindow on Windows.","user":{"login":"tzachshabtay","id":1819001,"avatar_url":"https://avatars.githubusercontent.com/u/1819001?v=3","gravatar_id":"","url":"https://api.github.com/users/tzachshabtay","html_url":"https://github.com/tzachshabtay","followers_url":"https://api.github.com/users/tzachshabtay/followers","following_url":"https://api.github.com/users/tzachshabtay/following{/other_user}","gists_url":"https://api.github.com/users/tzachshabtay/gists{/gist_id}","starred_url":"https://api.github.com/users/tzachshabtay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tzachshabtay/subscriptions","organizations_url":"https://api.github.com/users/tzachshabtay/orgs","repos_url":"https://api.github.com/users/tzachshabtay/repos","events_url":"https://api.github.com/users/tzachshabtay/events{/privacy}","received_events_url":"https://api.github.com/users/tzachshabtay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-06T22:01:20Z","updated_at":"2016-04-21T15:23:52Z","closed_at":null,"body":"Hi, when I create a GameWindow on Windows, mono crashes. The error:\r\n\r\nUnhandled exception at 0x7752F70B (ntdll.dll) in mono.exe: 0xC0000374: A heap has been corrupted (parameters: 0x77564270).\r\n\r\nI'm using Mono 4.2.3 and OpenTK-1.1-4c.\r\nReproduced on two different machines, one on Windows7 and the other on Windows10 (works on dotnet, but if I compile with mono it crashes).\r\nI debugged into OpenTK and it crashes in WinDisplayDevice, line 127, on the call to Functions.EnumDisplaySettingsEx(dev1.DeviceName.ToString(), DisplayModeSettingsEnum.CurrentSettings, monitor_mode, 0)\r\n\r\nThe code to reproduce is as simple as can be:\r\npublic static void Main (string[] args)\r\n\t\t{\r\n\t\t\tusing (GameWindow window = new GameWindow ()) {}\r\n\t\t}\r\n"},"comment":{"url":"https://api.github.com/repos/opentk/opentk/issues/comments/212970487","html_url":"https://github.com/opentk/opentk/issues/376#issuecomment-212970487","issue_url":"https://api.github.com/repos/opentk/opentk/issues/376","id":212970487,"user":{"login":"cra0zy","id":6773302,"avatar_url":"https://avatars.githubusercontent.com/u/6773302?v=3","gravatar_id":"","url":"https://api.github.com/users/cra0zy","html_url":"https://github.com/cra0zy","followers_url":"https://api.github.com/users/cra0zy/followers","following_url":"https://api.github.com/users/cra0zy/following{/other_user}","gists_url":"https://api.github.com/users/cra0zy/gists{/gist_id}","starred_url":"https://api.github.com/users/cra0zy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cra0zy/subscriptions","organizations_url":"https://api.github.com/users/cra0zy/orgs","repos_url":"https://api.github.com/users/cra0zy/repos","events_url":"https://api.github.com/users/cra0zy/events{/privacy}","received_events_url":"https://api.github.com/users/cra0zy/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T15:23:52Z","updated_at":"2016-04-21T15:23:52Z","body":"The crash might be cause by the fact that mono on Windows is 32 bit, while it's trying to load 64 bit library.\r\n\r\n> To my understanding I don't need to put OpenTK.dll.config in the output directory for Windows (based on http://www.opentk.com/doc/chapter/1/windows, it's only required for osx and linux), am I wrong?\r\n\r\nYou are right.\r\n\r\n> Since you're using Xamarin w/ Mono runtime, it might be necessary\r\n\r\nNope, .dll.config files are used to overwrite constants, and are usually used for redirecting Windows libs to Linux/Mac libs. In out case it has no use on Windows."}}