Re: JavaFX in-memory dynamic CSS file editing and applying

2018-10-16 Thread Matthieu BROUILLARD
If what you want is to be able to test CSS changes on the fly on a running
javafx application during development for example; then you can also have a
look at CSSFX (https://github.com/McFoggy/cssfx).
If you do not want to setup CSSFX on your own, it has been integrated
inside Jonathan Giles "Scenic View" tool (
http://fxexperience.com/scenic-view/).
If you use a standard layout for your sources then the magic should apply;
if not you still can integrate CSSFX yourself to give it the good path to
your sources.

On Mon, Oct 15, 2018 at 10:54 PM Ty Young  wrote:

>
> On 10/15/18 7:02 AM, David Grieve wrote:
> > Just setStyle -fx-theme-header (etc.) on the root node.
> >
> >
>
> That doesn't work, sadly. The actual FX CSS properties that utilize
> -fx-theme-header don't update after setting a new value.
>
>
> > On 10/15/18 1:05 AM, Ty Young wrote:
> >> Does JavaFX have an API for dynamically editing and applying CSS
> >> files in-memory? If not, would there be any possibility in one ever
> >> being made?
> >>
> >>
> >> My reasoning for such an API is, instead of switching between
> >> completely separate CSS files and having to update each whenever I
> >> need to support a new component, I'd like the ability to just have 1
> >> CSS file and edit it's values in-memory and have it reflected in
> >> JavaFX as soon as the change is made. For example instead of changing
> >> the individual components themselves I'd like to get all of this:
> >>
> >>
> >> *
> >> {
> >> -fx-theme-header: #44;
> >> -fx-theme-background: #3D3D3D;
> >> -fx-theme-background-alt: #2E2E2E;
> >> -fx-theme-selected: #F0544C;
> >> -fx-theme-label-text: #D2D2D2;
> >> -fx-theme-selectable-hover: #454545;
> >> -fx-theme-tab-close-color: -fx-theme-label-text;
> >>
> >> -fx-highlight-fill: -fx-theme-selected;
> >> }
> >>
> >>
> >> and modify it via a JavaFX API to change it to something like:
> >>
> >>
> >> *
> >> {
> >> -fx-theme-header: #FF;
> >> -fx-theme-background: -fx-theme-header;
> >> -fx-theme-background-alt: #F2F2F2;
> >> -fx-theme-selected: #CBEAFF;
> >> -fx-theme-label-text: #33;
> >> -fx-theme-selectable-hover: #E1E1E1;
> >> -fx-theme-tab-close-color: -fx-theme-label-text;
> >>
> >> -fx-highlight-fill: -fx-theme-selected;
> >> }
> >>
> >>
> >> Since these are used throughout the CSS file, all the components that
> >> use these will be updated.
> >>
> >>
> >>
> >>
> >>
> >
>


Re: JavaFX 11 snapshots in maven sonatype

2018-07-08 Thread Matthieu BROUILLARD
Hi,

If you are really looking for some automated project versioning, you can
also look at jgitver (1) which can compute project versions based on git
commits, tags, branches, ...
There is a maven core extension (2) and a gradle plugin (3) for it.

-- Matthieu Brouillard

1: https://github.com/jgitver/jgitver
2: https://github.com/jgitver/jgitver-maven-plugin
3: https://github.com/jgitver/gradle-jgitver-plugin

On Sun, Jul 8, 2018 at 7:57 PM Sven Reimers  wrote:

> Hi,
>
> I think I like the idea of just having something similiar like OpenJDK e.g.
> 11.0.0-ea18.
> Do we really need snapshots - i.e. continuous builds published to maven
> central?
>
> -Sven
>
> Scott Palmer  schrieb am So., 8. Juli 2018, 19:04:
>
> > If separate Gradle processes produce the artifacts, there is probably a
> > way to bring them together and (re-)publish them together in yet another
> > project.
> >
> > Scott
> >
> > > On Jul 8, 2018, at 8:38 AM, Johan Vos  wrote:
> > >
> > > I don't think that will help, as the artifacts for the different
> > platforms
> > > are not created inside the same gradle process. We don't do
> > > cross-compiling, so for each compileTarget a different machine and a
> > > different build process is used.
> > > Hence, I think we have to deal with separate publications anyhow,
> right?
> > >
> > > - Johan
> > >
> > >> On Sun, Jul 8, 2018 at 11:06 AM Kenzie Togami 
> > wrote:
> > >>
> > >> Hi Johan,
> > >>
> > >>> It is very inconvenient, so if you know an easy way to get all
> snapshot
> > >> version to be equal, I would love to hear that.
> > >>
> > >> I think that the varying snapshots versions probably occur because a
> > >> separate publication is set up for each `compileTarget`:
> > >>
> >
> https://github.com/javafxports/openjdk-jfx/pull/83/files#diff-c197962302397baf3a4cc36463dce5eaR1564
> > >> I haven't used the Gradle maven-publish plugin yet but I think it
> could
> > >> work if you instead iterate over each target where the artifacts are
> > >> generated, which is the only place it's used anyways:
> > >>
> > >> compileTargets { t ->
> > >>artifact project.tasks."moduleEmptyPublicationJar$t.capital"
> > >>artifact project.tasks."modularPublicationJar$t.capital" {
> > >>classifier "$t.name"
> > >>}
> > >> }
> >
>


Re: Planning for JavaFX.next

2016-12-09 Thread Matthieu BROUILLARD
Hi Folks,

for us in my company I would said the most important topics are related to
performances:

* CSS performances
* TableView performances
* ensure correctness, including memory leaks, of software-rendering
pipeline (lot of our customers use Citrix farms with no GPU acceleration)

for everything related to webview (we embed lot of webapps in our client
side java container) it is a bit late for us we are currently switching to
JxBrowser.

Matthieu Brouillard


On Thu, Dec 8, 2016 at 12:45 AM, Jonathan Giles <jonathan.gi...@oracle.com>
wrote:

> Hi folks,
>
> Development on JDK 9 is slowly starting to ramp down, and we are starting
> to turn our attention to the goals for JavaFX in JDK 10 and beyond. We are
> starting to compile our list of what we think is important, but we really
> want to hear from the community about what their highest priorities are to
> them. As always, it's important to keep in mind what JavaFX is (e.g. it
> isn't aiming to be a high-performance game engine), but even still there
> are bound to be a number of places where people might want to weigh in, for
> example:
>
>  * New layout containers (e.g. Flexbox)
>  * Public APIs for UI control behaviors
>  * Marlin renderer enabled by default
>  * Support for CSS animations
>  * CSS performance improvements
>  * TableView improvements (cell spanning, row / column freezing, etc)
>  * TableView performance
>  * Focus traversal API
>  * WebGL support in WebView
>  * Improved image I/O support
>  * A JavaFX equivalent of the AWT Desktop APIs
>  * Multi-res image API
>  * NIO-backed writable images
>
> If there are other areas of interest that aren't listed here, please start
> discussing them and we can work together to determine priorities. If all
> you want to do is add a +1 for one of more of the items above, even that
> will be very useful.
>
> Thanks,
> -- Jonathan
>


Re: HEADS-UP: plan to integrate a newer WebKit into 9-dev next week.

2016-05-30 Thread Matthieu BROUILLARD
Sorry previous mail sent before fully written. :-(

Will this enhancement be backported to JDK8?

Matthieu

On Wed, May 11, 2016 at 12:20 AM, Kevin Rushforth <
kevin.rushfo...@oracle.com> wrote:

> All,
>
> As a heads-up, we plan to push an updated WebKit to FX 9-dev early next
> week [1]. If there are no build problems, they will be integrated to 9
> master the following week for jdk-9+119. We then plan to backport the newer
> WebKit (to keep them in sync) to 8u-dev a couple weeks later.
>
> The only new tool needed to build this is CMake [2] version 3.4 or later
> (we will use 3.4.1 to build).
>
> Let me know if you have any questions.
>
> -- Kevin
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8156698
>
> [2] http://cmake.org/
>
>


Re: HEADS-UP: plan to integrate a newer WebKit into 9-dev next week.

2016-05-30 Thread Matthieu BROUILLARD
@Kevin will this upate finally find

On Wed, May 11, 2016 at 12:20 AM, Kevin Rushforth <
kevin.rushfo...@oracle.com> wrote:

> All,
>
> As a heads-up, we plan to push an updated WebKit to FX 9-dev early next
> week [1]. If there are no build problems, they will be integrated to 9
> master the following week for jdk-9+119. We then plan to backport the newer
> WebKit (to keep them in sync) to 8u-dev a couple weeks later.
>
> The only new tool needed to build this is CMake [2] version 3.4 or later
> (we will use 3.4.1 to build).
>
> Let me know if you have any questions.
>
> -- Kevin
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8156698
>
> [2] http://cmake.org/
>
>


Re: Problems with multiple WebView

2016-05-19 Thread Matthieu BROUILLARD
Done under : JI-9037986.

Thanks for the support.

On Thu, May 19, 2016 at 2:27 PM, Guru Hb <guru...@oracle.com> wrote:

> Hi Matthieu Brouillard,
>
> Please file a bug at http://bugreport.java.com/bugreport/
> <http://bugreport.java.com/bugreport/>  along with JDK/JRE version and on
> which platform Windows / Linux / OS X details.
>
> Instructions :
> https://wiki.openjdk.java.net/display/OpenJFX/Submitting+a+Bug+Report
> Thanks,
> Guru
>
> On 19/5/16 2:55 PM, Matthieu BROUILLARD wrote:
>
> Hi all,
>
> Inside our application we are integrating web applications using JavaFX
> WebViews.
>
> We are facing issues when opening several webviews on the same URLs (even
> with different parameters).
> The states reported to listeners registered using
>
> *view.getEngine().getLoadWorker().stateProperty().addListener(...)*
>
> become totally incoherent.
>
> I have created a simple reproducer test class to demo the 
> issue<https://gist.github.com/AWXGX/1ee902256169c612d97f0722b79f47c6#file-multiplewebviewbug-java>
>  
> <https://gist.github.com/AWXGX/1ee902256169c612d97f0722b79f47c6#file-multiplewebviewbug-java>
> (1).
>
> The gist contains also different executions results in the 3 tested 'modes':
> - multiple views opening the exact same URL
> - multiple views opening the same URL with different parameters (html app
> scenario)
> - multiple views opening different URLs
>
> Only the later is working correctly.
>
> Did someone already faced that?
> I have not found bugs (or only closed ones JDK-8094208, JDK-8129398)
> related to that, shall I open one?
>
> (1):https://gist.github.com/AWXGX/1ee902256169c612d97f0722b79f47c6#file-multiplewebviewbug-java
>
>
>


Problems with multiple WebView

2016-05-19 Thread Matthieu BROUILLARD
Hi all,

Inside our application we are integrating web applications using JavaFX
WebViews.

We are facing issues when opening several webviews on the same URLs (even
with different parameters).
The states reported to listeners registered using

*view.getEngine().getLoadWorker().stateProperty().addListener(...)*

become totally incoherent.

I have created a simple reproducer test class to demo the issue

(1).

The gist contains also different executions results in the 3 tested 'modes':
- multiple views opening the exact same URL
- multiple views opening the same URL with different parameters (html app
scenario)
- multiple views opening different URLs

Only the later is working correctly.

Did someone already faced that?
I have not found bugs (or only closed ones JDK-8094208, JDK-8129398)
related to that, shall I open one?

(1):
https://gist.github.com/AWXGX/1ee902256169c612d97f0722b79f47c6#file-multiplewebviewbug-java


Re: status behind JDK-8149738

2016-04-14 Thread Matthieu BROUILLARD
Many thanks to you and all the OpenJDK commiters for the great work &
support that you provide.

Matthieu

On Wed, Apr 13, 2016 at 7:49 PM, Guru Hb <guru...@oracle.com> wrote:

> Hi Matthieu,
>
> I could re-produce the crash as you have mentioned. Thanks for helping out
> to for the html test content.
>
> Please keep an eye on JI-9035239 for further updates.
>
> Thanks,
> Guru
>
>
> On 13/4/16 9:13 PM, Matthieu BROUILLARD wrote:
>
> Hi Guru,
>
> I have filled an issue in http://bugreport.java.com/ ; denominated for
> the moment JI-9035239.
>
> I have a simple reproducer test app that I also put in the bug report:
> <https://gist.github.com/McFoggy/e6166349b8ea012c925665fcf9625501>
> https://gist.github.com/McFoggy/e6166349b8ea012c925665fcf9625501
>
> The problem occures when colgroups>col width are reset/recomputed only. If
> in the webapp you uncheck the "Clear col sizes" combobox then the app
> should work correctly.
> If at startup you uncheck it ; it will normally work. What is weird is
> that if then you re-check it ; it will continue to work and will not fail
> anymore.
>
> Notice that with this simple reproducer test case I now reproduce the
> problem not only on 32bits versions but also on 64bits 8u74 & 8u77.
>
> Thanks
>
> Matthieu
>
>
> On Wed, Apr 13, 2016 at 5:07 AM, Guru Hb <guru...@oracle.com> wrote:
>
>> Hi Matthieu,
>>
>> If you could update the re-producer html/js in the JBS would be very help
>> full.
>>
>> I could reproduce with
>> http://advanced-gwt.sourceforge.net/demo/index.html --> "Click Heading
>> (Caption)" --> Crash. There are multiple Table listed in the left panel,
>> where i can re-produce the crash which originates from
>> "com.sun.webkit.WebPage.twkProcessMouseEvent".
>>
>> Thanks,
>> Guru
>>
>> On 12/4/16 10:00 PM, Matthieu BROUILLARD wrote:
>>
>> Hi Guru,
>>
>> I think I have isolated the problem ; it relates to GWT FlexTable (with
>> fixed column & row size) that is cleaned and refilled.
>> Tomorrow I'll build a clean GWT reproducer app and will send it to you.
>> I'll also do the exact same in pure html/js without GWT being involved.
>>
>> Matthieu
>>
>>
>> On Tue, Apr 12, 2016 at 11:18 AM, Guru Hb < <guru...@oracle.com>
>> guru...@oracle.com> wrote:
>>
>>> Thank you Matthieu,
>>>
>>> Let me create a sample GWT web  application with tabs along with the use
>>> case mentioned below. Will update the status in the JBS.
>>>
>>> Thanks,
>>> Guru
>>>
>>>
>>> On 12/4/16 2:26 PM, Matthieu BROUILLARD wrote:
>>>
>>> Hi,
>>>
>>> let me try to give more insights
>>>
>>> *>>> 0. resume of running and crashing JVMs*
>>> 64 bits: all tested work (at least issue not reproduced)
>>> 32 bits:
>>>- 8u74-i586, 8u60-i586: fail
>>>- 8u45-i586: OK
>>>
>>> *>>> 00. Application under test*
>>> We have simplified the reproducer JavaFX app as "just" a simple webview
>>> opening our GWT webapplication.
>>> There's no magic here, just a call to load() method on the WebEngine of
>>> a WebView.
>>>
>>> *>>> 1. What Content is loaded to WebEngine. (Live webpage or custom
>>> content)*
>>> It is a dynamic GWT webapplication.
>>> When launched, the application loads correctly: dynamic content
>>> (multiple dynamic parts in the app) is created/loaded/shown.
>>> The loaded page shows several tabs, when clicking on a tab the JVM
>>> crashes.
>>>
>>> *>>> 2. which mouse event lead to crash (Right / left click, Double
>>> click, Scroll)*
>>> single left click.
>>>
>>> *>>> 3. W.r.t 2nd point, is there a pop-up dialog exist ? or what was
>>> the html element under which mouse event triggered (Input element, Editable
>>> div, Form elements, Image , upload dialog, table,etc).*
>>> it is a simple div element that is CSS styled.
>>>
>>> *>>> 4. Any Modal Dialog used in the application under test , which will
>>> be used as a call back to an event from WebEngine ?*
>>> No in this case our JavaFX reproducer app, is nothing more than:
>>> ...
>>> WebView wv = new WebView();
>>> wv.getEngine().load(" <http://ourwebapp>http://ourwebapp;);
>>> ...
>>>
>>> In our global product we have 

Re: status behind JDK-8149738

2016-04-13 Thread Matthieu BROUILLARD
Hi Guru,

I have filled an issue in http://bugreport.java.com/ ; denominated for the
moment JI-9035239.

I have a simple reproducer test app that I also put in the bug report:
https://gist.github.com/McFoggy/e6166349b8ea012c925665fcf9625501

The problem occures when colgroups>col width are reset/recomputed only. If
in the webapp you uncheck the "Clear col sizes" combobox then the app
should work correctly.
If at startup you uncheck it ; it will normally work. What is weird is that
if then you re-check it ; it will continue to work and will not fail
anymore.

Notice that with this simple reproducer test case I now reproduce the
problem not only on 32bits versions but also on 64bits 8u74 & 8u77.

Thanks

Matthieu


On Wed, Apr 13, 2016 at 5:07 AM, Guru Hb <guru...@oracle.com> wrote:

> Hi Matthieu,
>
> If you could update the re-producer html/js in the JBS would be very help
> full.
>
> I could reproduce with http://advanced-gwt.sourceforge.net/demo/index.html
> --> "Click Heading (Caption)" --> Crash. There are multiple Table listed in
> the left panel, where i can re-produce the crash which originates from
> "com.sun.webkit.WebPage.twkProcessMouseEvent".
>
> Thanks,
> Guru
>
> On 12/4/16 10:00 PM, Matthieu BROUILLARD wrote:
>
> Hi Guru,
>
> I think I have isolated the problem ; it relates to GWT FlexTable (with
> fixed column & row size) that is cleaned and refilled.
> Tomorrow I'll build a clean GWT reproducer app and will send it to you.
> I'll also do the exact same in pure html/js without GWT being involved.
>
> Matthieu
>
>
> On Tue, Apr 12, 2016 at 11:18 AM, Guru Hb <guru...@oracle.com> wrote:
>
>> Thank you Matthieu,
>>
>> Let me create a sample GWT web  application with tabs along with the use
>> case mentioned below. Will update the status in the JBS.
>>
>> Thanks,
>> Guru
>>
>>
>> On 12/4/16 2:26 PM, Matthieu BROUILLARD wrote:
>>
>> Hi,
>>
>> let me try to give more insights
>>
>> *>>> 0. resume of running and crashing JVMs*
>> 64 bits: all tested work (at least issue not reproduced)
>> 32 bits:
>>- 8u74-i586, 8u60-i586: fail
>>- 8u45-i586: OK
>>
>> *>>> 00. Application under test*
>> We have simplified the reproducer JavaFX app as "just" a simple webview
>> opening our GWT webapplication.
>> There's no magic here, just a call to load() method on the WebEngine of a
>> WebView.
>>
>> *>>> 1. What Content is loaded to WebEngine. (Live webpage or custom
>> content)*
>> It is a dynamic GWT webapplication.
>> When launched, the application loads correctly: dynamic content (multiple
>> dynamic parts in the app) is created/loaded/shown.
>> The loaded page shows several tabs, when clicking on a tab the JVM
>> crashes.
>>
>> *>>> 2. which mouse event lead to crash (Right / left click, Double
>> click, Scroll)*
>> single left click.
>>
>> *>>> 3. W.r.t 2nd point, is there a pop-up dialog exist ? or what was the
>> html element under which mouse event triggered (Input element, Editable
>> div, Form elements, Image , upload dialog, table,etc).*
>> it is a simple div element that is CSS styled.
>>
>> *>>> 4. Any Modal Dialog used in the application under test , which will
>> be used as a call back to an event from WebEngine ?*
>> No in this case our JavaFX reproducer app, is nothing more than:
>> ...
>> WebView wv = new WebView();
>> wv.getEngine().load(" <http://ourwebapp>http://ourwebapp;);
>> ...
>>
>> In our global product we have indeed interaction between the host JVM &
>> the webapp ; but here we reproduce the crash with a simple app consisting
>> of the 2 lines above.
>>
>>
>> On Tue, Apr 12, 2016 at 9:41 AM, Guru Hb < <guru...@oracle.com>
>> guru...@oracle.com> wrote:
>>
>>> Hi Matthieu,
>>>
>>> Crash is due to Mouse event is not handled correctly from WebView
>>> context.
>>>
>>> Could you please provide these details.
>>>
>>> 1. What Content is loaded to WebEngine. (Live webpage or custom content)
>>> 2. which mouse event lead to crash (Right / left click, Double click,
>>> Scroll)
>>> 3. W.r.t 2nd point, is there a pop-up dialog exist ? or what was the
>>> html element under which mouse event triggered (Input element, Editable
>>> div, Form elements, Image , upload dialog, table,etc).
>>> 4. Any Modal Dialog used in the application under test , which will be
>>>

Re: status behind JDK-8149738

2016-04-12 Thread Matthieu BROUILLARD
Hi Guru,

I think I have isolated the problem ; it relates to GWT FlexTable (with
fixed column & row size) that is cleaned and refilled.
Tomorrow I'll build a clean GWT reproducer app and will send it to you.
I'll also do the exact same in pure html/js without GWT being involved.

Matthieu


On Tue, Apr 12, 2016 at 11:18 AM, Guru Hb <guru...@oracle.com> wrote:

> Thank you Matthieu,
>
> Let me create a sample GWT web  application with tabs along with the use
> case mentioned below. Will update the status in the JBS.
>
> Thanks,
> Guru
>
>
> On 12/4/16 2:26 PM, Matthieu BROUILLARD wrote:
>
> Hi,
>
> let me try to give more insights
>
> *>>> 0. resume of running and crashing JVMs*
> 64 bits: all tested work (at least issue not reproduced)
> 32 bits:
>- 8u74-i586, 8u60-i586: fail
>- 8u45-i586: OK
>
> *>>> 00. Application under test*
> We have simplified the reproducer JavaFX app as "just" a simple webview
> opening our GWT webapplication.
> There's no magic here, just a call to load() method on the WebEngine of a
> WebView.
>
> *>>> 1. What Content is loaded to WebEngine. (Live webpage or custom
> content)*
> It is a dynamic GWT webapplication.
> When launched, the application loads correctly: dynamic content (multiple
> dynamic parts in the app) is created/loaded/shown.
> The loaded page shows several tabs, when clicking on a tab the JVM crashes.
>
> *>>> 2. which mouse event lead to crash (Right / left click, Double click,
> Scroll)*
> single left click.
>
> *>>> 3. W.r.t 2nd point, is there a pop-up dialog exist ? or what was the
> html element under which mouse event triggered (Input element, Editable
> div, Form elements, Image , upload dialog, table,etc).*
> it is a simple div element that is CSS styled.
>
> *>>> 4. Any Modal Dialog used in the application under test , which will
> be used as a call back to an event from WebEngine ?*
> No in this case our JavaFX reproducer app, is nothing more than:
> ...
> WebView wv = new WebView();
> wv.getEngine().load("http://ourwebapp;);
> ...
>
> In our global product we have indeed interaction between the host JVM &
> the webapp ; but here we reproduce the crash with a simple app consisting
> of the 2 lines above.
>
>
> On Tue, Apr 12, 2016 at 9:41 AM, Guru Hb <guru...@oracle.com> wrote:
>
>> Hi Matthieu,
>>
>> Crash is due to Mouse event is not handled correctly from WebView context.
>>
>> Could you please provide these details.
>>
>> 1. What Content is loaded to WebEngine. (Live webpage or custom content)
>> 2. which mouse event lead to crash (Right / left click, Double click,
>> Scroll)
>> 3. W.r.t 2nd point, is there a pop-up dialog exist ? or what was the html
>> element under which mouse event triggered (Input element, Editable div,
>> Form elements, Image , upload dialog, table,etc).
>> 4. Any Modal Dialog used in the application under test , which will be
>> used as a call back to an event from WebEngine ?
>>
>> With above details , i could derive a test content / scenario to
>> re-produce the crash.
>>
>> Thanks,
>> Guru
>>
>> On 11/4/16 10:09 PM, Matthieu BROUILLARD wrote:
>>
>>> Hi all,
>>>
>>> In our application that integrates some webapps we are facing quite the
>>> same error than the one reported at
>>> https://bugs.openjdk.java.net/browse/JDK-8149738.
>>> The issue above has been marked with 'bugdb_22696741' ; does it mean it
>>> is
>>> referenced with more details elsewhere? Is there a known workaround?
>>>
>>> In our use case, when navigating in the webview into some GWT based
>>> application using 8u74-i586 (or 8u60-i586) we always crash the JVM and
>>> using 8u74 (64 bits) everything works.
>>> Doing additional tests revealed that 8u45-b51-i586 is working ; but
>>> unfortunately we have already moved on to more recent JDKs for our entire
>>> application.
>>>
>>> Sadly I do not have a simple reproduction app to provide.
>>> We also enable some prism debug settings without seeing anything relevant
>>> in the logs ; activating the software pipeline didn't changed anything
>>> neither.
>>>
>>> Are there specific debug params for the webview, webkit & jfxwebkit.dll ?
>>>
>>> The crash report looks the same than in the above issue:
>>>
>>> # # # # # # # # # # # # # # # # #
>>>
>>> #
>>> # A fatal error has been detected by the Java Runtime Environment:
>>>

Re: status behind JDK-8149738

2016-04-12 Thread Matthieu BROUILLARD
Hi,

let me try to give more insights

*>>> 0. resume of running and crashing JVMs*
64 bits: all tested work (at least issue not reproduced)
32 bits:
   - 8u74-i586, 8u60-i586: fail
   - 8u45-i586: OK

*>>> 00. Application under test*
We have simplified the reproducer JavaFX app as "just" a simple webview
opening our GWT webapplication.
There's no magic here, just a call to load() method on the WebEngine of a
WebView.

*>>> 1. What Content is loaded to WebEngine. (Live webpage or custom
content)*
It is a dynamic GWT webapplication.
When launched, the application loads correctly: dynamic content (multiple
dynamic parts in the app) is created/loaded/shown.
The loaded page shows several tabs, when clicking on a tab the JVM crashes.

*>>> 2. which mouse event lead to crash (Right / left click, Double click,
Scroll)*
single left click.

*>>> 3. W.r.t 2nd point, is there a pop-up dialog exist ? or what was the
html element under which mouse event triggered (Input element, Editable
div, Form elements, Image , upload dialog, table,etc).*
it is a simple div element that is CSS styled.

*>>> 4. Any Modal Dialog used in the application under test , which will be
used as a call back to an event from WebEngine ?*
No in this case our JavaFX reproducer app, is nothing more than:
...
WebView wv = new WebView();
wv.getEngine().load("http://ourwebapp;);
...

In our global product we have indeed interaction between the host JVM & the
webapp ; but here we reproduce the crash with a simple app consisting of
the 2 lines above.


On Tue, Apr 12, 2016 at 9:41 AM, Guru Hb <guru...@oracle.com> wrote:

> Hi Matthieu,
>
> Crash is due to Mouse event is not handled correctly from WebView context.
>
> Could you please provide these details.
>
> 1. What Content is loaded to WebEngine. (Live webpage or custom content)
> 2. which mouse event lead to crash (Right / left click, Double click,
> Scroll)
> 3. W.r.t 2nd point, is there a pop-up dialog exist ? or what was the html
> element under which mouse event triggered (Input element, Editable div,
> Form elements, Image , upload dialog, table,etc).
> 4. Any Modal Dialog used in the application under test , which will be
> used as a call back to an event from WebEngine ?
>
> With above details , i could derive a test content / scenario to
> re-produce the crash.
>
> Thanks,
> Guru
>
> On 11/4/16 10:09 PM, Matthieu BROUILLARD wrote:
>
>> Hi all,
>>
>> In our application that integrates some webapps we are facing quite the
>> same error than the one reported at
>> https://bugs.openjdk.java.net/browse/JDK-8149738.
>> The issue above has been marked with 'bugdb_22696741' ; does it mean it is
>> referenced with more details elsewhere? Is there a known workaround?
>>
>> In our use case, when navigating in the webview into some GWT based
>> application using 8u74-i586 (or 8u60-i586) we always crash the JVM and
>> using 8u74 (64 bits) everything works.
>> Doing additional tests revealed that 8u45-b51-i586 is working ; but
>> unfortunately we have already moved on to more recent JDKs for our entire
>> application.
>>
>> Sadly I do not have a simple reproduction app to provide.
>> We also enable some prism debug settings without seeing anything relevant
>> in the logs ; activating the software pipeline didn't changed anything
>> neither.
>>
>> Are there specific debug params for the webview, webkit & jfxwebkit.dll ?
>>
>> The crash report looks the same than in the above issue:
>>
>> # # # # # # # # # # # # # # # # #
>>
>> #
>> # A fatal error has been detected by the Java Runtime Environment:
>> #
>> #  EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x5456b7c9, pid=5836,
>> tid=6260
>> #
>> # JRE version: Java(TM) SE Runtime Environment (8.0_74-b02) (build
>> 1.8.0_74-b02)
>> # Java VM: Java HotSpot(TM) Client VM (25.74-b02 mixed mode windows-x86 )
>> # Problematic frame:
>> # C  [jfxwebkit.dll+0x8eb7c9]
>> ...
>> #
>>
>> ---  T H R E A D  ---
>>
>> Current thread (0x0563d000):  JavaThread "JavaFX Application Thread"
>> [_thread_in_native, id=6260, stack(0x05c7,0x05cc)]
>>
>> siginfo: ExceptionCode=0xc005, reading address 0x002e0060
>>
>> Registers:
>> EAX=0x002e0030, EBX=0x0011, ECX=0x0d457870, EDX=0x
>> ESP=0x05cbd578, EBP=0x, ESI=0x0d457870, EDI=0x0bae3030
>> EIP=0x5456b7c9, EFLAGS=0x00210246
>>
>> Top of Stack: (sp=0x05cbd578)
>> 0x05cbd578:   0d202f60 54580e41 0001 0001
>> ...
>> 0x05cbd5e8:   54a51a88  54510e95

Re: status behind JDK-8149738

2016-04-11 Thread Matthieu BROUILLARD
Kevin, Vadim,

thanks for the quick reply.

I tested with 1.8.0_102-ea-b01 (32 bits) and it still fails.

@Kevin what kind of report would you like me to generate? how to obtain the
native stack trace? I tried to set `-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=SOME_PATH` but the crash does not generate anything except
an hs_err file (
https://gist.github.com/McFoggy/5371c8409dde065aa7f017b7a00d32ec).


status behind JDK-8149738

2016-04-11 Thread Matthieu BROUILLARD
Hi all,

In our application that integrates some webapps we are facing quite the
same error than the one reported at
https://bugs.openjdk.java.net/browse/JDK-8149738.
The issue above has been marked with 'bugdb_22696741' ; does it mean it is
referenced with more details elsewhere? Is there a known workaround?

In our use case, when navigating in the webview into some GWT based
application using 8u74-i586 (or 8u60-i586) we always crash the JVM and
using 8u74 (64 bits) everything works.
Doing additional tests revealed that 8u45-b51-i586 is working ; but
unfortunately we have already moved on to more recent JDKs for our entire
application.

Sadly I do not have a simple reproduction app to provide.
We also enable some prism debug settings without seeing anything relevant
in the logs ; activating the software pipeline didn't changed anything
neither.

Are there specific debug params for the webview, webkit & jfxwebkit.dll ?

The crash report looks the same than in the above issue:

# # # # # # # # # # # # # # # # #

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x5456b7c9, pid=5836,
tid=6260
#
# JRE version: Java(TM) SE Runtime Environment (8.0_74-b02) (build
1.8.0_74-b02)
# Java VM: Java HotSpot(TM) Client VM (25.74-b02 mixed mode windows-x86 )
# Problematic frame:
# C  [jfxwebkit.dll+0x8eb7c9]
...
#

---  T H R E A D  ---

Current thread (0x0563d000):  JavaThread "JavaFX Application Thread"
[_thread_in_native, id=6260, stack(0x05c7,0x05cc)]

siginfo: ExceptionCode=0xc005, reading address 0x002e0060

Registers:
EAX=0x002e0030, EBX=0x0011, ECX=0x0d457870, EDX=0x
ESP=0x05cbd578, EBP=0x, ESI=0x0d457870, EDI=0x0bae3030
EIP=0x5456b7c9, EFLAGS=0x00210246

Top of Stack: (sp=0x05cbd578)
0x05cbd578:   0d202f60 54580e41 0001 0001
...
0x05cbd5e8:   54a51a88  54510e95 0d2f89a0

Instructions: (pc=0x5456b7c9)
0x5456b7a9:   24 0c 01 75 35 8b 4e 14 8b c1 c1 e8 09 a8 01 75
...
0x5456b7d9:   06 74 07 8b ce e8 4d de ff ff 5e c2 08 00 cc cc


Register to memory mapping:

EAX=0x002e0030 is an unknown value
EBX=0x0011 is an unknown value
ECX=0x0d457870 is an unknown value
EDX=0x is an unknown value
ESP=0x05cbd578 is pointing into the stack for thread: 0x0563d000
EBP=0x is an unknown value
ESI=0x0d457870 is an unknown value
EDI=0x0bae3030 is an unknown value


Stack: [0x05c7,0x05cc],  sp=0x05cbd578,  free space=309k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native
code)
C  [jfxwebkit.dll+0x8eb7c9]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.sun.webkit.WebPage.twkProcessMouseEvent(JIIIZF)Z+0
j
 
com.sun.webkit.WebPage.dispatchMouseEvent(Lcom/sun/webkit/event/WCMouseEvent;)Z+141
j
 
javafx.scene.web.WebView.processMouseEvent(Ljavafx/scene/input/MouseEvent;)V+175
j
 
javafx.scene.web.WebView.lambda$registerEventHandlers$32(Ljavafx/scene/input/MouseEvent;)V+2
j  javafx.scene.web.WebView$$Lambda$87.handle(Ljavafx/event/Event;)V+8
j
 
com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Ljavafx/event/Event;)V+5
j
 
com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Ljavafx/event/Event;)V+28
j
 
com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Ljavafx/event/EventType;Ljavafx/event/Event;)Ljavafx/event/Event;+29
j
 
com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Ljavafx/event/Event;)Ljavafx/event/Event;+8
j
 
com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Ljavafx/event/Event;)Ljavafx/event/Event;+11
j
 
com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Ljavafx/event/Event;Ljavafx/event/EventDispatchChain;)Ljavafx/event/Event;+29
j
 
com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Ljavafx/event/Event;)Ljavafx/event/Event;+69
j
 
com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Ljavafx/event/Event;Ljavafx/event/EventDispatchChain;)Ljavafx/event/Event;+17
j
 
com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Ljavafx/event/Event;)Ljavafx/event/Event;+69
j
 
com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Ljavafx/event/Event;Ljavafx/event/EventDispatchChain;)Ljavafx/event/Event;+17
j
 
com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Ljavafx/event/Event;)Ljavafx/event/Event;+69
j
 
com.sun.javafx.event.EventUtil.fireEventImpl(Ljavafx/event/EventDispatchChain;Ljavafx/event/EventTarget;Ljavafx/event/Event;)Ljavafx/event/Event;+10
j
 
com.sun.javafx.event.EventUtil.fireEvent(Ljavafx/event/EventTarget;Ljavafx/event/Event;)Ljavafx/event/Event;+46
j
 
javafx.event.Event.fireEvent(Ljavafx/event/EventTarget;Ljavafx/event/Event;)V+30
j
 javafx.scene.Scene$MouseHandler.process(Ljavafx/scene/input/MouseEvent;Z)V+491
j
 
javafx.scene.Scene$MouseHandler.access$1500(Ljavafx/scene/Scene$MouseHandler;Ljavafx/scene/input/MouseEvent;Z)V+3
j
 

Re: Subject: JavaFX dependency injection

2015-11-25 Thread Matthieu BROUILLARD
Hi,

This is not a new subject and I guess we already received answers in the
past on this list: JavaFX team does not provide any DI mechanism just like
core java teams do not provide any DI on java-se. What is provided is
"only" the possibility to hook controller factory (which allows already a
lot).

It has been for a while since people started to use DI for JavaFX:
- guice blog post July 2012:
http://andrewtill.blogspot.be/2012/07/creating-javafx-controllers-using-guice.html
- CDI blog post August 2012 :
http://blog.matthieu.brouillard.fr/2012/08/06/fxml-javafx-powered-by-cdi-jboss-weld_6/
- then Adam Bien provided Afterburner in April 2013 :
https://github.com/AdamBien/afterburner.fx
- you can even use another DI engine with afterburner :
http://blog.matthieu.brouillard.fr/2014/12/05/topgun-afterburner-finally-announced/

At AGFA, we used to have our own little CDI based framework to do DI, but
we stopped due to memory consumption of weld-client at that time.

As currently the only information provided by the controller factory is the
controller class I would suggest you to use that instead of a bean id.

