Open crapo opened 4 years ago
@kittaakos , good memory!! Do we have any idea what causes it or how to fix it? People ask me about it--it's disconcerting to see a stack trace in the console window and as there isn't any SADL code in the stack trace I'm not sure how to catch it, if it is innocuous.
Do we have any idea what causes
Unfortunately, I do not know.
or how to fix it
I tried to find a relevant Eclipse bug, but it was a dead end.
it's disconcerting to see a stack trace in the console window
Yes, I agree.
there isn't any SADL code in the stack trace I'm not sure how to catch it
Maybe it is triggered by an Eclipse resource refresh when we create the implicit models, and the refresh triggers a view refresh; but this is just a guess. I do not know how to consistently reproduce it.
if it is innocuous.
It is.
/**
* Checks if this viewer is currently busy, logging a warning and returning
* <code>true</code> if it is busy. A column viewer is busy when it is
* processing a refresh, add, remove, insert, replace, setItemCount,
* expandToLevel, update, setExpandedElements, or similar method that may
* make calls to client code. Column viewers are not designed to handle
* reentrant calls while they are busy. The method returns <code>true</code>
* if the viewer is busy. It is recommended that this method be used by
* subclasses to determine whether the viewer is busy to return early from
* state-changing methods.
*
* <p>
* This method is not intended to be overridden by subclasses.
* </p>
*
* @return <code>true</code> if the viewer is busy.
*
* @since 3.4
*/
protected boolean checkBusy() {
if (isBusy()) {
if (logWhenBusy) {
String message = "Ignored reentrant call while viewer is busy."; //$NON-NLS-1$
if (!InternalPolicy.DEBUG_LOG_REENTRANT_VIEWER_CALLS) {
// stop logging after the first
logWhenBusy = false;
message += " This is only logged once per viewer instance," + //$NON-NLS-1$
" but similar calls will still be ignored."; //$NON-NLS-1$
}
Policy.getLog().log(
new Status(IStatus.WARNING, Policy.JFACE, message,
new RuntimeException()));
}
return true;
}
return false;
}
@kittaakos , I'm seeing this, which I don't recall seeing before. Any ideas?
!MESSAGE Ignored reentrant call while viewer is busy. This is only logged once per viewer instance, but similar calls will still be ignored. !STACK 0 java.lang.RuntimeException at org.eclipse.jface.viewers.ColumnViewer.checkBusy(ColumnViewer.java:764) at org.eclipse.jface.viewers.ColumnViewer.update(ColumnViewer.java:543) at org.eclipse.ui.navigator.CommonViewer.update(CommonViewer.java:515) at org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:1976) at org.eclipse.ui.internal.navigator.resources.nested.NestedProjectsLabelProvider.lambda$2(NestedProjectsLabelProvider.java:87) at java.util.concurrent.CompletableFuture.uniAccept(Unknown Source) at java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown Source) at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) at java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source) at java.util.concurrent.CompletableFuture$AsyncSupply.exec(Unknown Source) at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)