Bug 494158 - [Webkit1][Webkit2] JVM crash when javadoc hover has <embed> tags
Summary: [Webkit1][Webkit2] JVM crash when javadoc hover has <embed> tags
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-05-20 09:06 EDT by Alexander Levsha CLA
Modified: 2018-04-04 15:12 EDT (History)
2 users (show)

See Also:


Attachments
example repro (120 bytes, text/x-java)
2016-05-20 09:06 EDT, Alexander Levsha CLA
no flags Details
jvm crashdump (112.72 KB, text/plain)
2016-05-20 09:08 EDT, Alexander Levsha CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Levsha CLA 2016-05-20 09:06:35 EDT
Created attachment 261892 [details]
example repro

In Java editor when hovering on Java element whose javadoc contains <embed svg> tags Eclipse hangs and JVM crashes shortly after.

Reproducible both with GTK2 and GTK3 on Ubuntu 14.04 32 and 64 bit.

A real world example of this issue is ANTLR's ATNState class that uses SVGs in its javadoc.
http://www.antlr.org/api/Java/org/antlr/v4/runtime/atn/ATNState.html
Comment 1 Alexander Levsha CLA 2016-05-20 09:08:04 EDT
Created attachment 261893 [details]
jvm crashdump
Comment 2 Alexander Kurtakov CLA 2017-12-06 05:01:32 EST
Even trying to open the referenced svg file(https://upload.wikimedia.org/wikipedia/commons/b/bd/Test.svg) in internal web browser doesn't work (browser does nothing). Leo, please investigate.
Comment 3 Alexander Kurtakov CLA 2017-12-06 05:07:24 EST
Ooops, my mistake. Internal browser works proper but when hovering over class A it actually opens Web Browser editor instead of rendering in the popup.
Comment 4 Leo Ufimtsev CLA 2017-12-06 13:41:43 EST
Yea, it seems specific to the javadoc 'hover'.

It opens the page in a new external browser for some reason.

Webkit1 just crashes
Webkit2 sort of hangs, doesn't render properly.

Hmmm.
Comment 5 Leo Ufimtsev CLA 2018-04-02 12:20:46 EDT
As a note, this is not a duplicate of:
530678 – [webkit2] UI hangs after navigating through Javadoc hover, when clicking an icon or link to an image.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=530678

This issue occurs on webkit1 & webkit2. The other is webkit2 specific.
Comment 6 Leo Ufimtsev CLA 2018-04-04 10:55:30 EDT
Note to self:

Offending javadoc:
/**
 * <embed src="https://upload.wikimedia.org/wikipedia/commons/b/bd/Test.svg" type="image/svg+xml"/>
 */

On Windows, this opens a new Browser tab when hoving with mouse over javadoc.
Comment 7 Leo Ufimtsev CLA 2018-04-04 15:12:26 EDT
Fixed via:
https://git.eclipse.org/r/#/c/120730/

Thank you for this bug report.