Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8088406

Java crashes when accessing DOM elements from outside of application thread

    Details

    • Subcomponent:
      web

      Description

      Reproducible: always for new webkit
      Is a regression: No
      Is a platform specific: reproducible on macos and linux.

      Java crashes when trying to access dom object using WebEngine.execute method.
      Steps to reproduce (example attached):
      1. Create javafx application with webview (gui is non necessary).
      2. Try to access any dom element with javascript: engine.executeScript("document.createElement('span')")
      3. Access that variable (e.g. call toString()) from outside of application thread

      Expected result: a kind of exception is thrown, because webengine objects must be manipulated only from application thread ("WebEngine objects must be created and accessed solely from the JavaFX Application thread. This rule also applies to any DOM and JavaScript objects obtained from the WebEngine object.")

      Actual result: java crashed with segfault.
      1. hs_err_pid4507.log
        72 kB
        Andrey Rusakov
      2. WebkitJSCrash.java
        0.6 kB
        Andrey Rusakov

        Issue Links

          Activity

          Hide
          arusakov Andrey Rusakov added a comment -
          RULE WebNodeAutomated/com/sun/fx/webnode/tests/bridge/BridgeSimpleTest/testDOMObject Crash SIGSEGV
          RULE WebNodeAutomated/com/sun/fx/webnode/tests/bridge/BridgeSimpleTest/testJSObject Crash SIGSEGV
          Show
          arusakov Andrey Rusakov added a comment - RULE WebNodeAutomated/com/sun/fx/webnode/tests/bridge/BridgeSimpleTest/testDOMObject Crash SIGSEGV RULE WebNodeAutomated/com/sun/fx/webnode/tests/bridge/BridgeSimpleTest/testJSObject Crash SIGSEGV
          Hide
          ant Anton Tarasov added a comment -
          The problem, potentially, exists in WebView not depending on a release number. However it started to reproduce in the new WebView update which is not yet integrated: RT-36726.
          Show
          ant Anton Tarasov added a comment - The problem, potentially, exists in WebView not depending on a release number. However it started to reproduce in the new WebView update which is not yet integrated: RT-36726 .

            People

            • Assignee:
              azvegint Alexander Zvegintsev
              Reporter:
              arusakov Andrey Rusakov
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported: