JDK-8194265 : Webengine (webkit) crash when reading files using FileReader
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8,9,10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2017-12-28
  • Updated: 2018-06-13
  • Resolved: 2018-01-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 8 Other
10Fixed 8u171Fixed openjfx11Fixed
Related Reports
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :
1.9.01

ADDITIONAL OS VERSION INFORMATION :
Windows 7 and 10

EXTRA RELEVANT SYSTEM CONFIGURATION :
standard setup

A DESCRIPTION OF THE PROBLEM :
if you have following js code, the jvm crashes completely.
... 
var reader=new FileReader()
reader. readAsBinaryString(f) 
These is reproducable on all read methods.

visual studio seems to identify an internal null pointer exception. 

REGRESSION.  Last worked in version 8u152

ADDITIONAL REGRESSION INFORMATION: 
always same result. it's possible to create a filereader instance,  getting file properties, slicing a blob.
but reading crash. 

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See also html5rocks/tutorials/file/dndfiles

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
it's possible to read a file. 

REPRODUCIBILITY :
This bug can be reproduced always.


Comments
Changeset: 36182d670b61 Author: ghb Date: 2018-01-03 15:30 +0530 URL: http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/36182d670b61
03-01-2018

+1
03-01-2018

+1
02-01-2018

+1
02-01-2018

solution : http://cr.openjdk.java.net/~ghb/8194265/webrev.00/ Root Cause : Async File size / read API (FileReader) executed in separate thread in which JNIEnv was not attached to the Main thread. Test : Will be adding Manual test as the FileReader (input source file path) is restricted to Input element ('HtmlInput element' and its 'value' which) value which is a read only property (due to security limitation).
01-01-2018

Issue is reproducible - checked in windows 10. 8 GA : Fail (doesn't crash but doesn't read the file also) 8u144 : Fail (crash) 8u152: Fail 9.0.1+11 : Fail 10-ea+36 : Fail When opened same web page in Chrome browser, i can read the file. But with webview, program crashes with no logs.
29-12-2017