Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 192969

Summary: [misc] Problem replacing with latest from head after making changes and undoing
Product: [Eclipse Project] Platform Reporter: Kim Horne <eclipse>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, g.watson, michschn, pwebster, tomasz.zarna, tonny.madsen
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard: stalebug

Description Kim Horne CLA 2007-06-15 15:00:18 EDT
3.3 RC4

I haven't been able to reproduce this but I managed to get this exception after organizing imports in a java file, saving, undoing a few times, and then replacing with the latest from head.

java.lang.IllegalArgumentException: Illegal value: -1
	at org.eclipse.core.internal.resources.Resource.revertModificationStamp(Resource.java:1459)
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.commitFileBufferContent(ResourceTextFileBuffer.java:366)
	at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.commit(ResourceFileBuffer.java:325)
	at org.eclipse.jdt.internal.ui.javaeditor.DocumentAdapter.save(DocumentAdapter.java:424)
	at org.eclipse.jdt.internal.core.CommitWorkingCopyOperation.executeOperation(CommitWorkingCopyOperation.java:123)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:720)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
	at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:785)
	at org.eclipse.jdt.internal.core.CompilationUnit.commitWorkingCopy(CompilationUnit.java:354)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.commitWorkingCopy(CompilationUnitDocumentProvider.java:1302)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$5.execute(CompilationUnitDocumentProvider.java:1367)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider$DocumentProviderOperation.run(TextFileDocumentProvider.java:129)
	at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:68)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113)
	at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:73)
	at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:63)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:450)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:761)
	at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:4716)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.performSave(CompilationUnitEditor.java:1216)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(CompilationUnitEditor.java:1269)
	at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:6779)
	at org.eclipse.ui.Saveable.doSave(Saveable.java:212)
	at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:339)
	at org.eclipse.ui.internal.SaveablesList$4.run(SaveablesList.java:605)
	at org.eclipse.ui.internal.SaveableHelper$4.run(SaveableHelper.java:266)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
	at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:758)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:755)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2451)
	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:274)
	at org.eclipse.ui.internal.SaveablesList.saveModels(SaveablesList.java:614)
	at org.eclipse.ui.internal.SaveablesList.promptForSaving(SaveablesList.java:578)
	at org.eclipse.ui.internal.Workbench.saveAll(Workbench.java:3482)
	at org.eclipse.ui.ide.IDE$1.run(IDE.java:1152)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.ui.ide.IDE.saveAllEditors(IDE.java:1140)
	at org.eclipse.team.internal.ccvs.ui.actions.CVSAction$6.run(CVSAction.java:573)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:152)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:118)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:3791)
	at org.eclipse.team.internal.ccvs.ui.actions.CVSAction.saveAllEditors(CVSAction.java:568)
	at org.eclipse.team.internal.ccvs.ui.actions.CVSAction.beginExecution(CVSAction.java:216)
	at org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction.beginExecution(WorkspaceAction.java:56)
	at org.eclipse.team.internal.ccvs.ui.actions.CVSAction.run(CVSAction.java:111)
	at org.eclipse.team.internal.ui.actions.TeamAction.runWithEvent(TeamAction.java:511)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:246)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1519)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1295)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2952)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
Comment 1 Eclipse Webmaster CLA 2007-07-29 09:23:05 EDT
Changing OS from Mac OS to Mac OS X as per bug 185991
Comment 2 Dani Megert CLA 2008-05-23 05:45:00 EDT
We've never seen this again and cannot reproduce. Please reopen if you see it again.
Comment 3 Dani Megert CLA 2008-06-10 05:58:08 EDT
Nice, now that I've closed this it happens again :-(
Comment 4 Dani Megert CLA 2008-06-10 05:58:42 EDT
*** Bug 236397 has been marked as a duplicate of this bug. ***
Comment 5 Dani Megert CLA 2009-05-18 04:33:41 EDT
*** Bug 276601 has been marked as a duplicate of this bug. ***
Comment 6 Tonny Madsen CLA 2009-05-18 15:53:26 EDT
I reported bug 276601 with the following (expanded) description:

- In the package explorer, I moved a java file from one package to another
- Opened the file in the new package
- Entered a few characters
- Regretted the move and pressed undo (CTRL-Z) repeatably
- Then realised this did not move the file back and, moved the file back manually again the package explorer

And, yes it is reproducable.

My build ID is unknown (!), but from Galileo RCP Edition M7
Comment 7 Dani Megert CLA 2009-07-07 03:09:02 EDT
*** Bug 282084 has been marked as a duplicate of this bug. ***
Comment 8 Dani Megert CLA 2012-08-03 02:18:07 EDT
*** Bug 386246 has been marked as a duplicate of this bug. ***
Comment 9 Eclipse Genie CLA 2020-04-25 17:02:01 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.