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
wxWebView - wxWebViewBackendEdge - Runscript - get stuck #19075
Comments
2021-02-09 20:54:26: hiemann (Rico Hiemann) uploaded file
|
2021-02-09 20:54:52: hiemann (Rico Hiemann) uploaded file
|
2021-02-09 20:55:06: hiemann (Rico Hiemann) uploaded file
|
2021-02-09 22:02:15: @TcT2k changed status from new to confirmed2021-02-09 22:02:15: @TcT2k commentedCan confirm the issue:
|
2021-02-09 22:23:04: @vadz commentedHow are callbacks dispatched in Edge SDK? Are they executed in the same thread or in a different one? |
2021-02-09 22:30:56: @TcT2k commentedReplying to [comment:2 vadz]:
Same thread as far as I'm aware. |
2021-02-09 22:45:00: @vadz commentedThen it probably indeed relies on message dispatching working (because I don't know how else could it work). Can we find out which message it uses? If you have a simple example where this does work, it would be enough to run it under debugger, break in the callback and see where is it called from in the stack (yes, it's a pretty brute force method but those have the advantage of usually working...). |
2021-02-10 23:23:42: @TcT2k commentedReplying to [comment:4 vadz]:
Seems like it's using In this case I think the problem is practically described here:
So from a callback like in this case title change |
2021-02-20 14:15:49: @vadz commentedThere is a very simple workaround for this particular bug as the code could just use The only alternative is to indeed do what you propose and use |
2021-04-04 17:24:00: ancwrd1 (Dmitry Pankratov) commentedI have the same issue calling "RunScript" from the wxEVT_WEBVIEW_LOADED event handler, it hangs in the tight loop. I tried the approach recommended here with "CallAfter", however it only works after a small delay: if I call "RunScript" immediately inside the CallAfter closure it returns FALSE, if it is called after a tiny sleep then it is ok. I think it could be some race condition inside Edge backend. |
Using HandleWindowEvent() from the WebView2 event callbacks is a common error source when user code does something blocking like RunScript() or ShowModal(). Queue the events to prevent this where possible, in wxEVT_WEBVIEW_NAVIGATING at least warn the developer instead of hanging silently. Closes: wxWidgets#22744, wxWidgets#19075
Using HandleWindowEvent() from the WebView2 event callbacks is a common error source when user code does something blocking like RunScript() or ShowModal(). Queue the events to prevent this where possible, in wxEVT_WEBVIEW_NAVIGATING at least warn the developer instead of hanging silently. Closes: wxWidgets#22744, wxWidgets#19075
Using HandleWindowEvent() from the WebView2 event callbacks is a common error source when user code does something blocking like RunScript() or ShowModal(). Queue the events to prevent this where possible, in wxEVT_WEBVIEW_NAVIGATING at least warn the developer instead of hanging silently. Closes: wxWidgets#22744, wxWidgets#19075
Using HandleWindowEvent() from the WebView2 event callbacks is a common error source when user code does something blocking like RunScript() or ShowModal(). Queue the events to prevent this where possible, in wxEVT_WEBVIEW_NAVIGATING at least warn the developer instead of hanging silently. Closes #22834, #22744, #19075
This Issue should probably be either closed or labeled for backport. |
I don't know this code well enough to be confident in backporting this correctly, so I won't do it, even though I think it would indeed be useful to have this in 3.2, so if anybody is interested in doing this, please create a PR for 3.2 doing this. |
Using HandleWindowEvent() from the WebView2 event callbacks is a common error source when user code does something blocking like RunScript() or ShowModal(). Queue the events to prevent this where possible, in wxEVT_WEBVIEW_NAVIGATING at least warn the developer instead of hanging silently. Closes wxWidgets#22834, wxWidgets#22744, wxWidgets#19075 (cherry picked from commit 0ace989)
Using HandleWindowEvent() from the WebView2 event callbacks is a common error source when user code does something blocking like RunScript() or ShowModal(). Queue the events to prevent this where possible, in wxEVT_WEBVIEW_NAVIGATING at least warn the developer instead of hanging silently. See #22834, #22744, #19075 Closes #23025. (cherry picked from commit 0ace989)
Issue migrated from trac ticket # 19075
component: WebView | priority: normal | keywords: wxWebView,wxWebViewBackendEdge
2021-02-09 20:53:48: hiemann (Rico Hiemann) created the issue
Hi,
I used the wxWebView sample from master branch and wrote a little test html, see below.
I noticed different behaviour between wxWebViewBackendEdge vs
wxWebViewBackendIE especially with RunScript.
Using the backend: wxWebViewBackendIE
All links change the images as expected:
InternGrey - grey image - OK
InternRed - red image - OK
ExternGrey - grey image - OK
ExternRed - red image - OK
Than switching to the backend: wxWebViewBackendEdge
(Compilation and installation worked - backend message from log:
wxWebViewEdge Version: Microsoft Edge WebView2 88.0.705)
InternGrey - grey image - OK
InternRed - red image - OK
ExternGrey - change image on first click but function get stuck
ExternRed - change image on first click but function get stuck
The internal C++ part:
wxWebViewBackendEdge get stuck in line (infinite loop, no error or any response):
Thanks in advance
Rico
The text was updated successfully, but these errors were encountered: