This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269549 - Lost reference to ViewModel in javafx-webkit 8u111
Summary: Lost reference to ViewModel in javafx-webkit 8u111
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Html4j (show other bugs)
Version: 8.2
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-13 07:35 UTC by maxnitribitt
Modified: 2017-01-16 17:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description maxnitribitt 2017-01-13 07:35:34 UTC
javafx-webkit in Java 8u111 and later uses weak references for JavaScript Objects. This  may lead to unwanted GC and invocation of ViewModel's methods don't work.
Comment 1 Jaroslav Tulach 2017-01-13 19:24:26 UTC
Here is the test to show the problem:
https://github.com/jtulach/html-java-api/commit/dc2ec873ce3eda1186d10112b2582a8b5e42c565
Comment 2 Jaroslav Tulach 2017-01-15 05:24:07 UTC
This should be the fix:
https://github.com/jtulach/html-java-api/commit/ba6fa43237047d470e252e52fbcc25f686a06c43
Comment 3 Jaroslav Tulach 2017-01-15 05:43:07 UTC
Removal of debug messages: https://github.com/jtulach/html-java-api/commit/0911610a6446ab7ceddea5f5716f6846b47e155f
Comment 4 maxnitribitt 2017-01-16 14:04:32 UTC
Fix doesn't work for u_102 and causes a new problem. We tried to use the fix with u_102 for a customer project. It doesn't change the behaviour function references seem to still get lost.

Also it causes a new problem. With older versions enum type Properties are no longer correctly converted to String. 

Workaround: replace enums with String 

Unfortunately due to NDA I cannot share the customer project. But we can check in private.
Comment 5 Jaroslav Tulach 2017-01-16 17:52:14 UTC
The enum behavior is now specified, tested and fixed as of
https://github.com/jtulach/html-java-api/commit/d000c1196182c2fa73dd6ed860d126f9187f91e7