JDK-8189350 : Crash due to ASSERT(url == m_string) fail while loading URL
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8u141,9,10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-10-16
  • Updated: 2017-12-18
  • Resolved: 2017-10-18
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
10Fixed 8u171Fixed
Description
ASSERTION FAILED: url == m_string
/home/murali/Apr_CPU/rt/modules/javafx.web/src/main/native/Source/WebCore/platform/URL.cpp(372) : WebCore::URL::URL(WebCore::ParsedURLStringTag, const WTF::String&)
1   0x7fda6a7c69b3 WTFCrash
2   0x7fda68c4db4e
3   0x7fda693cad84
4   0x7fda693cabc1 Java_com_sun_webkit_network_URLLoader_twkDidFail
5   0x7fdae5b60d35
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fda6a7c69b8, pid=7048, tid=7076
#
# JRE version: Java(TM) SE Runtime Environment (9.0+180) (build 9+180)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (9+180, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libjfxwebkit.so+0x2daa9b8]  WTFCrash+0x23
#
Comments
Changeset: 8c150dbef9c5 Author: mbilla Date: 2017-10-18 19:18 +0530 URL: http://hg.openjdk.java.net/openjfx/10-dev/rt/rev/8c150dbef9c5
18-10-2017

+1
18-10-2017

+1
17-10-2017

webrev: http://cr.openjdk.java.net/~mbilla/8189350/webrev.00/
16-10-2017

This crash is due to calling wrong URL constructor "URL(ParsedURLString, String(env, url)" (which we are not supposed to call) from URL.h [1] [2] URL.h #if PLATFORM(JAVA) bool isJarFile() const { return m_protocolIsInJar; } URL(JNIEnv* env, jstring url) : URL(ParsedURLString, String(env, url)) {} #endif in case of Java_com_sun_webkit_network_URLLoader_twkDidFail (URLLoader.cpp), we pass URL(env, url), to didFail(). URL(env, url) in turn invoking URL(ParsedURLString, String(env, url) which causes assert failure. The correct way to invoke URL constructor is URL(URL(), String(env, url)), which will invoke the correct URL constructor "URL(const URL& base, const String& relative)" [1] https://bugs.webkit.org/show_bug.cgi?id=136451 [2] https://bugs.webkit.org/show_bug.cgi?id=129606
16-10-2017