Community
Participate
Working Groups
On https://git.eclipse.org/r/#/c/129022/ , it was identified that in some not-yet-clearly-determined cases, async completion can lead to a StackOverflowError ... at org.eclipse.jface.text.contentassist.CompletionProposalPopup.getSelectedProposal(CompletionProposalPopup.java:940) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.setProposals(CompletionProposalPopup.java:1180) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run(CompletionProposalPopup.java:376) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.getSelectedProposal(CompletionProposalPopup.java:940) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.setProposals(CompletionProposalPopup.java:1180) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run(CompletionProposalPopup.java:376) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.getSelectedProposal(CompletionProposalPopup.java:940) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.setProposals(CompletionProposalPopup.java:1180) ... It was seen on Windows and Linux, using the Java async completion proposal of bug 531061. Auditing the code, it seems like the "filterProposals" is always called in the meantime leading to this stack. The main goal seems to be reducing the cases when filterProposals is called in AsyncCompletionProposalPropup, and make sure it's not invoked too early.
This is hopefully fixed.
Gerrit change https://git.eclipse.org/r/153492 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=90e69fcf2b64d43dade977d6b1de50ae70c9d2f4
This causes regression in testAsyncFailureStackOverflow test. https://download.eclipse.org/eclipse/downloads/drops4/I20191211-1805/testresults/html/org.eclipse.jface.text.tests_ep415I-unit-cen64-gtk3-java8_linux.gtk.x86_64_8.0.html Failed to execute runnable (java.lang.NullPointerException) org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:4720) at org.eclipse.swt.SWT.error(SWT.java:4635) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:188) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4910) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4432) at org.eclipse.jface.text.tests.util.DisplayHelper.driveEventQueue(DisplayHelper.java:126) at org.eclipse.jface.text.tests.util.DisplayHelper.waitForCondition(DisplayHelper.java:63) at org.eclipse.jface.text.tests.util.DisplayHelper.sleep(DisplayHelper.java:105) at org.eclipse.jface.text.tests.contentassist.AsyncContentAssistTest.testAsyncFailureStackOverflow(AsyncContentAssistTest.java:68) ... Caused by: java.lang.NullPointerException at org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.lambda$4(AsyncCompletionProposalPopup.java:241) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185) ... 72 more
Thanks Andrey, This is not a regression since the test was added as part of the commit, but it reveals a possible bug. I'll fix it soon.
New Gerrit change created: https://git.eclipse.org/r/154385
Gerrit change https://git.eclipse.org/r/154385 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=049ef41111aa28b068b62d6e6385e664a96472b9
Patch was merged and should prevent this NPE from happening. I'm leaving this bug open for a few days to check test results and verify it did actually fix the tests. If anyone sees a failure before I do, please post here.
3 builds happened since last patch was merged, and no failure was reported. Let'smark it foxed and reopen if needed.