Community
Participate
Working Groups
Created attachment 279739 [details] Zipped log files In 2019-09'M2' I get a repeatable CCE, when hovering over field declarations or references in a dirty /org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtr2qvts/RelationAnalysis.java to which an additional method had been added. I have seen the problem before. Once it is occurring it appears to affect all field declarations or references hovers in new and old edits. Even on fields in a class file such as java.lang.HashMap. java.lang.ClassCastException: org.eclipse.jdt.internal.debug.core.model.JDIPrimitiveValue cannot be cast to org.eclipse.jdt.internal.debug.core.model.JDIObjectValue at org.eclipse.jdt.internal.debug.core.model.JDIObjectValue.getField(JDIObjectValue.java:310) at org.eclipse.jdt.internal.debug.ui.JavaDebugHover.getHoverInfo2(JavaDebugHover.java:378) at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:167) at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:133) at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:89) at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:169) Attached log files might suggest what caused JDT to switch to broken mode.
My bad, coming from the fix for bug 317045. Fix is trivial (check what we have before cast), but I'm offline for a week. Simeon, could you please check this? The code change is https://git.eclipse.org/r/#/c/147724/3/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIObjectValue.java I think we can make it into RC2.
(In reply to Andrey Loskutov from comment #1) > My bad, coming from the fix for bug 317045. The Bugzilla de-duplication indicates that "Unexpected runtime error while computing a text hover" is a pretty frequent bug. Isn't about time that this "bad" was caught by a JUnit test?
(In reply to Ed Willink from comment #2) > (In reply to Andrey Loskutov from comment #1) > > My bad, coming from the fix for bug 317045. > > The Bugzilla de-duplication indicates that "Unexpected runtime error while > computing a text hover" is a pretty frequent bug. This is probably just because it is catched at a higher location in code where different errors are reported. Ths stach shows clearly that this is a recent regression. > Isn't about time that this "bad" was caught by a JUnit test? As you can see, my patch had a test. Just the test did only test for few use cases with fields of *reference* types, and I've missed to test primitive types too. Generally speaking, a design issue in Java to have two different kinds of types, but they plan to fix this at some point in the future.
@Simeon, Please add the Gerrit to fix and add me as the reviewer for RC2.
New Gerrit change created: https://git.eclipse.org/r/148695
Hi Ed, can you test with this change? https://git.eclipse.org/r/#/c/148695/ Unfortunately I don't have org.eclipse.qvtd.compiler/ and so can't verify. I tried to adjust the test from Andrey but I don't know how to cause a synthetic member of primitive type, so I don't run into the ClassCastException. Best regards and thanks, Simeon
(In reply to Simeon Andreev from comment #6) > can you test with this change? https://git.eclipse.org/r/#/c/148695/ I can test an I-build. > Unfortunately I don't have org.eclipse.qvtd.compiler/ and so can't verify. I only put in this kind of detail in case I have to go back and produce a better repro. (In reply to Ed Willink from comment #0) > I have seen the problem before. Once it is occurring it appears to affect > all field declarations or references hovers in new and old edits. Even on > fields in a class file such as java.lang.HashMap. I think you have HashMap. It seemed to be a bug on all fields; the only uncertainty is whether it happens all the time or only after some sequence of edit/debug/run/check-out/... Given that you seem to have a trivial cast fix, it would seem that it should happen all the time.
Gerrit change https://git.eclipse.org/r/148695 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=e045ffff028c71d51f97538113250975ebb89c66
+1 for RC2. @Simeon, Please create a bug to investigate for Primitive value for 4.14. @Ed, Please test in the next I Build.
(In reply to Sarika Sinha from comment #9) > @Simeon, > Please create a bug to investigate for Primitive value for 4.14. I believe you mean fix bug 317045 but for primitive values?
(In reply to Simeon Andreev from comment #10) > (In reply to Sarika Sinha from comment #9) > > @Simeon, > > Please create a bug to investigate for Primitive value for 4.14. > > > I believe you mean fix bug 317045 but for primitive values? Yes, Based on Andrey's remarks in Gerrit. We, already have a build with this fix. http://download.eclipse.org/eclipse/downloads/drops4/I20190902-0805/
I've opened: bug 550675
(In reply to Sarika Sinha from comment #9) > @Ed, > Please test in the next I Build. Unfortunately, Bug 550629, downloading an I-build is no longer practical. May have to wait for RC2.
(In reply to Ed Willink from comment #13) > (In reply to Sarika Sinha from comment #9) > > @Ed, > > Please test in the next I Build. > > Unfortunately, Bug 550629, downloading an I-build is no longer practical. Found that my final attempt to download eclipse-SDK-I20190902-1800-win32-x86_64.zip had eventually completed after I had given up. Fix seems good.
Thanks !