Bug 21437 - [Tasks] Stale Tasks View
Summary: [Tasks] Stale Tasks View
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: 2.1   Edit
Assignee: Chris McLaren CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 22537 22657 24080 33481 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-07-10 09:40 EDT by Felix Wong CLA
Modified: 2003-03-04 15:30 EST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Wong CLA 2002-07-10 09:40:23 EDT
Stale Tasks View
Driver: GM1


After working with the driver long enough, the Tasks view will not get updated 
even after
fixed some errors.  The IDE will not be usable after that because you can't 
trust the 
Tasks view anymore.  

!ENTRY org.eclipse.core.resources 4 2 Jul 09, 2002 18:29:12.737
!MESSAGE Problems occurred when invoking code from plug-in: 
"org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.j
ava(Compiled Code))
        at 
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java(Com
piled Code))
        at 
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.
java(Compiled Code))
        at 
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.
java(Compiled Code))
        at 
org.eclipse.core.internal.events.NotificationManager.broadcastChanges(Notificati
onManager.java:67)
        at 
org.eclipse.core.internal.resources.Workspace.broadcastChanges(Workspace.java:13
3)
        at 
org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java(Compil
ed Code))
        at 
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1366)
        at 
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.jav
a:78)
        at 
org.eclipse.ui.texteditor.AbstractTextEditor.performSaveOperation(AbstractTextEd
itor.java:2120)
        at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.performSaveOperatio
n(CompilationUnitEditor.java:664)
        at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(CompilationU
nitEditor.java:712)
        at org.eclipse.ui.internal.EditorManager$11.run(EditorManager.java:987)
        at org.eclipse.ui.internal.EditorManager$8.run(EditorManager.java:856)
        at 
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:29
9)
        at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:249)
        at 
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:394)
        at 
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java(Compiled 
Code))
        at 
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:391)
        at 
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1105)
        at 
org.eclipse.ui.internal.EditorManager.runProgressMonitorOperation(EditorManager.
java:862)
        at 
org.eclipse.ui.internal.EditorManager.saveEditor(EditorManager.java:992)
        at 
org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:1922)
        at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:32)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:749)
        at 
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionCont
ributionItem.java:407)
        at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(Actio
nContributionItem.java(Compiled Code))
        at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(Actio
nContributionItem.java(Compiled Code))
        at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(Actio
nContributionItem.java(Compiled Code))
        at 
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled 
Code))
        at 
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code))
        at org.eclipse.ui.internal.Workbench.run(Workbench.java:1160)
        at 
org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:77
5)
        at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:248)
        at org.eclipse.core.launcher.Main.run(Main.java:698)
        at org.eclipse.core.launcher.Main.main(Main.java:534)
!ENTRY org.eclipse.core.resources 4 2 Jul 09, 2002 18:30:02.488
!MESSAGE Problems occurred when invoking code from plug-in: 
"org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.j
ava(Compiled Code))
        at 
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java(Com
piled Code))
        at 
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.
java(Compiled Code))
        at 
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.
java(Compiled Code))
        at 
org.eclipse.core.internal.events.NotificationManager.broadcastChanges(Notificati
onManager.java:67)
        at 
org.eclipse.core.internal.resources.Workspace.broadcastChanges(Workspace.java:13
3)
        at 
org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java(Compil
ed Code))
        at 
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1366)
        at 
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.jav
a:78)
        at 
org.eclipse.ui.texteditor.AbstractTextEditor.performSaveOperation(AbstractTextEd
itor.java:2120)
        at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.performSaveOperatio
n(CompilationUnitEditor.java:664)
        at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(CompilationU
nitEditor.java:712)
        at org.eclipse.ui.internal.EditorManager$11.run(EditorManager.java:987)
        at org.eclipse.ui.internal.EditorManager$8.run(EditorManager.java:856)
        at 
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:29
9)
        at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:249)
        at 
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:394)
        at 
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java(Compiled 
Code))
        at 
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:391)
        at 
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1105)
        at 
org.eclipse.ui.internal.EditorManager.runProgressMonitorOperation(EditorManager.
java:862)
        at 
org.eclipse.ui.internal.EditorManager.saveEditor(EditorManager.java:992)
        at 
