Bug 29696 - JavaMarkerAnnotation.initialize() can be called in non UI thread.
Summary: JavaMarkerAnnotation.initialize() can be called in non UI thread.
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-17 04:06 EST by Dirk Baeumer CLA
Modified: 2003-02-20 14:04 EST (History)
0 users

See Also:


Attachments
Patch that initializes the image in getImage(); (1.77 KB, patch)
2003-01-17 04:09 EST, Dirk Baeumer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Baeumer CLA 2003-01-17 04:06:48 EST
Build I20020315

Refactoring uses documents and annotation models to actual perform the textual 
changes. Since refactoring operations can be executed in a non UI thread (e.g. 
when executed as an operation) the JavaMarkerAnnotation.initialize() method may 
be called in a non UI thread resulting in an assertion failure due to image 
creation.

Caused by: org.eclipse.jface.util.Assert$AssertionFailedException: null 
argument;
	at org.eclipse.jface.util.Assert.isNotNull(Assert.java:133)
	at org.eclipse.jface.util.Assert.isNotNull(Assert.java:110)
	at org.eclipse.jface.resource.ImageRegistry.<init>
(ImageRegistry.java:51)
	at org.eclipse.jdt.internal.ui.JavaPluginImages.getImageRegistry
(JavaPluginImages.java:341)
	at org.eclipse.jdt.internal.ui.JavaPluginImages.get
(JavaPluginImages.java:317)
	at 
org.eclipse.jdt.internal.ui.javaeditor.JavaMarkerAnnotation.initialize
(JavaMarkerAnnotation.java:111)
	at org.eclipse.ui.texteditor.MarkerAnnotation.<init>
(MarkerAnnotation.java:111)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaMarkerAnnotation.<init>
(JavaMarkerAnnotation.java:53)
	at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$Compilati
onUnitAnnotationModel.createMarkerAnnotation
(CompilationUnitDocumentProvider.java:381)
	at 
org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel.addMarkerAnnotation
(AbstractMarkerAnnotationModel.java:215)
	at 
org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel.catchupWithMarkers
(AbstractMarkerAnnotationModel.java:394)
	at org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel.connected
(AbstractMarkerAnnotationModel.java:228)
	at org.eclipse.jface.text.source.AnnotationModel.connect
(AnnotationModel.java:139)
	at 
org.eclipse.jdt.internal.corext.textmanipulation.TextBufferFactory.acquire
(TextBufferFactory.java:88)
	at org.eclipse.jdt.internal.corext.textmanipulation.TextBuffer.acquire
(TextBuffer.java:371)
	at 
org.eclipse.jdt.internal.corext.codemanipulation.ImportsStructure.aquireTextBuff
er(ImportsStructure.java:538)
	at 
org.eclipse.jdt.internal.corext.codemanipulation.ImportsStructure.<init>
(ImportsStructure.java:85)
	at org.eclipse.jdt.internal.corext.codemanipulation.ImportEdit.<init>
(ImportEdit.java:33)
	at 
org.eclipse.jdt.internal.corext.refactoring.reorg.MoveCuUpdateCreator.getImportE
dit(MoveCuUpdateCreator.java:217)
	at 
org.eclipse.jdt.internal.corext.refactoring.reorg.MoveCuUpdateCreator.addImport
(MoveCuUpdateCreator.java:208)
	at 
org.eclipse.jdt.internal.corext.refactoring.reorg.MoveCuUpdateCreator.addImports
ToDestinationPackage(MoveCuUpdateCreator.java:199)
	at 
org.eclipse.jdt.internal.corext.refactoring.reorg.MoveCuUpdateCreator.createChan
geManager(MoveCuUpdateCreator.java:89)
	at 
org.eclipse.jdt.internal.corext.refactoring.reorg.MoveRefactoring.createChangeMa
nager(MoveRefactoring.java:475)
	at 
org.eclipse.jdt.internal.corext.refactoring.reorg.MoveRefactoring.checkInput
(MoveRefactoring.java:158)
	at org.eclipse.jdt.internal.ui.refactoring.CheckConditionsOperation.run
(CheckConditionsOperation.java:59)
	at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run
(CreateChangeOperation.java:94)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:95)
Comment 1 Dirk Baeumer CLA 2003-01-17 04:09:06 EST
Created attachment 3023 [details]
Patch that initializes the image in getImage();
Comment 2 Dani Megert CLA 2003-02-20 14:04:59 EST
Released proposed patch from Dirk.