Community
Participate
Working Groups
Build 20021210 Running the internal JDT Core test suites (not available on dev.eclipse.org), one of the test runs into an infinite loop while attempting to rename a folder. Here is the stack when I suspended the main thread: Thread [main] (Suspended) Path.computeSegments(String) line: 395 Path.initialize(String, String) line: 504 Path.<init>(String) line: 98 HistoryStoreEntry.getPath() line: 94 HistoryStore$1.visit(HistoryStoreEntry) line: 201 HistoryStore.accept(byte[], IHistoryStoreVisitor, boolean) line: 57 HistoryStore.accept(IPath, IHistoryStoreVisitor, boolean) line: 69 HistoryStore.copyHistory(IPath, IPath) line: 219 ResourceTree.copyLocalHistory(IResource, IResource) line: 66 ResourceTree.movedFolderSubtree(IFolder, IFolder) line: 171 ResourceTree.standardMoveFolder(IFolder, IFolder, int, IProgressMonitor) line: 894 Folder(Resource).move(IPath, int, IProgressMonitor) line: 979 Folder(Resource).move(IPath, boolean, IProgressMonitor) line: 939 ResourceDeltaTests.testPackageFragmentMove() line: 196 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 [local variables unavailable] DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 [local variables unavailable] Method.invoke(Object, Object[]) line: 324 [local variables unavailable] ResourceDeltaTests(TestCase).runTest() line: 154 ResourceDeltaTests(TestCase).runBare() line: 127 TestResult$1.protect() line: 106 TestResult.runProtected(Test, Protectable) line: 124 TestResult.run(TestCase) line: 109 ResourceDeltaTests(TestCase).run(TestResult) line: 118 TestSuite.runTest(Test, TestResult) line: 208 TestSuite.run(TestResult) line: 203 JavaModelRegressionTestSetup(TestDecorator).basicRun(TestResult) line: 22 TestSetup$1.protect() line: 19 TestResult.runProtected(Test, Protectable) line: 124 JavaModelRegressionTestSetup(TestSetup).run(TestResult) line: 23 TestSuite.runTest(Test, TestResult) line: 208 TestSuite.run(TestResult) line: 203 JavaModelRegressionTestSetup(TestDecorator).basicRun(TestResult) line: 22 TestSetup$1.protect() line: 19 TestResult.runProtected(Test, Protectable) line: 124 JavaModelRegressionTestSetup(TestSetup).run(TestResult) line: 23 TestSuite.runTest(Test, TestResult) line: 208 TestSuite.run(TestResult) line: 203 RemotePluginTestRunner(RemoteTestRunner).runTests(String[]) line: 360 RemotePluginTestRunner(RemoteTestRunner).run() line: 246 RemotePluginTestRunner.main(String[]) line: 30 CoreTestApplication.run(Object) line: 26 InternalBootLoader.run(String, URL, String, String[], Runnable) line: 845 BootLoader.run(String, URL, String, String[]) line: 432 EclipseRuntimeLauncher.main(String[]) line: 24 The test is trying to move '/Compiler/src/com/ibm/compiler/java' to '/Compiler/src/com/ibm/compiler/javac'. The toString() of the HistoryStoreEntry is suspicious: Path: /Compiler/src/com/ibm/compiler/javac/javac/javac/javac/javac/javac/javac/j avac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/jav ac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac /javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/j avac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/jav ac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac /javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/j avac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/jav ac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac /javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/javac/j avac/javac/javac/javac/javac/javac/javac/ast/FalseLiteral.java Last Modified: 1039771345581 Count: 0 UUID: {48,57,-6,101,124,14,0,23,19,74,-97,49,-6,88,-124,-120,} Also note that running the test by itself doesn't show the problem. Finally running the same tests with the 20021204 version of org.eclipse.core.resource doesn't show the problem either.
I will investigate this today and try to come up with a reproducable test case. A likely suspect is the partial match algorithm in the History Store visitor mechanism.
Maybe you can ask Olivier if you need to get the code for our internal test suite.
The history store visitor is incorrect (see bug 28330). Inside the visitor we created we were adding states to the history store. Because we were adding to the same table that we were visiting...we bail when the keys get too long. This is because the partial matching is incorrect. (see above referenced bug) As a work-around, I have changed the #copyhistory method to not modify the table in the visitor, but to collect all states to copy and then add all the states at the end.
Closing bug since this problem is fixed. Added comment with FIXME as a reminder to change the code to be more performant once the referenced bug is resolved. Leaving referenced bug open.
Referenced bug is closed and fixed. Changed #copyHistory implementation back to original form. (adding states from within the visitor)