org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:1922)
        at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:32)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:749)
        at 
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionCont
ributionItem.java:407)
        at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(Actio
nContributionItem.java(Compiled Code))
        at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(Actio
nContributionItem.java(Compiled Code))
        at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(Actio
nContributionItem.java(Compiled Code))
        at 
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled 
Code))
        at 
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code))
        at org.eclipse.ui.internal.Workbench.run(Workbench.java:1160)
        at 
org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:77
5)
        at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:248)
        at org.eclipse.core.launcher.Main.run(Main.java:698)
        at org.eclipse.core.launcher.Main.main(Main.java:534)
!ENTRY org.eclipse.core.resources 4 2 Jul 09, 2002 18:32:20.717
!MESSAGE Problems occurred when invoking code from plug-in: 
"org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.j
ava(Compiled Code))
        at 
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java(Com
piled Code))
        at 
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.
java(Compiled Code))
        at 
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.
java(Compiled Code))
        at 
org.eclipse.core.internal.events.NotificationManager.broadcastChanges(Notificati
onManager.java:67)
        at 
org.eclipse.core.internal.resources.Workspace.broadcastChanges(Workspace.java:13
3)
        at 
org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java(Compil
ed Code))
        at 
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1366)
        at 
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.jav
a:78)
        at 
org.eclipse.ui.texteditor.AbstractTextEditor.performSaveOperation(AbstractTextEd
itor.java:2120)
        at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.performSaveOperatio
n(CompilationUnitEditor.java:664)
        at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(CompilationU
nitEditor.java:712)
        at org.eclipse.ui.internal.EditorManager$11.run(EditorManager.java:987)
        at org.eclipse.ui.internal.EditorManager$8.run(EditorManager.java:856)
        at 
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:29
9)
        at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:249)
        at 
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:394)
        at 
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java(Compiled 
Code))
        at 
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:391)
        at 
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1105)
        at 
org.eclipse.ui.internal.EditorManager.runProgressMonitorOperation(EditorManager.
java:862)
        at 
org.eclipse.ui.internal.EditorManager.saveEditor(EditorManager.java:992)
        at 
org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:1922)
        at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:32)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:749)
        at 
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionCont
ributionItem.java:407)
        at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(Actio
nContributionItem.java(Compiled Code))
        at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(Actio
nContributionItem.java(Compiled Code))
        at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(Actio
nContributionItem.java(Compiled Code))
        at 
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled 
Code))
        at 
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code))
        at org.eclipse.ui.internal.Workbench.run(Workbench.java:1160)
        at 
org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:77
5)
        at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:248)
        at org.eclipse.core.launcher.Main.run(Main.java:698)
        at org.eclipse.core.launcher.Main.main(Main.java:534)
Comment 1 Scott Rich CLA 2002-07-11 23:01:40 EDT
I've also experienced this problem, but can't reproduce it at will.  The effect 
of it is very disconcerting, you start to lose confidence in the Tasks list.  
Looking at the failing method, it's hard to imagine where the NPE comes 
from...  
Comment 2 Nick Edgar CLA 2002-08-07 15:33:10 EDT
The stack dumps indicate that this code has been JIT'ed.
It's conceivable that this is a dup of bug 21761 if it inlined the calls to 
isAffectedBy and checkResource.
Comment 3 Felix Wong CLA 2002-08-19 14:26:24 EDT
I have a reproducible test case for WSAD, but not for Eclipse.

1. Download this file from http://examples.oreilly.com/jserverpages/jspbook.zip
2. On a fresh WSAD workspace, create a java project JP
3. Import the zip (only the com folder under src) into workspace 
4. I got the following stack trace immediately

!ENTRY org.eclipse.core.resources 4 2 Aug 19, 2002 14:30:49.407
!MESSAGE Problems occurred when invoking code from plug-in: 
"org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.ui.views.tasklist.TaskListContentProvider.resourceChanged(TaskListCo
ntentProvider.java(Compiled Code))
        at 
org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.j
ava:128)
        at 
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:831
)
        at org.eclipse.core.runtime.Platform.run(Platform.java:416)
        at 
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.
java:143)
        at 
org.eclipse.core.internal.events.NotificationManager.broadcastChanges(Notificati
onManager.java:67)
        at 
org.eclipse.core.internal.resources.Workspace.broadcastChanges(Workspace.java:13
3)
        at 
org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:741)
        at 
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1366)
        at 
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.jav
a:78)
        at 
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.jav
a:98)



Comment 4 Scott Rich CLA 2002-08-21 17:45:16 EDT
I've recreated this today, but can't say exactly how I got there.  I have a few 
more clues here in this broken workbench.  It seems that it is definitely 
related to the filter.  The problem goes away if I turn off the tasks list 
filter.  If I turn on any filter, in this particular case, it refers to an 
exaggerated number of tasks.  For example, there are only 30 real tasks in my 
workspace, and with no filter I see "Tasks (30 items".  If I turn the filter 
on, switching to "on selected resource and its children", I see (Filter matched 
0 of 639 items)".  I had a project a couple hours ago which did have 600+ 
errors in it, and I deleted it.  Maybe those tasks are still hanging around 
somewhere?
Comment 5 Chris McLaren CLA 2002-08-22 11:20:28 EDT
still not reproducable on eclipse. moving target milestone to 2.1 awaiting 
complete rework of taskview.
Comment 6 Felix Wong CLA 2002-08-23 10:50:12 EDT
With the JIT on, it is almost 100% reproducible on WSAD (WB2.01) with IBM JRE 
cn131-20020710.  I followed the instruction from Chris to disable the JIT.  I 
was not able to reproduce the problem anymore.  I also tried Chris's suggestion 
to run WSAD on Sun's JRE 1.3.1 (without turning JIT off) and I was not able to 
reproduce the problem too.
Comment 7 Chris McLaren CLA 2002-08-23 13:24:57 EDT
*** Bug 22657 has been marked as a duplicate of this bug. ***
Comment 8 Chris McLaren CLA 2002-09-03 09:50:06 EDT
for those interested, the jit can be disabled on the IBM VM like so:
eclipse -vm d:\jdk1.3.1\jre\bin\java -debug -vmargs -Djava.compiler=NONE

note that if you are providing other arguments to eclipse, the -vmargs argument 
must appear last.
Comment 9 Scott Rich CLA 2002-09-03 11:22:22 EDT
That workaround is a little too drastic, performance with JAVA_COMPILER=none is 
something like 40% slower.  This more specific workaround will have less of a 
performance impact.  Set the following environment variable for your eclipse 
execution:
set JITC_COMPILEOPT=SKIP{org/eclipse/ui/views/tasklist/TaskListContentProvider}
{resourceChanged}
Comment 10 Chris McLaren CLA 2002-09-05 11:15:37 EDT
*** Bug 22537 has been marked as a duplicate of this bug. ***
Comment 11 Chris McLaren CLA 2002-09-05 11:18:08 EDT
as it seems to be agreed that this is a JIT problem, i'm considering this workaround as the 
fix in this case.
Comment 12 Pat McCarthy CLA 2002-09-12 14:48:21 EDT
Work-around is the short term fix.  Long term is fixing the JRE/JIT.
A Java problem has been opened with the JRE provider.

A WSWB/Eclipse platform specific test case has been identified and passed on to 
JRE/WSWB support teams.
Comment 13 Chris McLaren CLA 2003-02-13 12:07:57 EST
*** Bug 24080 has been marked as a duplicate of this bug. ***
Comment 14 Nick Edgar CLA 2003-03-04 14:02:54 EST
Pat, if you have a reproduceable use case against Eclipse, can we get the steps 
please?

Thanks,
Nick
Comment 15 Nick Edgar CLA 2003-03-04 14:03:39 EST
*** Bug 33481 has been marked as a duplicate of this bug. ***
Comment 16 Nick Edgar CLA 2003-03-04 14:04:08 EST
Chris made some changes to see if we can throw off the JIT problem.
But we would like to test against your reproduceable case if possible.
Comment 17 Pat McCarthy CLA 2003-03-04 14:25:44 EST
I had one once.... I'll search and see if I can find the exact script (It was 
written up to send of to Java-land in Hursley).  It was based on a large import 
of raw materials for a class where errors were due to plug-ins not yet known to 
the platform.  

Unless I hear different, I'll assume I should try this using RC1.
Comment 18 Nick Edgar CLA 2003-03-04 15:30:33 EST
The problem should still be there in RC1.
Chris's changes, to attempt to get the JIT to go down a different path, just 
went in today, and will be in for RC2.