Welcome Guest Search | Active Topics | Sign In | Register

Exception thrown when calling WebBrowser.WebView.GetHtml Options
Brian
Posted: Wednesday, March 19, 2014 10:44:03 AM
Rank: Newbie
Groups: Member

Joined: 2/3/2014
Posts: 3
Please help. An exception is being thrown when calling GetHtml for a web page.
This only happens on certain web pages (or could be memory leak as it only happens after numerous page loads and GetHtml calls).
Also FYI, calling GetHtml after WebBrowserLoadChanged event.

System.ArgumentException was unhandled
Message=The output char buffer is too small to contain the decoded characters, encoding 'Unicode' fallback 'System.Text.DecoderReplacementFallback'.
Parameter name: chars
ParamName=chars
Source=mscorlib
StackTrace:
at System.Text.Encoding.ThrowCharsOverflow()
at System.Text.Encoding.ThrowCharsOverflow(DecoderNLS decoder, Boolean nothingDecoded)
at System.Text.UnicodeEncoding.GetChars(Byte* bytes, Int32 byteCount, Char* chars, Int32 charCount, DecoderNLS baseDecoder)
at System.Text.DecoderNLS.GetChars(Byte* bytes, Int32 byteCount, Char* chars, Int32 charCount, Boolean flush)
at System.Text.DecoderNLS.GetChars(Byte[] bytes, Int32 byteIndex, Int32 byteCount, Char[] chars, Int32 charIndex, Boolean flush)
at System.Text.DecoderNLS.GetChars(Byte[] bytes, Int32 byteIndex, Int32 byteCount, Char[] chars, Int32 charIndex)
at System.IO.BinaryReader.InternalReadOneChar()
at System.IO.BinaryReader.Read()
at System.IO.BinaryReader.ReadChar()
at EO.WebBrowser.Internal.at.c()
at EO.WebBrowser.WebView.a(af A_0, at A_1)
at EO.WebBrowser.Internal.af.a(WebView A_0, af A_1, Int32 A_2, IntPtr A_3, IntPtr A_4)
at EO.WebBrowser.WebView.b(IntPtr A_0, Int32 A_1, IntPtr A_2, IntPtr A_3, Boolean& A_4)
at EO.WebBrowser.Internal.l.a(IntPtr A_0, Int32 A_1, IntPtr A_2, IntPtr A_3)
at EO.WebBrowser.Internal.l.a(k& A_0)
at EO.WebBrowser.Internal.l.a(Boolean A_0)
at EO.WebBrowser.WebView.DoEvents()
at EO.WebBrowser.WebView.b(Boolean A_0)
at EO.WebBrowser.WebView.GetHtml()
eo_support
Posted: Wednesday, March 19, 2014 12:26:56 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

This appears to be a bug on our side that mixed up UTF8/Unicode encodings. We will update our code and provide you a new build to verify whether it fixes the problem. If that still does not work, then we will need a repro project from you so that we can debug it here.

Thanks!
Brian
Posted: Wednesday, March 19, 2014 1:25:32 PM
Rank: Newbie
Groups: Member

Joined: 2/3/2014
Posts: 3
Thanks for the quick response! Look forward to testing the update as soon as you can make available.
Brian
Posted: Friday, March 21, 2014 12:42:33 PM
Rank: Newbie
Groups: Member

Joined: 2/3/2014
Posts: 3
Any update on the ETA? Thanks.
eo_support
Posted: Friday, March 21, 2014 2:27:05 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

We already have the new build so most likely it will be posted later today.

Thanks!
eo_support
Posted: Friday, March 21, 2014 5:38:54 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

We have posted the update build. You can download it from our download page. Note that this build is not guaranteed to fix the problem for you since we have not been able to reproduce your exact problem. If it still does not fix the problem, you can try to isolate the problem into a test project and send us the test project. See here for test project guidelines:

http://www.essentialobjects.com/forum/postst8144_Test-project-guidelines.aspx

Once you have the test project, you can let us know and we will tell you where to send it.

Thanks!
Brian
Posted: Tuesday, March 25, 2014 1:38:56 PM
Rank: Newbie
Groups: Member

Joined: 2/3/2014
Posts: 3
So far testing looks good. Thanks!
eo_support
Posted: Tuesday, March 25, 2014 2:02:05 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Glad to hear that! Please feel free to let us know if there is anything else.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.