How to narrow down "scala.reflect.internal.Types$TypeError: bad reference while unpickling..."

136 views
Skip to first unread message

James Moore

unread,
May 28, 2012, 11:57:17 PM5/28/12
to scala-l...@googlegroups.com
I'm trying to come up with a smaller repro case for https://issues.scala-lang.org/browse/SI-5613 (I submitted a repro case already, but it's an Eclipse plugin project requiring a lot of jars, so the bug got rejected).

However, I have no idea what the error message is trying to tell me, and some effort at just hacking away code in locations that looked like they were related to the error message isn't getting me anywhere.

Can anyone give me any hints as to what this kind of report means, and how to figure out where the problem might be?

[error] 
[error]      while compiling: /Users/james/workspace/Deleteme3/src/main/scala/com/restphone/androidproguardscala/AndroidProguardScalaBuilder.scala
[error]         during phase: erasure
[error]      library version: version 2.10.0-20120518-123928-5b9bf3d712
[error]     compiler version: version 2.10.0-20120518-123928-5b9bf3d712
[error]   reconstructed args: -bootclasspath /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsfd.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/laf.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/sunrsasign.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar:/Users/james/.sbt/0.13.0-SNAPSHOT/boot/scala-2.10.0-SNAPSHOT/lib/scala-library.jar -classpath /Users/james/workspace/Deleteme3/target/scala-2.10/classes:/Users/james/workspace/Deleteme3/lib/asm-3.3.1.jar:/Users/james/workspace/Deleteme3/lib/guava-11.0.jar:/Users/james/workspace/Deleteme3/lib/jruby-complete-1.6.5.1.jar:/Users/james/workspace/Deleteme3/lib/org.eclipse.core.contenttype_3.4.100.v20110423-0524.jar:/Users/james/workspace/Deleteme3/lib/org.eclipse.core.jobs_3.5.101.v20120113-1953.jar:/Users/james/workspace/Deleteme3/lib/org.eclipse.core.resources_3.7.101.v20120125-1505.jar:/Users/james/workspace/Deleteme3/lib/org.eclipse.core.runtime_3.7.0.v20110110.jar:/Users/james/workspace/Deleteme3/lib/org.eclipse.equinox.common_3.6.0.v20110523.jar:/Users/james/workspace/Deleteme3/lib/org.eclipse.equinox.preferences_3.4.2.v20120111-2020.jar:/Users/james/workspace/Deleteme3/lib/org.eclipse.equinox.registry_3.5.101.R37x_v20110810-1611.jar:/Users/james/workspace/Deleteme3/lib/org.eclipse.jdt.core_3.7.3.v20120119-1537.jar:/Users/james/workspace/Deleteme3/lib/org.eclipse.jface_3.7.0.v20110928-1505.jar:/Users/james/workspace/Deleteme3/lib/org.eclipse.osgi_3.7.2.v20120110-1415.jar:/Users/james/workspace/Deleteme3/lib/org.eclipse.swt.cocoa.macosx.x86_64_3.7.2.v3740f.jar:/Users/james/workspace/Deleteme3/lib/org.eclipse.ui.workbench_3.7.1.v20120104-1859.jar:/Users/james/workspace/Deleteme3/lib/org.scala-ide.sdt.core_2.1.0.nightly-2_10-201203260555-684a051.jar:/Users/james/workspace/Deleteme3/lib/proguard-base-4.6.jar:/Users/james/workspace/Deleteme3/lib/scala-compiler-2.10.0-SNAPSHOT.jar:/Users/james/.ivy2/cache/com.typesafe/config/jars/config-0.4.0.jar -d /Users/james/workspace/Deleteme3/target/scala-2.10/classes
[error] 
[error]   last tree to typer: This(anonymous class $anonfun)
[error]               symbol: anonymous class $anonfun (flags: final <synthetic>)
[error]    symbol definition: final class $anonfun extends AbstractFunction1$mcZL$sp[String] with Serializable
[error]                  tpe: com.restphone.androidproguardscala.ToggleNatureAction.$anonfun.type
[error]        symbol owners: anonymous class $anonfun -> value newNatures -> method toggleNature -> class ToggleNatureAction -> package androidproguardscala
[error]       context owners: lazy value scalaProject -> class AndroidProguardScalaBuilder -> package androidproguardscala
[error] 
[error] == Enclosing template or block ==

(too big to attach the full error output; it's attached to the bug at https://issues.scala-lang.org/secure/attachment/14906/out.txt)

Paul Phillips

unread,
May 29, 2012, 1:37:52 AM5/29/12
to scala-l...@googlegroups.com
"term contribution not found in scala.tools.eclipse.type" ==
 -- I went looking for a package called scala.tools.eclipse.contribution, and came up empty handed

"bad reference while unpickling ... scala/tools/eclipse/javaelements/ScalaCompilationUnit.class"
 -- that's the class which sent me on the wild goose chase

As far as I can tell, the entire output except for this is irrelevant.  When I look at the source for ScalaCompilationUnit, I see this:

import scala.tools.eclipse.contribution.weaving.jdt.{ IScalaCompilationUnit, IScalaWordFinder }

That seems like a place to start.  Also, this is not really a scala-language subject.
Reply all
Reply to author
Forward
0 new messages