|
Rank: Advanced Member Groups: Member
Joined: 1/12/2015 Posts: 81
|
Getting the error Failed to register DLL data on this code when I call the webView.Create
Code: Visual Basic.NET
pbWebControl.Parent.BeginInvoke(
Sub()
Dim intAttempts = 0
While True
Try
webView.Create(handle)
Exit Sub
Catch ex As Exception
intAttempts = intAttempts + 1
If intAttempts >= 20 Then
Throw
Else
Threading.Thread.Sleep(3000)
End If
End Try
End While
End Sub
)
Here's the Windows Error Reporting log: Quote:See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text ************** System.Exception: Failed to register DLL data. at EO.Internal.wulz.spax(Boolean& nml, wumc[] nmm, String nmn, String nmo) at EO.Internal.wulz.jwjm(wumc[] nmi, String nmj, String nmk) at EO.Internal.wuma.jwjm(String nrq, String nrr) at EO.Internal.vjed.akvw() at EO.Internal.vjed.uhcv.fbmx() at EO.Internal.wuhm.usyl(Action lun) at EO.Internal.vjed.ximp(WindowsIdentity fs) at EO.WebEngine.Engine.Start(WindowsIdentity user) at EO.WebEngine.Engine.Start() at EO.Internal.vjed.akvv() at EO.Internal.jphv..ctor(WebView d) at EO.WebBrowser.WebView.bgdj() at EO.WebBrowser.WebView.bgdj(IntPtr ff, Boolean fg) at EO.WebBrowser.WebView.Create(IntPtr hWnd) at Program.i_Utils.ExtendedWebView._Closure$__32-0._Lambda$__0() in D:\Data\DotNet Projects\Program\i_Utils.vb:line 2752
************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.7.3850.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
Program Assembly Version: 1.0.8199.25646 Win32 Version: 1.0 CodeBase: file:///C:/webs/Program/MyProgram.exe
Microsoft.VisualBasic Assembly Version: 10.0.0.0 Win32 Version: 14.7.3062.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
System Assembly Version: 4.0.0.0 Win32 Version: 4.7.3650.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.7.3835.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.7.3835.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.7.3062.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.7.3630.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.7.3062.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
System.Runtime.Remoting Assembly Version: 4.0.0.0 Win32 Version: 4.7.3062.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.7.3730.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
System.ServiceModel Assembly Version: 4.0.0.0 Win32 Version: 4.7.3620.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel/v4.0_4.0.0.0__b77a5c561934e089/System.ServiceModel.dll
EO.WebBrowser Assembly Version: 22.1.13.0 Win32 Version: 22.1.13.0 CodeBase: file:///C:/webs/Program/EO.WebBrowser.DLL
EO.WebEngine Assembly Version: 22.1.13.0 Win32 Version: 22.1.13.0 CodeBase: file:///C:/webs/Program/EO.WebEngine.DLL
EO.Base Assembly Version: 22.1.13.0 Win32 Version: 22.1.13.0 CodeBase: file:///C:/webs/Program/EO.Base.DLL
System.Numerics Assembly Version: 4.0.0.0 Win32 Version: 4.7.3062.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
System.Web Assembly Version: 4.0.0.0 Win32 Version: 4.7.3770.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
System.ServiceModel.Internals Assembly Version: 4.0.0.0 Win32 Version: 4.7.3620.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Internals/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Internals.dll
SMDiagnostics Assembly Version: 4.0.0.0 Win32 Version: 4.7.3620.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/SMDiagnostics/v4.0_4.0.0.0__b77a5c561934e089/SMDiagnostics.dll
System.ServiceModel.Channels Assembly Version: 4.0.0.0 Win32 Version: 4.7.3620.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Channels/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Channels.dll
System.ServiceModel.Web Assembly Version: 4.0.0.0 Win32 Version: 4.7.3062.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Web/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Web.dll
System.Runtime.Serialization Assembly Version: 4.0.0.0 Win32 Version: 4.7.3620.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
System.IdentityModel Assembly Version: 4.0.0.0 Win32 Version: 4.7.3620.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.IdentityModel/v4.0_4.0.0.0__b77a5c561934e089/System.IdentityModel.dll
Microsoft.GeneratedCode Assembly Version: 1.0.0.0 Win32 Version: 4.7.3062.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
System.Net.Http Assembly Version: 4.0.0.0 Win32 Version: 4.7.3062.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll
System.Deployment Assembly Version: 4.0.0.0 Win32 Version: 4.7.3062.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.
For example:
<configuration> <system.windows.forms jitDebugging="true" /> </configuration>
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
Do you get this problem every time or just some times?
You should not wrap Create inside a loop. If it fails then it would fail for a reason --- and you would need to find out that reason first instead of trying again.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 1/12/2015 Posts: 81
|
It happens occasionally. The reason I have it in a loop is that sometimes it does create the WebView successfully in a later iteration of the loop.
|
|
Rank: Advanced Member Groups: Member
Joined: 1/12/2015 Posts: 81
|
I think you are missing the point of my question. The create fails occasionally and when it does, the error is "Failed to register DLL data". Please can you assist in debugging this with the trace sent above, or provide more information as to what this error means and how to prevent this from happening.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, Please try two things: 1. Use the new build we sent to you. There was an issue that was fixed in build 2022.1.42 that could run into this issue after you starting/closing the engine multiple times; 2. There is in fact no need for you to stop the engine when you update Proxy. The following code:
Code: C#
engine.Options.Proxy = new_proxy;
Will automatically send the proxy settings to the browser engine and it will take effect for the next request. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 1/12/2015 Posts: 81
|
You had written back on this post that changing the proxy was asynchronous and there was no guarantee that the proxy would be implemented on the next request: https://www.essentialobjects.com/forum/postst11634_Proxy-is-not-working.aspxBut now you're saying it will. Did something change? If not, then how do I guarantee that the next request will be using the proxy? I don't mind loading a blank page beforehand if that's what's required.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
Yes. In the current build setting proxy is also asynchronous but it is sequenced together with loading the main request. Consider the following timeline:
1. Setting proxy P1; 2. Loading main request R1. Now R1 will use proxy P1; 3. Main request P1 may creates sub request (such as loading an image) S1; 4. Setting proxy P2; 5. Loading main request R2. Now R2 will use proxy P2; 6. As part of loading R2, R1 (if not finished) and all child requests for R1 (such as S1) will be cancelled;
During this sequence: 1. R1 will always uses proxy P1, R2 will always uses proxy P2; 2. S1 is not guaranteed to use P1 because it may run after step 4;
Additionally cache can complicated things further. However that does not particular has anything to do with proxy.
Hope this helps.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 1/12/2015 Posts: 81
|
So it seems from your sequence of events, that I can load about:blank between steps 3 and 4 in order to stop requests S1. This way none of S1 will run on P2. Is that correct?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
No. That's not correct. Loading about:blank will have the same effect as loading R2 in term of S1: both will try to cancel it asynchronous. Because this cancelation is asynchronous, there is no guarantee about which proxy it will use because it all depends on when the resource loader/cancelation kicks in.
|
|
Rank: Advanced Member Groups: Member
Joined: 1/12/2015 Posts: 81
|
Sorry. I just want to make sure that I'm understanding this correctly. You're saying that loading about:blank and R2 will have the same effect on S1 even though the about:blank request was made before setting the proxy to P2.
And is there any to wait for all the requests to finish loading/canceling?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
In practice you could be right 99.99% of the time but the only synchronization point is between updating the global proxy setting and start loading main resource. You could wait for the load to complete but that still only applies to the main resource. Sub resources loading/cancellation are completely asynchronous and when the main resource is cancelled, all sub resources are marked as cancelled, but could still have various associated background tasks queued at different places. Those tasks can run at a later time. They will eventually find out that the resource request is cancelled and die, but in theory that could happen after the proxy has already been changed, even though in practice it may rarely happen.
Thanks
|
|