cefsharp / CefSharp

.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework
http://cefsharp.github.io/
Other
9.87k stars 2.92k forks source link

AccessViolationException while taking a screenshot #2308

Closed marci4 closed 6 years ago

marci4 commented 6 years ago
amaitland commented 6 years ago

As part of #2237 the way rendering for the OffScreen and WPF projects is done has been rewritten, I've run a slightly modified version of your code (OnPaint event is now Paint, there is now a virtual OnPaint method which is more consistent with the other projects). I changed the counter to 100 and it ran through without exception.

The main difference is that the buffer is stored as a byte[] now, rather than a Bitmap, and a Bitmap is only created upon request, this should improve performance and actually greatly simplifies the code.

amaitland commented 6 years ago

Closing this as I'm not unable to reproduce with master, you can try one of the CI builds listed at https://github.com/cefsharp/CefSharp#releases-1 to try it out ASAP.

Will likely be some more changes as part of https://github.com/cefsharp/CefSharp/issues/2237 so subscribe to that issue to be notified of updates.

gfox1984 commented 6 years ago

Sorry to ask, but I'm having the same problem (see closed duplicate above). I'm not sure what you did to fix the problem? Do we have to wait for version 65?

gfox1984 commented 6 years ago

OK I tested with "65.0.0-pre01" and I confirm the exception is gone, without requiring any change to my code.