-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.NullReferenceException Accessing Registered C# Object #1782
Comments
@JWallaceDev - issues are for problem reports and change requests only; please ask questions on Gitter. Suggest you register your objects before you add the CWB to your form. |
@JWallaceDev Have you tried opening the image you posted? It's too small for me to read, probably others as well. Ideally just post a plain text version.
No zip files please (quite clearly outlined in the issue template). https://github.com/cefsharp/CefSharp/blob/master/ISSUE_TEMPLATE.md#bug-report Based on the amount of information you've provided and no way to reproduce the problem there isn't much to go on here. You maybe experiencing something like #915 Personally I'd be migrating to the |
Appreciate the image is only just about legible but that's all I have from the client and I'm trying to keep hassling them down to a minimum. Zip was only way I could see for adding the log text file - sorry about that. Thank you for the suggestions, I will try them out and move over to Gitter if needed. |
Closing and moving to Gitter if needed. |
Just a courtesy message to let you know that changing the diagnostics app to be async has fixed the problem and we will be working to migrate our main app. |
We have a client experiencing a System.NullReferenceException:
This is isolated to 1 machine and isn't repeatable on any other machine at their company, or on any of our dev machines.
We are getting a bit stuck for ideas on possible causes and looking for some ideas to at least replicate the issue.
Based on the exception stack have you any suggestions?
It looks like the exception is occurring the first ever time the JS attempts to access a C# object registered via RegisterJsObject.
Currently suspect the way that the C# classes are registered and accessed.
A developer has created a demo app - which exhibits the same problem for the client.
This file contains the C# class being registered and the code to register it:
http://pastebin.com/s7HWZBBQ
And this contains the JavaScript accessing the C#:
http://pastebin.com/7LF54fFy
Build of branch 51.0.0
x64
Win7
WinForms
,WPF
orOffScreen
?WinForms
We are currently unable to reproduce the problem outside of a remote clients machine.
When they launch a demo app containing the code pasted above, the null reference exception occurs when trying to access the registered C# object. The exception can be seen in Dev Tools.
No exception and the embedded browser loads correctly.
No - with verbose logging on we get very similar/almost identical results to those on a machine where everything works.
I've attached the log anyway:
Cef
TestApp:No it doesn't.
The text was updated successfully, but these errors were encountered: