{"action":"created","issue":{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/419","repository_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor","labels_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/419/labels{/name}","comments_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/419/comments","events_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/419/events","html_url":"https://github.com/JimBobSquarePants/ImageProcessor/issues/419","id":163052710,"number":419,"title":"Heap Corruption in 2.4.2","user":{"login":"crohkohl","id":6941505,"avatar_url":"https://avatars.githubusercontent.com/u/6941505?v=3","gravatar_id":"","url":"https://api.github.com/users/crohkohl","html_url":"https://github.com/crohkohl","followers_url":"https://api.github.com/users/crohkohl/followers","following_url":"https://api.github.com/users/crohkohl/following{/other_user}","gists_url":"https://api.github.com/users/crohkohl/gists{/gist_id}","starred_url":"https://api.github.com/users/crohkohl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crohkohl/subscriptions","organizations_url":"https://api.github.com/users/crohkohl/orgs","repos_url":"https://api.github.com/users/crohkohl/repos","events_url":"https://api.github.com/users/crohkohl/events{/privacy}","received_events_url":"https://api.github.com/users/crohkohl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/labels/framework","name":"framework","color":"682079"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-06-29T23:50:01Z","updated_at":"2016-07-02T18:27:38Z","closed_at":null,"body":"I run the following code repeatedly very often:\r\n\r\n```c#\r\nusing (ImageFactory imageFactory = new ImageFactory(preserveExifData: false))\r\n{\r\n    var request = WebRequest.Create(img.url);\r\n\r\n    using (var response = request.GetResponse())\r\n    using (var stream = response.GetResponseStream())\r\n    {\r\n\r\n        // Load, resize, set the format and quality and save an image.\r\n        imageFactory.Load(stream);\r\n\r\n        imageFactory.Format(new JpegFormat() { Quality = 70 }).Resize(new ResizeLayer(new System.Drawing.Size(250, 250), ResizeMode.Crop, AnchorPosition.Center, true));\r\n        imageFactory.Save(fnameSmall);\r\n\r\n        imageFactory.Reset();\r\n\r\n        imageFactory.Format(new JpegFormat() { Quality = 70 }).Resize(new ResizeLayer(new System.Drawing.Size(600, 400), ResizeMode.Crop, AnchorPosition.Center, true));\r\n        imageFactory.Save(fnameLarge);\r\n    }\r\n}\r\n```\r\n\r\nWith the nuget package 2.4.1 everything works fine.\r\nAfter an update to version 2.4.2 running the same code results in a heap corruption after some time.\r\n\r\nThere must have been some change between the two versions causing this behaviour.\r\n"},"comment":{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/comments/230115521","html_url":"https://github.com/JimBobSquarePants/ImageProcessor/issues/419#issuecomment-230115521","issue_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/419","id":230115521,"user":{"login":"crohkohl","id":6941505,"avatar_url":"https://avatars.githubusercontent.com/u/6941505?v=3","gravatar_id":"","url":"https://api.github.com/users/crohkohl","html_url":"https://github.com/crohkohl","followers_url":"https://api.github.com/users/crohkohl/followers","following_url":"https://api.github.com/users/crohkohl/following{/other_user}","gists_url":"https://api.github.com/users/crohkohl/gists{/gist_id}","starred_url":"https://api.github.com/users/crohkohl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crohkohl/subscriptions","organizations_url":"https://api.github.com/users/crohkohl/orgs","repos_url":"https://api.github.com/users/crohkohl/repos","events_url":"https://api.github.com/users/crohkohl/events{/privacy}","received_events_url":"https://api.github.com/users/crohkohl/received_events","type":"User","site_admin":false},"created_at":"2016-07-02T18:27:38Z","updated_at":"2016-07-02T18:27:38Z","body":"It is a standard heap corruption - mostly difficult to debug due to some\ninvalid memory accesses.\nMaybe there is a problem with thread-safety? I run my code in\nParallel.ForEach(); statement?\n\n\n\n2016-07-02 17:43 GMT+02:00 Dirk Lemstra <notifications@github.com>:\n\n> Maybe this is related to the PixelAccessor you introduced in the last\n> version?\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/JimBobSquarePants/ImageProcessor/issues/419#issuecomment-230107926>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe/AGnrQUfeOSAmTqZBmsVVX8M0CJdDRfo9ks5qRocugaJpZM4JBrZe>\n> .\n>\n"}}
{"actor":{"display_login":"crohkohl"}}