Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

GetDOMWindow hangs when called at some point when WebView.NewWindow is executing Options
Tymeware
Posted: Thursday, July 12, 2018 4:09:14 PM
Rank: Member
Groups: Member

Joined: 9/1/2015
Posts: 17
I have an app the scrapes a web page via a timer and calls GetDOMWindow every tick. It also launches other windows either manually or via the NewWindow event. I have found that if GetDOMWindow is called while code is running via NewWindow that GetDOMWindow call will freeze the application. This code worked in 15.3.1 but stopped working when I moved to 17.2.43 and it still has a problem in the current version 18.2.26. I have prepared a sample application that I'm uploading for you to try. It connects to my application so maybe there's a problem in my web portion that triggers it but that fact that it just hangs rather than failing is making my app unusable.
eo_support
Posted: Thursday, July 19, 2018 12:58:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 20,678
Hi,

Please remove Application.DoEvents() in your NewWindow event handler. This together with your timer causes a re-entry issue which caused the deadlock. Removing Application.DoEvents() should avoid this issue.

Thanks!
Tymeware
Posted: Thursday, July 19, 2018 1:55:56 PM
Rank: Member
Groups: Member

Joined: 9/1/2015
Posts: 17
I took out both instances of Application.DoEvents() is the sample app I provided for you and I'm still experiencing the issue. The first time I ran it , I was able to click one link in the related streams window but the second link caused the hang. Subsequent runs fail at the same places.
eo_support
Posted: Friday, July 20, 2018 9:25:51 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 20,678
Are you sure that you are using 18.2.26? We tested here with 18.2.26 and we are no longer able to reproduce the issue after removing Application.DoEvents.
Tymeware
Posted: Monday, July 23, 2018 1:25:59 PM
Rank: Member
Groups: Member

Joined: 9/1/2015
Posts: 17
Just doubled checked and it's using 18.2.26. I commented out both instances of DoEvents and still hanging every time.


eo_support
Posted: Monday, July 23, 2018 3:31:18 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 20,678
Can you capture the call stack of your main UI thread (the thread that calls GetDOMWindow) when it hangs?
Tymeware
Posted: Monday, July 23, 2018 4:59:41 PM
Rank: Member
Groups: Member

Joined: 9/1/2015
Posts: 17
[Managed to Native Transition]
EO.Base.dll!EO.Internal.aqt.a(System.IntPtr[] A_0, int A_1) Unknown
EO.Base.dll!EO.Base.WaitableTask.a(System.IntPtr[] A_0, int A_1) Unknown
EO.Base.dll!EO.Base.WaitableTask.a(EO.Base.WaitableTask[] A_0, System.IntPtr[] A_1, int A_2) Unknown
EO.Base.dll!EO.Base.WaitableTask.a(bool A_0, EO.Base.WaitableTask[] A_1, int A_2) Unknown
EO.Base.dll!EO.Base.WaitableTask.WaitOne(int timeout) Unknown
EO.WebBrowser.dll!EO.WebBrowser.WebView.a(EO.Internal.lz A_0, EO.Base.Action<EO.Internal.mw> A_1, bool A_2, bool A_3, string A_4) Unknown
EO.WebBrowser.dll!EO.WebBrowser.WebView.EvalScript(string code, string frameName, bool throwOnError) Unknown
EO.WebBrowser.dll!EO.WebBrowser.WebView.GetDOMWindow() Unknown
> GetDomWindowHang.exe!GetDomWindowHang.Form1.DoTask() Line 30 Basic
GetDomWindowHang.exe!GetDomWindowHang.Form2.Form2_Load(Object sender, System.EventArgs e) Line 20 Basic
System.Windows.Forms.dll!System.Windows.Forms.Form.OnLoad(System.EventArgs e) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Form.OnCreateControl() Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.CreateControl(bool fIgnoreVisible) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.CreateControl() Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WmShowWindow(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.ScrollableControl.WndProc(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Form.WmShowWindow(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Form.WndProc(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
System.Windows.Forms.dll!System.Windows.Forms.Control.SetVisibleCore(bool value) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Form.SetVisibleCore(bool value) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.Show() Unknown
GetDomWindowHang.exe!GetDomWindowHang.Form2.WebView1_NewWindow(Object sender, EO.WebBrowser.NewWindowEventArgs e) Line 28 Basic
EO.WebBrowser.dll!EO.WebBrowser.WebView.w(EO.Internal.ct A_0, EO.Internal.ar3 A_1) Unknown
EO.WebBrowser.dll!EO.WebBrowser.WebView.a(EO.Internal.ct A_0, EO.Internal.ar3 A_1) Unknown
EO.WebBrowser.dll!EO.WebBrowser.WebView.b(EO.Internal.ct A_0, EO.Internal.ar3 A_1) Unknown
EO.WebBrowser.dll!EO.WebBrowser.WebView.c.a() Unknown
EO.WebBrowser.dll!EO.WebBrowser.WebView.d.a() Unknown
EO.WebBrowser.dll!EO.WebBrowser.WebView.a(bool A_0, EO.WebBrowser.WebView.l A_1) Unknown
EO.WebBrowser.dll!EO.WebBrowser.WebView.a(bool A_0, EO.Base.Action A_1) Unknown
EO.WebBrowser.dll!EO.WebBrowser.WebView.an(EO.Internal.ct A_0, EO.Internal.ar3 A_1) Unknown
EO.WebBrowser.dll!EO.Internal.ct.a(EO.WebBrowser.WebView A_0, EO.Internal.ct A_1, int A_2, System.IntPtr A_3, System.IntPtr A_4) Unknown
EO.WebBrowser.dll!EO.WebBrowser.WebView.o.a(System.IntPtr A_0, int A_1, System.IntPtr A_2, System.IntPtr A_3, ref bool A_4) Unknown
EO.Base.dll!EO.Internal.y.l.a(System.IntPtr A_0, int A_1, System.IntPtr A_2, System.IntPtr A_3, System.IntPtr A_4, System.IntPtr A_5) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(System.IntPtr dwComponentID, int reason, int pvLoopData) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason, System.Windows.Forms.ApplicationContext context) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) Unknown
Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() Unknown
Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() Unknown
Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(string[] commandLine) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args) Unknown
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() Unknown
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() Unknown
eo_support
Posted: Monday, July 23, 2018 5:09:46 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 20,678
Thanks for the stack trace. We accidentally removed Form1.DoTask from Form2_Load during our test. After restoring to the original code we were able to reproduce the problem again. We will continue to investigate this and let you know as soon as we have an update.
Tymeware
Posted: Monday, July 30, 2018 12:28:12 PM
Rank: Member
Groups: Member

Joined: 9/1/2015
Posts: 17
Any update on this?
eo_support
Posted: Monday, July 30, 2018 2:22:33 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 20,678
Yes. We believe we have found the root of the problem but it requires code changes on our end. So this will be resolved in our next build. We will reply again as soon as the new build is posted.

Thanks
eo_support
Posted: Wednesday, August 1, 2018 7:35:12 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 20,678
Hi,

We have posted a new build that should resolve this issue. You can download it from our download page. However we have not been able to verify the final build with your test app because the test link you provided has already expired. You can try it on your end and if you still have any problems please let us know.

Thanks!
Tymeware
Posted: Thursday, August 9, 2018 12:58:08 PM
Rank: Member
Groups: Member

Joined: 9/1/2015
Posts: 17
Initial testing seems to confirm that this is fixed
eo_support
Posted: Thursday, August 9, 2018 5:27:41 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 20,678
Great. Thanks for confirming the fix!


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.