{"action":"opened","issue":{"url":"https://api.github.com/repos/MathewSachin/Screna/issues/12","repository_url":"https://api.github.com/repos/MathewSachin/Screna","labels_url":"https://api.github.com/repos/MathewSachin/Screna/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/MathewSachin/Screna/issues/12/comments","events_url":"https://api.github.com/repos/MathewSachin/Screna/issues/12/events","html_url":"https://github.com/MathewSachin/Screna/issues/12","id":183062703,"number":12,"title":"\"Parameter not valid\" exception randomly occuring","user":{"login":"Loydik","id":6330733,"avatar_url":"https://avatars.githubusercontent.com/u/6330733?v=3","gravatar_id":"","url":"https://api.github.com/users/Loydik","html_url":"https://github.com/Loydik","followers_url":"https://api.github.com/users/Loydik/followers","following_url":"https://api.github.com/users/Loydik/following{/other_user}","gists_url":"https://api.github.com/users/Loydik/gists{/gist_id}","starred_url":"https://api.github.com/users/Loydik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Loydik/subscriptions","organizations_url":"https://api.github.com/users/Loydik/orgs","repos_url":"https://api.github.com/users/Loydik/repos","events_url":"https://api.github.com/users/Loydik/events{/privacy}","received_events_url":"https://api.github.com/users/Loydik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-14T14:21:07Z","updated_at":"2016-10-14T14:21:07Z","closed_at":null,"body":"Hi, I am trying to use your framework for recording automated tests. Unfortunately it did not always work correctly - running and recording the same test produced different outcomes at random. For example, sometime the recording was complete, and at other times the video was only 10 seconds long (should be 30)\r\n\r\nI've debugged your source code an the problem seems to be at:\r\n\r\nRecorder.Record(), which catches exception \"Parameter not valid\" and stops the recording abruptly. Here is stacktrace:\r\n\r\n\r\n   at System.Drawing.Graphics.GetHdc()\r\n   at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation)\r\n   at System.Drawing.Graphics.CopyFromScreen(Point upperLeftSource, Point upperLeftDestination, Size blockRegionSize, CopyPixelOperation copyPixelOperation)\r\n   at Screna.ScreenShot.CaptureRegionManaged(Rectangle Region, Boolean IncludeCursor) in C:\\Users\\SG0222640\\Desktop\\Sample Projects\\Screna-master\\Screna-master\\src\\Core\\ScreenShot.cs:line 277\r\n   at Screna.ScreenShot.Capture(Rectangle Region, Boolean IncludeCursor, Boolean Managed) in C:\\Users\\SG0222640\\Desktop\\Sample Projects\\Screna-master\\Screna-master\\src\\Core\\ScreenShot.cs:line 297\r\n   at Screna.ScreenShot.Capture(Screen Screen, Boolean IncludeCursor, Boolean Managed) in C:\\Users\\SG0222640\\Desktop\\Sample Projects\\Screna-master\\Screna-master\\src\\Core\\ScreenShot.cs:line 47\r\n   at Screna.ScreenProvider.OnCapture(Graphics g) in C:\\Users\\SG0222640\\Desktop\\Sample Projects\\Screna-master\\Screna-master\\src\\Core\\ImageProviders\\ScreenProvider.cs:line 32\r\n   at Screna.ImageProviderBase.Capture() in C:\\Users\\SG0222640\\Desktop\\Sample Projects\\Screna-master\\Screna-master\\src\\Core\\ImageProviders\\ImageProviderBase.cs:line 36\r\n   at Screna.Recorder.Record() in C:\\Users\\SG0222640\\Desktop\\Sample Projects\\Screna-master\\Screna-master\\src\\Core\\Recorder\\Recorder.cs:line 148\r\n\r\n\r\nThis exception is caught here:\r\n\r\ncatch (Exception e)\r\n            {\r\n                Stop();\r\n\r\n                RaiseRecordingStopped(e);\r\n            }\r\n\r\nAnd the recording is stopped. Could you please look into it?"}}
{"actor":{"display_login":"Loydik"}}