[jfx11u] RFR: 8263788: JavaFX application freezes completely after some time when using the WebView

2021-05-08 Thread Kevin Rushforth
Clean backport to jfx11u. Tested on all three platforms, along with my other 
in-progress backports, all of which are aggregated in my 
[`kevinrushforth:test-kcr-11.0.12`](https://github.com/kevinrushforth/jfx11u/commits/test-kcr-11.0.12)
 branch.

-

Commit messages:
 - 8263788: JavaFX application freezes completely after some time when using 
the WebView

Changes: https://git.openjdk.java.net/jfx11u/pull/12/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx11u=12=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8263788
  Stats: 38 lines in 3 files changed: 15 ins; 18 del; 5 mod
  Patch: https://git.openjdk.java.net/jfx11u/pull/12.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx11u pull/12/head:pull/12

PR: https://git.openjdk.java.net/jfx11u/pull/12


Re: RFR: 8263788: JavaFX application freezes completely after some time when using the WebView

2021-04-20 Thread Guru Hb
On Mon, 12 Apr 2021 13:10:53 GMT, Arun Joseph  wrote:

> Issue: Java application (with WebView) will completely freeze after using it 
> for a while.
> 
> Fix: Use native isMainThread functions instead of JNI call.

Looks good to me . 
Tested on Windows with Modified WebView which loads multiple URL every 30 
seconds (executed for 30 min and didn't find any freeze or crash).

-

Marked as reviewed by ghb (Reviewer).

PR: https://git.openjdk.java.net/jfx/pull/461


Re: RFR: 8263788: JavaFX application freezes completely after some time when using the WebView

2021-04-20 Thread Kevin Rushforth
On Tue, 20 Apr 2021 10:31:59 GMT, PrimosK 
 wrote:

>> Issue: Java application (with WebView) will completely freeze after using it 
>> for a while.
>> 
>> Fix: Use native isMainThread functions instead of JNI call.
>
> We've created another production build and it seems to be working fine! 
> Application doesn't hang anymore! Sorry for false alarm - it looks like our 
> previous production build procedure had flaws (might be I've checked out 
> wrong pull request).
> 
> BTW - thank you guys for all hard work needed to fix this one.

@PrimosK Good to hear. Thank you for your help in verifying the fix. Arun will 
integrate the fix once a second reviewer has approved it.

-

PR: https://git.openjdk.java.net/jfx/pull/461


Re: RFR: 8263788: JavaFX application freezes completely after some time when using the WebView

2021-04-20 Thread PrimosK
On Mon, 12 Apr 2021 13:10:53 GMT, Arun Joseph  wrote:

> Issue: Java application (with WebView) will completely freeze after using it 
> for a while.
> 
> Fix: Use native isMainThread functions instead of JNI call.

We've created another production build and it seems to be working fine! 
Application doesn't hang anymore! Sorry for false alarm - it looks like our 
previous production build procedure had flaws (might be I've checked out wrong 
pull request).

BTW - thank you guys for all hard work needed to fix this one.

-

PR: https://git.openjdk.java.net/jfx/pull/461


Re: RFR: 8263788: JavaFX application freezes completely after some time when using the WebView

2021-04-19 Thread PrimosK
On Mon, 12 Apr 2021 13:10:53 GMT, Arun Joseph  wrote:

> Issue: Java application (with WebView) will completely freeze after using it 
> for a while.
> 
> Fix: Use native isMainThread functions instead of JNI call.

Please discard my previous comment. 

After building a debug version we can't reproduce it anymore.

I will try to create another production build and test it out once more. Will 
let you know how it goes.

-

PR: https://git.openjdk.java.net/jfx/pull/461


Re: RFR: 8263788: JavaFX application freezes completely after some time when using the WebView

2021-04-19 Thread PrimosK
On Mon, 12 Apr 2021 13:10:53 GMT, Arun Joseph  wrote:

> Issue: Java application (with WebView) will completely freeze after using it 
> for a while.
> 
> Fix: Use native isMainThread functions instead of JNI call.

A production build using this fix doesn't solve it. Application still freezes. 

We will provide you with updated thread dump generated from debug build 
including this fix (and with assertions disabled) in the following days.

-

PR: https://git.openjdk.java.net/jfx/pull/461


Re: RFR: 8263788: JavaFX application freezes completely after some time when using the WebView

2021-04-16 Thread Kevin Rushforth
On Mon, 12 Apr 2021 13:10:53 GMT, Arun Joseph  wrote:

> Issue: Java application (with WebView) will completely freeze after using it 
> for a while.
> 
> Fix: Use native isMainThread functions instead of JNI call.

Tested on all three platforms. Looks good.

-

Marked as reviewed by kcr (Lead).

PR: https://git.openjdk.java.net/jfx/pull/461


Re: RFR: 8263788: JavaFX application freezes completely after some time when using the WebView

2021-04-16 Thread Kevin Rushforth
On Fri, 16 Apr 2021 08:49:19 GMT, Arun Joseph  wrote:

>> modules/javafx.web/src/main/native/Source/WTF/wtf/java/MainThreadJava.cpp 
>> line 45:
>> 
>>> 43: #elif OS(WINDOWS)
>>> 44: static ThreadIdentifier mainThread { 0 };
>>> 45: #endif
>> 
>> Both here and below, where the `isMainThread` is defined, assume that `UNIX` 
>> and `WINDOWS` are the only two options. I presume this is a valid assumption?
>
> I've tested in all three platforms. The two options are sufficient as Mac and 
> Linux uses `pthread`.

That's what I figured. It's only theoretical, in that if we ever add a platform 
that isn't one of `WINDOWS` or `UNIX` it wouldn't compile, but I imagine we 
have very many other places where that is also true.

-

PR: https://git.openjdk.java.net/jfx/pull/461


Re: RFR: 8263788: JavaFX application freezes completely after some time when using the WebView

2021-04-16 Thread Kevin Rushforth
On Fri, 16 Apr 2021 14:10:48 GMT, Kevin Rushforth  wrote:

> A non-debug build crashes for me on startup in the 
> `com.sun.webkit.WebPage.twkCreatePage` method on both Windows and Mac.

Never mind. This was a build error on my part. I've correct my mistake and will 
rerun the test. Sorry for the noise.

-

PR: https://git.openjdk.java.net/jfx/pull/461


Re: RFR: 8263788: JavaFX application freezes completely after some time when using the WebView

2021-04-16 Thread Kevin Rushforth
On Mon, 12 Apr 2021 13:10:53 GMT, Arun Joseph  wrote:

> Issue: Java application (with WebView) will completely freeze after using it 
> for a while.
> 
> Fix: Use native isMainThread functions instead of JNI call.

A non-debug build crashes for me on startup in the 
`com.sun.webkit.WebPage.twkCreatePage` method on both Windows and Mac.

-

Changes requested by kcr (Lead).

PR: https://git.openjdk.java.net/jfx/pull/461


Re: RFR: 8263788: JavaFX application freezes completely after some time when using the WebView

2021-04-16 Thread Arun Joseph
On Thu, 15 Apr 2021 23:41:02 GMT, Kevin Rushforth  wrote:

>> Issue: Java application (with WebView) will completely freeze after using it 
>> for a while.
>> 
>> Fix: Use native isMainThread functions instead of JNI call.
>
> modules/javafx.web/src/main/native/Source/WTF/wtf/java/MainThreadJava.cpp 
> line 45:
> 
>> 43: #elif OS(WINDOWS)
>> 44: static ThreadIdentifier mainThread { 0 };
>> 45: #endif
> 
> Both here and below, where the `isMainThread` is defined, assume that `UNIX` 
> and `WINDOWS` are the only two options. I presume this is a valid assumption?

I've tested in all three platforms. The two options are sufficient as Mac and 
Linux uses `pthread`.

-

PR: https://git.openjdk.java.net/jfx/pull/461


Re: RFR: 8263788: JavaFX application freezes completely after some time when using the WebView

2021-04-15 Thread Kevin Rushforth
On Mon, 12 Apr 2021 13:10:53 GMT, Arun Joseph  wrote:

> Issue: Java application (with WebView) will completely freeze after using it 
> for a while.
> 
> Fix: Use native isMainThread functions instead of JNI call.

The code changes look good. I still need to test it. Speaking of which, I 
presume you've tested this on all three platforms?

I left one question inline.

@johanvos, @arapte, or @guruhb can one of you be the second reviewer?

modules/javafx.web/src/main/native/Source/WTF/wtf/java/MainThreadJava.cpp line 
45:

> 43: #elif OS(WINDOWS)
> 44: static ThreadIdentifier mainThread { 0 };
> 45: #endif

Both here and below, where the `isMainThread` is defined, assume that `UNIX` 
and `WINDOWS` are the only two options. I presume this is a valid assumption?

-

PR: https://git.openjdk.java.net/jfx/pull/461


RFR: 8263788: JavaFX application freezes completely after some time when using the WebView

2021-04-15 Thread Arun Joseph
Issue: Java application (with WebView) will completely freeze after using it 
for a while.

Fix: Use native isMainThread functions instead of JNI call.

-

Commit messages:
 - Remove platform check in ThreadingWin
 - Remove fwkIsMainThread
 - 8263788: JavaFX application freezes completely after some time when using 
the WebView

Changes: https://git.openjdk.java.net/jfx/pull/461/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx=461=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8263788
  Stats: 38 lines in 3 files changed: 15 ins; 18 del; 5 mod
  Patch: https://git.openjdk.java.net/jfx/pull/461.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/461/head:pull/461

PR: https://git.openjdk.java.net/jfx/pull/461