Skip to content

Commit

Permalink
Workaround fix for JVM Crash Issue while refreshing 'ProblemTreeViewer'
Browse files Browse the repository at this point in the history
This workaround ensures that the action is performed on the display thread properly. However, the bug still exists in the SWT/JFace which needs to be fixed. Other plugins using `getTreeViewer().refresh()` from `PackageExplorerPart` are prone to crash the JVM as well.

Fixes bndtools#4854
Signed-off-by: Amit Kumar Mondal <admin@amitinside.com>
  • Loading branch information
amitjoy committed Sep 28, 2021
1 parent 5c0a464 commit 2bfd056
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions bndtools.core/src/bndtools/explorer/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,8 @@ void onUpdate(Runnable runnable) {

void update() {
dirty.set(true);
if (Display.getCurrent() == null) {
Display.getDefault()
.asyncExec(this::update0);
} else {
update0();
}
Display.getDefault()
.asyncExec(this::update0);
}

private void update0() {
Expand Down

0 comments on commit 2bfd056

Please # to comment.