Community
Participate
Working Groups
-- Configuration Details -- Product: Eclipse 4.7.2.20171218-0600 (org.eclipse.epp.package.java.product)Installed Features: org.eclipse.platform 4.7.2.v20171130-0510 Running on Ubuntu 16.04 Error occurs at times when Code Recommenders window opens: Exception in thread "EclipseProjectCoordinateAdvisorService STARTING" java.lang.IllegalArgumentException: assertion failed. at org.eclipse.recommenders.utils.Throws.throwIllegalArgumentException(Throws.java:29) at org.eclipse.recommenders.utils.Checks.ensureIsTrue(Checks.java:254) at org.eclipse.recommenders.utils.Checks.ensureIsTrue(Checks.java:249) at org.eclipse.recommenders.coordinates.DependencyInfo.<init>(DependencyInfo.java:52) at org.eclipse.recommenders.internal.coordinates.rcp.DependencyInfoJsonTypeAdapter.deserialize(DependencyInfoJsonTypeAdapter.java:57) at org.eclipse.recommenders.internal.coordinates.rcp.DependencyInfoJsonTypeAdapter.deserialize(DependencyInfoJsonTypeAdapter.java:1) at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:173) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) at com.google.gson.Gson.fromJson(Gson.java:887) at com.google.gson.Gson.fromJson(Gson.java:852) at com.google.gson.Gson.fromJson(Gson.java:801) at org.eclipse.recommenders.coordinates.rcp.EclipseProjectCoordinateAdvisorService.startUp(EclipseProjectCoordinateAdvisorService.java:172) at com.google.common.util.concurrent.AbstractIdleService$2$1.run(AbstractIdleService.java:54) at com.google.common.util.concurrent.Callables$3.run(Callables.java:93) at java.lang.Thread.run(Thread.java:748) UI becomes partially unresponsive: * Error/warning underlines are not updated. * Mouse input is ignored in main editor. Menus can still be opened and buttons can be clicked (although most don't do anything). * The editor does not scroll when scrolling, only the scrollbar. * Save and Exit buttons in the File menu and toolbar still work * Keyboard input still works, and progress can be saved through Ctrl+Shift+S * Sometimes the main editor keeps Eclipse from closing (all other editors close, but the main one stays as a large white rectangle in the middle of the window. Restarting Eclipse fixes the problem temporarily, but it re-appears rather quickly. Any help would be appreciated, since I prefer using Code Recommenders to reading Javadocs and this bug is quite annoying. :)
Update: The stack trace provided appears every time the Code Recommenders popup opens
(In reply to Aidan Yaklin from comment #1) > Update: The stack trace provided appears every time the Code Recommenders > popup opens * It actually happens only the first time, sorry :)
Hi Aidan, (In reply to Aidan Yaklin from comment #0) > Any help would be appreciated, since I prefer using Code Recommenders to > reading Javadocs and this bug is quite annoying. :) thanks for the compliments and your bug report, of course. To help us analyze what went wrong, can you please provide the following information: - Please attach the following file to this bug: $WORKSPACE/.recommenders/caches/identified-project-coordinates.json - Disable Code Recommenders (Preferences > Code Recommenders > Completions > Enable Code Recommenders code completion) and see if the responsiveness of the UI improves. I can't imagine why the error (IAE while parsing a file) results in a sluggish UI. (In reply to Aidan Yaklin from comment #1) > Update: The stack trace provided appears every time the Code Recommenders > popup opens What exactly do you mean by Code Recommenders popup (content assist aka code completion)? Or something like the "Code Recommenders is enabled" proposal [1] (which should only appear once)? [1] <https://www.eclipse.org/recommenders/manual/#installation>
The identified_project_coordinates.json file looks like this: [[{"location":"C:\\Program Files\\Java\\jdk1.8.0_101","type":"JRE","hints":{"EXECUTION_ENVIRONMENT":"JavaSE-1.8"}},"jre:jre:1.8.0"]] The path is a Windows path because I migrated this workspace from Windows to Ubuntu (this may be causing the exception!) I have found that the exception is unrelated to the bug, so here are some steps to reproduce the problem: 1. Open a Java file and hover over a class or method name to show the Javadoc. 2. Click on the small icon next to the name of the class or method to navigate to it. 3. Hover over another class or method name to show the Javadoc popup. Note that it is blank, and focusing it will turn it black. 4. Open up a code completion popup somewhere. 5. The editors will become unresponsive except the scrollbar. You can save and close Eclipse. 6. Sometimes Eclipse hangs when closing; you may need to kill the process.
Please create few jstack dumps during Eclipse is not responsible, and attach those dumps here.
Created attachment 272725 [details] Thread dump after Javadoc hovers go blank I have created two thread dumps at the critical points in the bug: (1) After the Javadoc hovers stop displaying content (2) After the UI becomes unresponsive
Created attachment 272726 [details] Thread dump after UI becomes unresponsive
I believe there was a webkit bug causing UI hang-ups. Moving to SWT.
Cna you try whether this happend with Photon M5? There have been significant updates in SWT Webkit port.
I tried Photon M5. The glitch occurs, but the UI only lags a bit instead of completely hanging. Javadoc hovers are still glitchy.
(In reply to Aidan Yaklin from comment #10) > I tried Photon M5. The glitch occurs, but the UI only lags a bit instead of > completely hanging. Javadoc hovers are still glitchy. Sounds like this occurred due to dead-lock in the evaluation logic. (Recursive evaluate). In 4.8 M6 I've fixed a situation where a recursive evaluate() could cause a hang: 527564 – [Webkit2] Deadlock due to blocking javascript execution in a synchronous callback from webkit2 https://bugs.eclipse.org/bugs/show_bug.cgi?id=527564 The fix is to ignore return value in the case where evaluate() is called recursively, this preventing the first evaluate waiting on the second one and the second one not starting because the first one is still waiting for the second one to finish. ~This is what's happening on OSX/Win32, so I don't expect issues. I've also resolved other such issues (looking at initial thread dump). Can you please test with nightly: (like Integration build): http://download.eclipse.org/eclipse/downloads/ If issue persists, you should see a trace in the console. Please post here along with detailed steps to reproduce. ----- As a note, if you see a momentary (3 second) ii-unresponsiveness with Webkit.evaluate involved, I should be told about it along with a stack trace. But to my knowledge there shouldn't be any such issues as of recent builds.
Tried eclipse-platform-M20180221-0535-linux-gtk-x86_64 for the bug. Javadoc hovers still become blank after clicking the icon, and the hangup still appears when using code completion. Eclipse does not hang when closing, however. Here are steps to reproduce this: 1. Create a Java project 2. Add a HelloWorld class with this code: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } 3. Hover over System to view its Javadoc 4. Click on the small green 'C' icon next to 'java.lang.System' in the hover. The source code for System (if JDK source code is installed) will appear. 5. Go back to the HelloWorld class and hover over an element to show its Javadoc. The hover will be blank. 6. Try adding another System.out.println() to the main method. This will cause the editor window and much of the UI to become unresponsive.
(In reply to Aidan Yaklin from comment #12) > Tried eclipse-platform-M20180221-0535-linux-gtk-x86_64 for the bug. Javadoc > hovers still become blank after clicking the icon, and the hangup still > appears when using code completion. Eclipse does not hang when closing, > however. > > Here are steps to reproduce this: > 1. Create a Java project > 2. Add a HelloWorld class with this code: > > public class HelloWorld { > public static void main(String[] args) { > System.out.println("Hello World!"); > } > } > > 3. Hover over System to view its Javadoc > 4. Click on the small green 'C' icon next to 'java.lang.System' in the > hover. The source code for System (if JDK source code is installed) will > appear. > 5. Go back to the HelloWorld class and hover over an element to show its > Javadoc. The hover will be blank. > 6. Try adding another System.out.println() to the main method. This will > cause the editor window and much of the UI to become unresponsive. Thank you for steps to reproduce. When I click the icon, I can reproduce the issue. Will investigate.
I think this bug and this guy are related: 494158 – [Webkit1][Webkit2] JVM crash when javadoc hover has <embed> tags https://bugs.eclipse.org/bugs/show_bug.cgi?id=494158 Icons are probably using <embed svg> of sort, which for some reason kills webkit, but only if it's in a javadoc, not in a regular browser window.
I noticed that if a link links to an image, it also kills Webkit. E.g: /** * <a href="https://bugs.eclipse.org/bugs/attachment.cgi?id=272647">Screenshot </a> */
The issue seems to be specific to Javadoc Hover. The issue doesn't occur in the Javadoc View. Seems like there is some race condition between browser trying to load the image and browser being closed. ~Investigating.
I setup a Fedora 26 vm. The issue doesn't occur on Webkit1 but (on the same VM) occurs on Webkit2. So this is a regression. ~Investigating.
Observations: - The issue only occurs starting with WebkitGtk 2.18. (I.e, does not occur with 2.16). - Further, webkit doesn't crash, but instead seems to deadlock on disposal. If I manually kill off the WebKitNetworkProcess & WebKitWebProcess then new javadoc instances display correctly. - I checked, not-adding the reference from fix: 522733 – [Gtk][Webkit2] Crash on close with webkitgtk 2.18 https://bugs.eclipse.org/bugs/show_bug.cgi?id=522733 Doesn't change the behaviour, but it looks like disposal changes in WebKitGtk2.18 somehow influence this issue as well. I will continue to investigate the disposal deadlock.
New Gerrit change created: https://git.eclipse.org/r/120730
Gerrit change https://git.eclipse.org/r/120730 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=6b73a19165f47cd767b060aa616bc877b5fc2d99
Fixed via: https://git.eclipse.org/r/#/c/120730/ (see description for details). Thank you for this bug report.