0

Using CefSharp version 55 in a Winforms applications. My application has a tabbed interface (using a Telerik RadDock), where each browser instance opens in a different tab. Randomly, when closing tabs, I'll get a memory access violation from CEF that crashes the application. Any ideas on what could be causing it? It doesn't happen consistently. It seems more likely to happen on very old computers, if that helps, but we haven't been able to narrow it down to a specific processor or RAM configuration. Just that older PCs are more likely to generate the error than newer ones.

There are three relevant messages generated in the error log when this occurs:

Error 1 (Level: Error, Source: .NET Runtime):

Application: MyApplication
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 72433A3A
Stack:

(Yes, Stack is blank)

Error 2 (Level: Error, Source: Application Error):

Faulting application name: MyApplication, version: 3.0.1.1, time stamp: 0x5902247a
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005

Error 3 (Level: Information, Source: Windows Error Reporting):

Fault bucket 50, type 5
Event Name: BEX
Response: Not available
Cab Id: 0`

We're not doing anything unusual when closing the tab. No special code, just the built in tab closing routine with a call to browser.Dispose() in the designer of the user control that hosts the browser instance.

Protected Overrides Sub Dispose(ByVal disposing As Boolean)
    Try
        If disposing Then
            Browser.Dispose()
            If components IsNot Nothing Then
                components.Dispose()
            End If
        End If
    Finally
        MyBase.Dispose(disposing)
    End Try
End Sub
Michael
  • 1,036
  • 1
  • 11
  • 22
  • This error can stem from many reasons; corrupt registry, virus, RAM, DEP (Data Execution Prevention), printer drivers, video drivers etc... Also in your example from above, you are missing the `catch` statement. You need to add that so if an exception is thrown you at least have the information, right now you do not. Also why are you `Disposing` the browser from there, what is that particular reason? – Trevor Apr 28 '17 at 14:38
  • @Zaggler Thanks for the comment. I can add a catch in there - the designer's dispose method doesn't have one by default, which is why there is none there. As for disposal, that seemed the best place, so that no matter how the tab closes (it can be closed in a few different ways), it always gets called. Is there a reason not to put it there? – Michael Apr 28 '17 at 15:42
  • `53.0.0` is no longer supported with the latest being `57.0.0`, are you still getting this error with the latest version? – TEK Apr 30 '17 at 11:29
  • @TEK Sorry, I meant 55, not 53. I can give 57 a shot, but looking at the release notes, I'm not seeing anything that would address it. – Michael Apr 30 '17 at 16:49

0 Answers0