Project

General

Profile

Actions

Task #1042

closed

org.eclipse.swt.SWTException: Invalid thread access in TreeDB$1.changed

Added by Alexey Khoroshilov over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
High
Category:
-
Target version:
Start date:
04/07/2011
Due date:
% Done:

0%

Estimated time:
Detected in build:
0.10.61
Published in build:
0.11.80

Description

При импорте нескольких (4-х) документов получил вот такой exception:

null
Error
Thu Apr 07 10:05:38 MSD 2011
Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".

org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4083)
at org.eclipse.swt.SWT.error(SWT.java:3998)
at org.eclipse.swt.SWT.error(SWT.java:3969)
at org.eclipse.swt.widgets.Widget.error(Widget.java:466)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:404)
at org.eclipse.swt.widgets.Widget.getData(Widget.java:492)
at org.eclipse.jface.viewers.AbstractTreeViewer.getTreePathFromItem(AbstractTreeViewer.java:2869)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalGetWidgetToSelect(AbstractTreeViewer.java:1684)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand(AbstractTreeViewer.java:1579)
at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2466)
at org.eclipse.ui.navigator.CommonViewer.setSelectionToWidget(CommonViewer.java:446)
at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2903)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1429)
at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:403)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1383)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1512)
at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:548)
at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:350)
at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:510)
at com.unitesk.requality.eclipse.views.RequalityCNF$2.changed(RequalityCNF.java:79)
at com.unitesk.requality.core.TreeDB$1.changed(TreeDB.java:92)
at com.unitesk.requality.eclipse.tools.DeltaProcessor.processChange(DeltaProcessor.java:147)
at com.unitesk.requality.eclipse.tools.DeltaProcessor.processDelta(DeltaProcessor.java:55)
at com.unitesk.requality.eclipse.tools.DeltaProcessor.resourceChanged(DeltaProcessor.java:34)
at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:327)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1181)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1984)
at org.eclipse.team.svn.core.utility.ProgressMonitorUtility$1.run(ProgressMonitorUtility.java:58)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Воспроизводится не всегда, но часто.


Files

Import_error.png (24.7 KB) Import_error.png Viktoria Kopach, 04/12/2011 12:36 PM

Related issues 1 (0 open1 closed)

Related to Requality - User Story #886: Вывод результатов анализа и переноса разметкиClosedVladimir Fedotov02/24/2011

Actions
Actions #1

Updated by Alexey Demakov over 13 years ago

Такое же исключение вылетело при попытке удалить требование. В Requality Explorer оно осталось, а на самом деле удалилось. F5 не помогло, помогло только закрыть/открыть проект.

Actions #2

Updated by Yuriy Shekochihin over 13 years ago

  • Status changed from New to Resolved

Поправил.
Вроде не воспроизводится.

Actions #3

Updated by Alexey Demakov over 13 years ago

  • Published in build set to 0.10.64
Actions #4

Updated by Viktoria Kopach over 13 years ago

Воспроизводится, и периодически.

У меня сценарий такой:
1)Открываю окно импорта, нажимаю Browse, выбираю в открывшемся окне два документа, нажимаю "Открыть". В окне импорта в выпадающем списке будут отображаться оба выбранных документа. Далее как обычно, выбираю целевую папку, нажимаю Finish.
Результат: появляется окно, как обычно бывает при ошибке, но в нем ничего не написано. В целевой папке находится только один из двух выбранных документов.
2)Пытаюсь добавить в эту же папку второй документ, который сразу не добавился. Импорт не удается, появляется окно с сообщением об ошибке (приложена картинка).
Содержимое Error log:

org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4083)
at org.eclipse.swt.SWT.error(SWT.java:3998)
at org.eclipse.swt.SWT.error(SWT.java:3969)
at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
at org.eclipse.swt.widgets.Widget.getData(Widget.java:525)
at org.eclipse.jface.viewers.AbstractTreeViewer.getTreePathFromItem(AbstractTreeViewer.java:2869)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalGetWidgetToSelect(AbstractTreeViewer.java:1684)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand(AbstractTreeViewer.java:1579)
at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2466)
at org.eclipse.ui.navigator.CommonViewer.setSelectionToWidget(CommonViewer.java:446)
at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2903)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1429)
at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:403)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1383)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1512)
at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:548)
at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:350)
at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:510)
at com.unitesk.requality.eclipse.views.RequalityCNF$2.added(RequalityCNF.java:87)
at com.unitesk.requality.core.TreeDB$1.created(TreeDB.java:70)
at com.unitesk.requality.eclipse.tools.DeltaProcessor.processDelta(DeltaProcessor.java:81)
at com.unitesk.requality.eclipse.tools.DeltaProcessor.resourceChanged(DeltaProcessor.java:34)
at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:327)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1181)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1984)
at org.eclipse.team.svn.core.utility.ProgressMonitorUtility$1.run(ProgressMonitorUtility.java:58)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Actions #5

Updated by Alexey Demakov over 13 years ago

Информация к размышлению для разработчиков:
Stack Overflow: How to diagnose an Invalid thread access SWTException?

There's only one UI thread in Eclipse. In a nutshell, the rules are:

If you got called as part of a UI operation (e.g. event handler, view initialization) you are in the UI thread.
All other operations that invoke a UI (e.g. a job which needs to show a dialog or send information to a view which modifies a widget) - need to sync with the UI thread.

This is basically done like this:

 Display.getDefault().syncExec( new Runnable() {  public void run() { });

Official Eclipse FAQ Why do I get an invalid thread access exception?

Actions #6

Updated by Alexey Khoroshilov over 13 years ago

  • Target version changed from 0.10 to 0.11
  • Published in build deleted (0.10.64)
Actions #7

Updated by Alexey Khoroshilov over 13 years ago

  • Parent task deleted (#997)
Actions #8

Updated by Alexey Khoroshilov over 13 years ago

  • Target version changed from 0.10 to 0.11
Actions #9

Updated by Yuriy Shekochihin over 13 years ago

  • Status changed from Open to Resolved

На последней версии не повторяется

Actions #10

Updated by Yuriy Shekochihin over 13 years ago

  • Published in build set to 0.11.80
Actions #11

Updated by Viktoria Kopach over 13 years ago

  • Status changed from Resolved to Verified
Actions #12

Updated by Viktoria Kopach over 13 years ago

  • Assignee set to Alexey Khoroshilov
Actions #13

Updated by Alexey Khoroshilov over 13 years ago

  • Status changed from Verified to Closed
Actions

Also available in: Atom PDF