And if you want a maintained javafx enabled DI framework, go with
Afterburner or Gluon Ignite.

Matthieu

On Wed, Nov 25, 2015 at 4:29 PM, Nitin Malik  wrote:

> + mailgroup
>
> I dont think its non-standard. We have solved this by creating a factory
> that holds the bean id (and does a lookup when callback is invoked).
> Alternatively, to make the solution Spring-free, the factory can hold the
> controller object.
>
> Both these approaches work, but seem like a work around due to the
> restrictive API.
>
> I would like to get inputs from the Oracle folks on this.
>
> Nitin
>
>
> -- Forwarded message --
> From: Eugene Ryzhikov 
> Date: Tue, Nov 24, 2015 at 8:22 PM
> Subject: Re: Subject: JavaFX dependency injection
> To: Nitin Malik 
> Cc: openjfx-dev 
>
>
> Nitin,
>
> Ignite makes use of standard JavaFX API, which provides only controller
> class as a parameter to a controller factory.
> I imagine you're proposing that access to bean id would be given in some
> non-standard way?
>
> In any case, Ignite is an open source framework, and any type of
> contributions are welcome.
> If you have an idea which can add to existing functionality, please send us
> a pull request. We’ll be glad to discuss it.
>
> Eugene
>
> From: Nitin Malik 
> Date: Tuesday, November 24, 2015 at 8:03 PM
> To: Eugene Ryzhikov 
> Subject: Re: Subject: JavaFX dependency injection
>
> Hi Eugene,
>
> This look promising, but I dont think it addresses the multiple controller
> scenario (#1) I outlined in my original mail.
>
> Specifically looking at this line
> <
> https://bitbucket.org/gluon-oss/ignite/src/c85197b33852b78b1a519dca2b1424314cb899fb/spring/src/main/java/com/gluonhq/ignite/spring/SpringContext.java?at=default=file-view-default#SpringContext.java-89
> >,
> the lookup is by class, not Spring bean. Are there plans to add support for
> this?
>
> Regards,
> Nitin
>
>
> On Tue, Nov 24, 2015 at 4:55 PM, Eugene Ryzhikov 
> wrote:
>
> >
> > At Gluon we’ve open-sourced the framework called Ignite just for this
> > purpose.
> >
> > With this library, developers can use popular dependency injection
> > frameworks in their JavaFX applications, including inside their FXML
> > controllers. Gluon Ignite creates a common abstraction over several
> popular
> > dependency injection frameworks (currently Guice, Spring, and Dagger).
> Full
> > support of JSR-330 makes using dependency injection in JavaFX
> applications
> > trivial.
> >
> > For more information take a look at our blog at
> >
> >
> http://gluonhq.com/announcing-gluon-ignite-easy-javafx-dependency-injection/
> >
> > Eugene
> >
> >
> >
>


Re: Font size, dpi and text crispness (snapping to pixels)

2015-04-16 Thread Matthieu BROUILLARD
In my company at least in the business (healthcare in hospitals) we target
JavaFX for (as a replacement of old app in Swing) we for sure cannot ask
our clients to change their computers/screen to have HiDPI... so having 5K
screens, yes in 2045 perhaps.


On Thu, Apr 16, 2015 at 7:12 PM, Jeff Martin j...@reportmill.com wrote:

 I’m surprised about the font size problem - If I create a font with new
 Font(“Monaco”, 10), text shows up the same size as it does in Eclipse.

 I don’t think there is a solution for the blurry problem, however, because
 there is no way to disable Antialiasing. In Swing, I was able to get crisp
 rendering identical to eclipse by checking for very specific fonts/sizes
 and disabling TEXT_ANTIALIASING.

 The only solution in JavaFX may be to get a Retina monitor. This didn’t
 seem to be a terrible proposition to me last year, when it seemed like
 almost everything from phones to tablets to laptops had gone HiDPI. It’s
 taking forever for the desktop world to catch on, though. Apple is taking
 it’s time. Dell apparently has a nice 5k external, but it needs two mini
 display ports to drive it.

 jeff


 On Apr 16, 2015, at 9:28 AM, Damien Dudouit ddudo...@clio.ch wrote:

  Hello,
 
  I'm experimenting with Java FX on a Windows 7 machine, using Java
 1.8.0_40.
 
  The *javafx.scene.text.*Font javadoc says :
 
  *The size of a Font is described as being specified in points which are a
  real world measurement of approximately 1/72 inch. *
 
  *[...] Note that the real world distances specified by the default
  coordinate system only approximate point sizes as a rule of thumb and are
  typically defaulted to screen pixels for most displays. *
 
  Java FX behaves as if the display dpi is 72 while in my case for instance
  its about 96. 96/72 = 1..
 
  So for instance if I set Font.font(Consolas, FontPosture.REGULAR, 10)
 as
  a font on a javafx.scene.control.TextArea, text appears a lot smaller
 than
  in my eclipse editor configured with the same font.
  Obviously, I get about the same visual size if I use a font size of 13 in
  Java FX while using the same font in size 10 in Eclipse.
 
  I guess I could set scaling somehow in my Java FX code. But using
 scaling,
  I imagine that text has little chance to display as crisp as it should.
 
  In fact, trying to compare the pixel output of Eclipse with font size 10
  and Java FX in font size 13 (or 13.333), the Java FX one is slightly
 blurry.
 
  What can be done in Java FX when an application needs text as clear as
  possible, for instance if the application is a text editor ?
 
  What is the correct approach in a Java FX app so that it respect the
  default font size configured at the OS level ?
 
 
  Thanks a lot in advance,
 
  Damien
 
 
  public final class MyApplication extends Application {
 
   public static void main(String[] args) {
 launch(args);
   }
 
   @Override
   public void start(Stage primaryStage) {
 TextArea editor = new TextArea();
 
 editor.setFont(Font.font(Consolas, FontPosture.REGULAR, 10));
 
 primaryStage.setScene(new Scene(editor));
 primaryStage.show();
 
 System.out.println(Toolkit.getDefaultToolkit().getScreenResolution());
   }
  }




Re: Unit testing recommendations for JavaFX

2015-03-28 Thread Matthieu BROUILLARD
Hi Adam,

At AGFA Healthcare we have been using TestFX for more than a year and a
half now.

Regards,

Matthieu

On Sat, Mar 28, 2015 at 9:13 AM, Adam Granger a...@adamish.com wrote:

 Following migration to JavaFX I've been looking into a unit testing...
 Possible solutions

  - home brew - just code up a few basic methods like find a node with
 given selector within given timeout, then build tests using those using
 JUnit / Mockito. Also used @Rule approach from
 http://stackoverflow.com/a/18988752/898289 for simple tests which didn't
 require any asynchronous behaviour. I was previously using this approach
 until discovered TestFX

  -  Jemmy - seems well documented. Last release 4 years ago - no updates
 since JavaFX 2.2? Is this because its so good, or does anyone know
 whether it has been scrapped? Any plans to update for JavaFX 8?
 https://jemmy.java.net/

  - TestFX - just started dabbling with this - seems a lot better
 maintained that Jemmy, however the new release 4 is still alpha and
 documentation is a little sparse - https://github.com/TestFX/TestFX

  - Squish by FrogLogic - commercial product, but only seems suitable for
 integration level testing. -
 http://doc.froglogic.com/squish/5.1/tutorial-getting-started-java_fx.html

 I'm interested in any recommendations this group might have or experiences
 of solutions I've mentioned...  What solution do OpenJFX / other large FX
 developments use for unit testing?

 Many thanks,

 Adam.




Public way to monitor JavaFX Windows

2014-11-25 Thread Matthieu BROUILLARD
Hi all,

I'd like to know if there is a public way to monitor all root window
JavaFX objects (Window, Stage, PopupWindow).

All what I have found until now is private impl

   - com.sun.javafx.stage.StageHelper.getStages(), observable but relevant
   only for Stages
   - javafx.stage.Window.impl_getWindows(), used inside ScenicView but not
   listenable

If there is not a public API, I'll create a JIRA for this.

Matthieu


Re: JavaFX on headless Jenkins

2014-01-06 Thread Matthieu BROUILLARD
On the linux nodes on travis.org xvfb is used to mimic a GUI environment on
headless nodes.
Have a look at :
http://about.travis-ci.org/docs/user/gui-and-headless-browsers/ you might
be probably able to do something like that on your linux box.

Matthieu