Expanding variable in debugger view produces NPE (regression between 3.0.0-RC1 and RC2)
Looks like every time you try to expand a variable (that contains fields) in the debugger view, the following exceptions are reported:
"An internal error occurred during: "child count update"."
Error logged from Debug Core:
The problem can be reproduce with the simplest tests case:
Launch the above main, wait for the breakpoiont to be hit, and then expand the this variable. If you use 3.0.0-RC2 you should see the above exceptions and the debugger is now in a broken state (next time you launch a debug session no variables will be shown!). The only workaround is to restart Eclipse (or, not use the Scala Debugger in RC2 :)). By the way, this works just fine with 3.0.0-RC1.
"An internal error occurred during: "child count update"."
java.lang.NullPointerException
at org.eclipse.debug.internal.core.LogicalStructureProvider.getLogicalStructures(LogicalStructureProvider.java:56)
at org.eclipse.debug.internal.core.LogicalStructureManager.getLogicalStructureTypes(LogicalStructureManager.java:97)
at org.eclipse.debug.core.DebugPlugin.getLogicalStructureTypes(DebugPlugin.java:768)
at org.eclipse.debug.internal.ui.model.elements.VariableContentProvider.getLogicalValue(VariableContentProvider.java:217)
at org.eclipse.debug.internal.ui.model.elements.VariableContentProvider.getLogicalValue(VariableContentProvider.java:120)
at org.eclipse.debug.internal.ui.model.elements.VariableContentProvider.getValueChildren(VariableContentProvider.java:138)
at org.eclipse.debug.internal.ui.model.elements.VariableContentProvider.getAllChildren(VariableContentProvider.java:83)
at org.eclipse.debug.internal.ui.model.elements.VariableContentProvider.getChildCount(VariableContentProvider.java:48)
at org.eclipse.debug.internal.ui.model.elements.ElementContentProvider.retrieveChildCount(ElementContentProvider.java:114)
at org.eclipse.debug.internal.ui.model.elements.ElementContentProvider$2.run(ElementContentProvider.java:63)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Error logged from Debug Core:
org.eclipse.core.runtime.CoreException: Plug-in org.scala-ide.sdt.debug was unable to load class scala.tools.eclipse.debug.model.ScalaLogicalStructureProvider.
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.debug.internal.core.LogicalStructureProvider.getDelegate(LogicalStructureProvider.java:67)
at org.eclipse.debug.internal.core.LogicalStructureProvider.getLogicalStructures(LogicalStructureProvider.java:56)
at org.eclipse.debug.internal.core.LogicalStructureManager.getLogicalStructureTypes(LogicalStructureManager.java:97)
at org.eclipse.debug.core.DebugPlugin.getLogicalStructureTypes(DebugPlugin.java:768)
at org.eclipse.debug.internal.ui.model.elements.VariableContentProvider.getLogicalValue(VariableContentProvider.java:217)
at org.eclipse.debug.internal.ui.model.elements.VariableContentProvider.getLogicalValue(VariableContentProvider.java:120)
at org.eclipse.debug.internal.ui.model.elements.VariableContentProvider.getValueChildren(VariableContentProvider.java:138)
at org.eclipse.debug.internal.ui.model.elements.VariableContentProvider.getAllChildren(VariableContentProvider.java:83)
at org.eclipse.debug.internal.ui.model.elements.VariableContentProvider.getChildCount(VariableContentProvider.java:48)
at org.eclipse.debug.internal.ui.model.elements.ElementContentProvider.retrieveChildCount(ElementContentProvider.java:114)
at org.eclipse.debug.internal.ui.model.elements.ElementContentProvider$2.run(ElementContentProvider.java:63)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassNotFoundException: scala.tools.eclipse.debug.model.ScalaLogicalStructureProvider
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
... 15 more
The problem can be reproduce with the simplest tests case:
object Main {
def main(args: Array[String]): Unit = {
println() // put a breakpoint here
}
}
Launch the above main, wait for the breakpoiont to be hit, and then expand the this variable. If you use 3.0.0-RC2 you should see the above exceptions and the debugger is now in a broken state (next time you launch a debug session no variables will be shown!). The only workaround is to restart Eclipse (or, not use the Scala Debugger in RC2 :)). By the way, this works just fine with 3.0.0-RC1.
Leave a comment
(In scala-ide:ca3a67d8768d185ec5547ce4ddb77ab1a21709d8) Expanding variable in debugger resulted in NPE
The regression was introduced by SHA: be83fc8f7c40c71269d5e7315594896e6b85ab69.
The reason for the regression is that the name of the class
``ScalaLogicalStructureProvider`` was inadvertently changed to
``ScalaLogicalStructureProviders`` (note the final **s**). Since that class was
linked to the org.eclipse.debug.core.logicalStructureProviders extension
point, as soon as the debugger code needed to load that class an exception is
reported.
What we should do to avoid this sort of errors in the future is setting the PDE
compiler flag for "References to non-existing classes" to Error. Furthermore,
it would be good if this check could be enforced in our Tycho build (I've asked
in the tycho-user ML,
[here](http://dev.eclipse.org/mhonarc/lists/tycho-user/msg04110.html) is the
link to the discussion).
Fix #1001586
Backport to release/3.0.x
Branch: master
The regression was introduced by SHA: be83fc8f7c40c71269d5e7315594896e6b85ab69.
The reason for the regression is that the name of the class
``ScalaLogicalStructureProvider`` was inadvertently changed to
``ScalaLogicalStructureProviders`` (note the final **s**). Since that class was
linked to the org.eclipse.debug.core.logicalStructureProviders extension
point, as soon as the debugger code needed to load that class an exception is
reported.
What we should do to avoid this sort of errors in the future is setting the PDE
compiler flag for "References to non-existing classes" to Error. Furthermore,
it would be good if this check could be enforced in our Tycho build (I've asked
in the tycho-user ML,
[here](http://dev.eclipse.org/mhonarc/lists/tycho-user/msg04110.html) is the
link to the discussion).
Fix #1001586
Backport to release/3.0.x
Branch: master
on 2013-06-05 08:56 *
By Mirco Dotta
(In scala-ide:ca3a67d8768d185ec5547ce4ddb77ab1a21709d8) Expanding variable in debugger resulted in NPE
The regression was introduced by SHA: be83fc8f7c40c71269d5e7315594896e6b85ab69.
The reason for the regression is that the name of the class
``ScalaLogicalStructureProvider`` was inadvertently changed to
``ScalaLogicalStructureProviders`` (note the final **s**). Since that class was
linked to the org.eclipse.debug.core.logicalStructureProviders extension
point, as soon as the debugger code needed to load that class an exception is
reported.
What we should do to avoid this sort of errors in the future is setting the PDE
compiler flag for "References to non-existing classes" to Error. Furthermore,
it would be good if this check could be enforced in our Tycho build (I've asked
in the tycho-user ML,
[here](http://dev.eclipse.org/mhonarc/lists/tycho-user/msg04110.html) is the
link to the discussion).
Fix #1001586
Backport to release/3.0.x
Branch: platform/juno
The regression was introduced by SHA: be83fc8f7c40c71269d5e7315594896e6b85ab69.
The reason for the regression is that the name of the class
``ScalaLogicalStructureProvider`` was inadvertently changed to
``ScalaLogicalStructureProviders`` (note the final **s**). Since that class was
linked to the org.eclipse.debug.core.logicalStructureProviders extension
point, as soon as the debugger code needed to load that class an exception is
reported.
What we should do to avoid this sort of errors in the future is setting the PDE
compiler flag for "References to non-existing classes" to Error. Furthermore,
it would be good if this check could be enforced in our Tycho build (I've asked
in the tycho-user ML,
[here](http://dev.eclipse.org/mhonarc/lists/tycho-user/msg04110.html) is the
link to the discussion).
Fix #1001586
Backport to release/3.0.x
Branch: platform/juno