ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée (JIRA) <j...@apache.org>
Subject [jira] Commented: (IVYDE-132) NPE in org.apache.ivyde.eclipse.IvyPlugin.getIvy
Date Wed, 12 Nov 2008 18:23:44 GMT

    [ https://issues.apache.org/jira/browse/IVYDE-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646991#action_12646991
] 

Nicolas Lalevée commented on IVYDE-132:
---------------------------------------

I already seen that kind of errors, I think every issues regarding display thread has been
fixed while the refactoring done with IVYDE-112 and IVYDE-116: now the classpath container
is always created without any errors, but it does launch the resolve job that may trigger
(handle by eclipse so in the UI thread) some popup errors.

> NPE in org.apache.ivyde.eclipse.IvyPlugin.getIvy
> ------------------------------------------------
>
>                 Key: IVYDE-132
>                 URL: https://issues.apache.org/jira/browse/IVYDE-132
>             Project: IvyDE
>          Issue Type: Bug
>          Components: classpath container
>    Affects Versions: 2.0.0.alpha1
>         Environment: Eclipse 3.2.2 / Rational v7.0 (pre 7.5)
>            Reporter: Mladen Maravic
>            Priority: Minor
>
> Sometimes, IvyDE would cause the following errors to be logged into the Eclipse error
log:
> java.lang.NullPointerException
> 	at org.eclipse.jface.dialogs.IconAndMessageDialog.getSWTImage(Unknown Source)
> 	at org.eclipse.jface.dialogs.IconAndMessageDialog.getWarningImage(Unknown Source)
> 	at org.eclipse.jface.dialogs.MessageDialog.<init>(Unknown Source)
> 	at org.eclipse.jface.dialogs.MessageDialog.openWarning(Unknown Source)
> 	at org.apache.ivyde.eclipse.IvyPlugin.getIvy(Unknown Source)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainer.computeClasspathEntries(Unknown
Source)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainer.scheduleRefresh(Unknown
Source)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvyClasspathInitializer.initialize(Unknown Source)
> 	at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(Unknown Source)
> 	at org.eclipse.jdt.internal.core.JavaModelManager$8.run(Unknown Source)
> 	at org.eclipse.core.internal.resources.Workspace.run(Unknown Source)
> 	at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(Unknown Source)
> 	at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(Unknown Source)
> 	at org.eclipse.jdt.core.JavaCore.getClasspathContainer(Unknown Source)
> 	at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(Unknown Source)
> 	at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(Unknown Source)
> 	at org.eclipse.jdt.internal.core.DeltaProcessingState.initializeRoots(Unknown Source)
> 	at org.eclipse.jdt.core.JavaCore.initializeAfterLoad(Unknown Source)
> 	at org.eclipse.jdt.internal.ui.InitializeAfterLoadJob$RealJob.run(Unknown Source)
> 	at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)
> (I've seen instances where line number are present!).
> This is due to the fact that the org.apache.ivyde.eclipse.IvyPlugin.getIvy() method uses
MessageDialog.openWarning method. MessageDialog uses Display.getCurrent() internally. This
results in errors if MessageDialog.openXXXX is used outside of the UI thread. 
> To correct this, every MessageDialog.openXYZ in getIvy method should be surrounded by
this code:
> Display.getDefault().asyncExec(new Runnable() {
>       public void run() {
>             MessageDialog.openXYZ(.......);
>        }
> });

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message