0

I have a simple application using CEFSharp as a webbrowser.

The application works great without any issues on the development PC and a few doczen other PC's is reported to work fine.

However, there is 1-2 users out there with a Windows 10 (64bit) machine where the program crashes on startup without an error message before even showing the form. On other Windows 10 machines it runs just fine.

I tried to read a lot on the net and tried many things in an attempt to fix this, but I am clueless now.

The user has provided me with a Windows Eventlog screenshot from the crash:

Errorlog Screenshot

Looks like it's a file not found exception in the constructor before creating the form? (not really familiar with this .ctor)

The only file that is loaded is the CEF Chromium browser and all required files are supplied with my installer so I have no clue what exactly is creating this problem.

I am only using this code: (it's a default sample code of the CefSharp project)

Private WithEvents browser As ChromiumWebBrowser

    Public Sub New()
        InitializeComponent()

        Dim settings As New CefSettings()
        CefSharp.Cef.Initialize(settings)

        browser = New ChromiumWebBrowser("http://www.google.com") With {
            .Dock = DockStyle.Fill
        }
        panBrowser.Controls.Add(browser)

    End Sub

I already tried to add an exception handling to the constructor (based on some recommendations in another forum) to fire a messagebox with the error, but that error event did not fire.

And why does it happen only to this PC and not to most others? Why does the error log show Framework 4.03 as version? Is it OK? (my CefSharp requires and is compiled for 4.61 and the PC has 4.7 installed)

Anything else I could check or you would recommend? Unfortunately I have no phisical access to this problematic PC, so I can only do things remotely.

Thanks for your help.

Visual Vincent
  • 18,045
  • 5
  • 28
  • 75
Oscar Diez
  • 83
  • 1
  • 11
  • What is error above it (an Application Error)? It may also have something to do with anti-virus, does the application launch normally with the anti-virus disabled? – Ron Beyer Apr 06 '18 at 20:15
  • 1
    It is most likely the DLL that is missing. You could try adding an event handler to the global [**`UnhandledException` event**](https://msdn.microsoft.com/en-us/library/microsoft.visualbasic.applicationservices.windowsformsapplicationbase.unhandledexception(v=vs.100).aspx). That way you can catch all unhandled exceptions and get the information you need. See: [**How to: Handle Application Events (Visual Basic)**](https://msdn.microsoft.com/en-us/library/f2bys999(v=vs.100).aspx) – Visual Vincent Apr 06 '18 at 20:18
  • 1
    Ensure that the PC has all the proper .Net Frameworks installed. Also in Visual Studio, on your MSI or installer file, ensure that all the detected dependencies have the following parameters set "exclude=false", and "vital=true". Then in your project, drop down the References tree and make sure all the dll's are "Copy local=true". Also ensure the PC that isn't working has the right architecture (32/64 bit). Sometimes the DLLs don't get copied to the installer. Just a thought, no guarantees. – Smitty-Werben-Jager-Manjenson Apr 06 '18 at 20:21
  • @RonBeyer : The error above is a more generic error that is logged when an application crashes. It contains less useful information for a .NET developer than what the error below it does (the one he's currently viewing). – Visual Vincent Apr 06 '18 at 20:24
  • 1
    https://github.com/cefsharp/CefSharp/blob/cefsharp/63/NuGet/Readme.txt#L28 – amaitland Apr 06 '18 at 21:14
  • @amaitland: I think I will check if the PC has `Visual C++ 2013` installed (thanks amaitland for the hint). I was only focussing on .NET being installed. – Oscar Diez Apr 07 '18 at 07:47
  • Glad you found a solution! However please write it in an answer instead and accept it when time allows. Questions aren't meant to be edited to indicate that the problem has been solved. – Visual Vincent Apr 07 '18 at 14:38
  • Please don't rollback to your edit again. Questions aren't supposed to contain a solution, answers are. Please see: [Is it OK to add \[Solved\] to the title of a question?](https://meta.stackexchange.com/a/116105) – Visual Vincent Apr 07 '18 at 15:22

2 Answers2

1

Answer from the OP's edit:

The missing Microsoft Visual C++ 2013 x32 (required for CefSharp) was the problem. Thanks for all suggestions pointing me to this solution.

Visual Vincent
  • 18,045
  • 5
  • 28
  • 75
0

Check whether .net Version You have used is installed or not.? if it is not then install corresponding .net framework as per your Applications Specifications...

Prakash
  • 100
  • 10