-
Notifications
You must be signed in to change notification settings - Fork 119
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
[Edge] No more handle exceptions from Edge browser #339
Comments
@nnemkin can you have a look? This affects the production environment of one of my clients. |
I remember this one. The root cause is that the loop that fakes synchronous operation ( I guess the proper fix is remove |
Thanks @nnemkin |
I can confirm we have something similar since we added edge by default in our client. It happens randomly when opening a browser instance. |
@nnemkin Hi, any progress here? |
To my knowledge, @nnemkin is away. He hasn't contributed anything in last 8 months or so. |
…platform#339 The Edge browser creation uses Display.readAndDispath() to process the OS events for browser instantiation. When there are other asynchronous executions scheduled while the browser is being initialized, they may be processed in between the processing of browser-instantiating OS events if too much time elapses between them. In case such an asynchronous execution changes a state that makes the browser instantiation fail, such as disposing the composite parent of the browser, an exception occurs. In order to avoid the processing of asynchronous executions during browser instantiation, the change ensures that readAndDisplay() is only called when an OS event is present to be processed.
…platform#339 The Edge browser creation uses Display.readAndDispath() to process the OS events for browser instantiation. When there are other asynchronous executions scheduled while the browser is being initialized, they may be processed in between the processing of browser-instantiating OS events if too much time elapses between them. In case such an asynchronous execution changes a state that makes the browser instantiation fail, such as disposing the composite parent of the browser, an exception occurs. In order to avoid the processing of asynchronous executions during browser instantiation, the change ensures that readAndDisplay() is only called when an OS event is present to be processed.
…platform#339 The Edge browser creation uses Display.readAndDispath() to process the OS events for browser instantiation. When there are other asynchronous executions scheduled while the browser is being initialized, they may be processed in between the processing of browser-instantiating OS events if too much time elapses between them. In case such an asynchronous execution changes a state that makes the browser instantiation fail, such as disposing the composite parent of the browser, an exception occurs. In order to avoid the processing of asynchronous executions during browser instantiation, the change ensures that readAndDisplay() is only called when an OS event is present to be processed.
…platform#339 The Edge browser creation uses Display.readAndDispath() to process the OS events for browser instantiation. When there are other asynchronous executions scheduled while the browser is being initialized, they may be processed in between the processing of browser-instantiating OS events if too much time elapses between them. In case such an asynchronous execution changes a state that makes the browser instantiation fail, such as disposing the composite parent of the browser, an exception occurs. In order to avoid the processing of asynchronous executions during browser instantiation, the change ensures that readAndDisplay() is only called when an OS event is present to be processed.
The Edge browser creation uses Display.readAndDispath() to process the OS events for browser instantiation. When there are other asynchronous executions scheduled while the browser is being initialized, they may be processed in between the processing of browser-instantiating OS events if too much time elapses between them. In case such an asynchronous execution changes a state that makes the browser instantiation fail, such as disposing the composite parent of the browser, an exception occurs. In order to avoid the processing of asynchronous executions during browser instantiation, the change ensures that readAndDisplay() is only called when an OS event is present to be processed.
…platform#339 The Edge browser creation uses Display.readAndDispath() to process the OS events for browser instantiation. When there are other asynchronous executions scheduled while the browser is being initialized, they may be processed in between the processing of browser-instantiating OS events if too much time elapses between them. In case such an asynchronous execution changes a state that makes the browser instantiation fail, such as disposing the composite parent of the browser, an exception occurs. In order to avoid the processing of asynchronous executions during browser instantiation, the change ensures that readAndDisplay() is only called when an OS event is present to be processed.
In our RCP application we see no more handle exceptions during startup if we use Edge. This does not happen all the time, there seems to be a race condition or the error is reported incorrectly similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=576196.
If the user starts again the RCP application, the errors does not happen again, sometimes is takes 3-4 attempts to start the application. We are using latest version from https://developer.microsoft.com/de-de/microsoft-edge/webview2/#download-section, currently 104.0.1293.63 pointing to the download with -Dorg.eclipse.swt.browser.DefaultType=edge -Dorg.eclipse.swt.browser.EdgeDir=c:\PROGRA~1\WebView2 in the runtime arguments.
This happens in the Edge.createmethod, relevant stack trace:
Here is the code which triggers the exception:
callAndWait seems to spins the event queue, maybe this causes the other thread to sync with main thread and to dispose the composite?
The incorrect behavior reported via https://bugs.eclipse.org/bugs/show_bug.cgi?id=576196 can be reproduced with the following snippet.
Expected behavior
Correct error message or even better, just working.
Environment:
Additional OS info (e.g. OS version, Linux Desktop, etc)
JRE/JDK version
Java 11
Version since
Still present in latest I-Buil
Workaround (or) Additional context
Start again the RCP application.
The text was updated successfully, but these errors were encountered: