Replies: 6 comments 22 replies
-
Converting to discussion as it's not clear this is a bug. You shouldn't rely on Thread.Sleep for loading of a website. You can use LoadUrlAsync to wait for the website to load. GetSourceAsync is an asynchronous operation, Continue With or await should be used rather than blocking. You can add a breakpoint at https://github.com/cefsharp/CefSharp/blob/cefsharp/94/CefSharp.Core.Runtime/Internals/CefStringVisitorAdapter.h#L33 debug the underlying exception. |
Beta Was this translation helpful? Give feedback.
-
I tried but fail to use the WinformMinimum to trigger the exception. By removing codes of my app, I have got a very simple code that will trigger the exeption. But I cannot upload a attachment by dragging & dropping here. So I copy all the code below. |
Beta Was this translation helpful? Give feedback.
-
further info: |
Beta Was this translation helpful? Give feedback.
-
More info: |
Beta Was this translation helpful? Give feedback.
-
I can confirm that the problem exists. |
Beta Was this translation helpful? Give feedback.
-
Changes were included in the |
Beta Was this translation helpful? Give feedback.
-
What version of the product are you using?
94.4.2+g6a963ca+chromium-94.0.4606.61
What architecture x86 or x64?
x64 - note: I also tried x86, and a similar error occured
What version of .Net?
.Net 4.6
On what operating system?
Win10
Are you using
WinForms
,WPF
orOffScreen
?WinForms
What steps will reproduce the problem?
When executing following codes (for scrawling webpages) on a particular URL, an error occurs:
Error Messages are copied and translated into English (marked with **) below:
System.AccessViolationException
HResult=0x80004003
Message= ** try to read or write protected memory,....
Source=mscorlib
StackTrace:
at System.String.wcslen(Char* ptr)
at System.String.CtorCharPtr(Char* ptr)
at CefSharp.Internals.CefStringVisitorAdapter.Visit(CefStringVisitorAdapter* , CefStringBase* string) in C:\projects\cefsharp\packages\cef.sdk.93.1.14\CEF\include\internal\cef_string_wrappers.h:line 447
** this exception is initiated at the following calling stack :
string.wcslen(char*)
string.CtorCharPtr(char*)
CefSharp::Internals::CefStringVisitorAdapter::Visit(CefStringBase&) (in cef_string_wrappers.h)
Beta Was this translation helpful? Give feedback.
All reactions