Error in Scala compiler: assertion failed...

336 views
Skip to first unread message

Alex Black

unread,
Jun 7, 2011, 10:35:13 AM6/7/11
to Scala IDE User
I'm trying out the latest ide, 2.0.0.0-beta5 I believe, with Helios
3.6.2, with Scala 2.9.0-1.

1. I opened my two project workspace
2. I made a trivial change in the lower project (the one that the 2nd
project depends on)
3. I hit save (with automatic build turned on)
4. The ide appeared to build the workspace, and then failed:

Error in Scala compiler: assertion failed: method differenceProperties
in object Class$class in package model

I looked at this class its referring to, its a trait, with a method
differenceProperties, nothing unusual that I can see. If I clean all,
then the error goes away and the workspace builds fine.

thoughts?

5. I then made another trivial change
6. I then saved that change
7. I now get 10 errors, like "Foo is not a member of package.foo.bar",
"not found: type Foobar" etc. if I clean, these go away.

Alex Black

unread,
Jun 7, 2011, 10:09:08 PM6/7/11
to Scala IDE User
This happened again just now, this time with a single project open.
Here is a stack trace from the "Error Log"

eclipse.buildId=M20110210-1200
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_CA
Command-line arguments: -data /home/alex/workspaces-2.9/dataStore -os
linux -ws gtk -arch x86_64


Error
Tue Jun 07 22:05:56 EDT 2011
Error in Scala compiler

java.lang.AssertionError: assertion failed: method
differenceProperties in object Class$class in package model List(class
DomainConfigTest, class BaseDomainFactory, trait
QualifiedPropertyFactory, package derivedProperties, class BaseDomain,
class PropertyValueDiffDesc, class OntologyStore, object
OntologyStore, trait NamedValue, class NamedValues, object NamedValue,
class PropertyTest, trait StatsContext, trait StoreContext, class
DefaultStoreContext, class OntologyProperty, class OntologyXmlParser,
class PropertyGroup, object PropertyGroup, class DerivedPropertyTest,
class ClassTest, trait DomainConfig, object DomainConfig, class
PropertiesDomainConfig, class OntologyStoreTest, class
PropertyValueRankDesc, object PropertyValueRankDesc, trait ValueType,
object ValueType, trait Class, object Class, class
PropertyValueRankDescBuilder, object PropertyValueRankDescBuilder,
trait DomainFactory, object DomainFactory, trait CategoryInstances,
object BaseCategoryInstances, class BaseCategoryInstances, class
BaseCategory, trait Category, class DataSourceMerge, object
DataSources, class PropertyRegistry, object PropertyFormatter, trait
InstancesFromXmlContext, class LoggingInstancesFromXmlContext, class
InstancesFromXml, trait CachingProperty, class SubPropertyTest, class
DataSourceMergeTest, trait Domain, class InstanceValue, object
InstanceValue, trait Instance, trait BaseProperty, trait Property,
class PropertyExtractor, object InstanceProperty, object
InstancesProperty, object IntProperty, object IntsProperty, object
StringProperty, object StringsProperty, object DoubleProperty, object
DoublesProperty, object BooleanProperty, object BooleansProperty,
object DateProperty, object DatesProperty, object ClassProperty,
object ClassesProperty, class MutableInstance, object MutableInstance,
class MutableInstancesFromXml, trait ValueStr, object ValueStr, trait
QualifiedProperty, object QualifiedProperty, class
BaseQualifiedProperty, class InstanceToXml, object InstanceToXml,
trait ValueToDouble, class InstancesXmlParser, class
CascadingStatsContext, trait TypeSafeOntologyClass, class
OntologyClass, class InstancesStatsContext, class OntologyInstance,
object Class$class, object Instance$class, object Domain$class, trait
Property$class, object QualifiedProperty$class, trait BaseProperty
$class, object NamedValue$class, object DomainConfig$class, object
ValueToDouble$class, trait CachingProperty$class, object ValueType
$class, object Category$class, object ValueStr$class, object
TypeSafeOntologyClass$class, object Property$class, object BaseProperty
$class, object CachingProperty$class)
at scala.Predef$.assert(Predef.scala:103)
at scala.tools.nsc.transform.Mixin$MixinTransformer.scala$tools$nsc
$transform$Mixin$MixinTransformer$$staticRef(Mixin.scala:578)
at scala.tools.nsc.transform.Mixin$MixinTransformer.staticCall
$1(Mixin.scala:1189)
at scala.tools.nsc.transform.Mixin$MixinTransformer.scala$tools$nsc
$transform$Mixin$MixinTransformer$$postTransform(Mixin.scala:1210)
at scala.tools.nsc.transform.Mixin$MixinTransformer$$anonfun
$23.apply(Mixin.scala:1259)
at scala.tools.nsc.transform.Mixin$MixinTransformer$$anonfun
$23.apply(Mixin.scala:1259)
at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:96)
at scala.tools.nsc.transform.Mixin
$MixinTransformer.transform(Mixin.scala:1259)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform
$4.apply(Trees.scala:777)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform
$4.apply(Trees.scala:776)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:775)
at scala.tools.nsc.transform.Mixin
$MixinTransformer.transform(Mixin.scala:1258)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats
$1.apply(Trees.scala:891)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats
$1.apply(Trees.scala:889)
at scala.collection.immutable.List.loop$1(List.scala:117)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:
889)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:799)
at scala.tools.nsc.transform.Mixin
$MixinTransformer.transform(Mixin.scala:1258)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform
$5.apply(Trees.scala:783)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform
$5.apply(Trees.scala:781)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:780)
at scala.tools.nsc.transform.Mixin
$MixinTransformer.transform(Mixin.scala:1258)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats
$1.apply(Trees.scala:891)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats
$1.apply(Trees.scala:889)
at scala.collection.immutable.List.loop$1(List.scala:117)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:
889)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:797)
at scala.tools.nsc.transform.Mixin
$MixinTransformer.transform(Mixin.scala:1258)
at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:
875)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform
$2.apply(Trees.scala:767)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform
$2.apply(Trees.scala:766)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:765)
at scala.tools.nsc.transform.Mixin
$MixinTransformer.transform(Mixin.scala:1258)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats
$1.apply(Trees.scala:891)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats
$1.apply(Trees.scala:889)
at scala.collection.immutable.List.loop$1(List.scala:117)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:
889)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform
$1.apply(Trees.scala:761)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform
$1.apply(Trees.scala:761)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:760)
at scala.tools.nsc.transform.Mixin
$MixinTransformer.transform(Mixin.scala:1258)
at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:
892)
at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase
$1.apply(Global.scala:326)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase
$1.apply(Global.scala:326)
at scala.tools.nsc.reporters.Reporter.withSource(Reporter.scala:47)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:326)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run
$1.apply(Global.scala:294)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run
$1.apply(Global.scala:294)
at scala.collection.Iterator$class.foreach(Iterator.scala:652)
at scala.collection.mutable.ListBuffer$$anon
$1.foreach(ListBuffer.scala:311)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:294)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:949)
at scala.tools.nsc.Global$Run.compileFiles(Global.scala:1023)
at
scala.tools.nsc.interactive.RefinedBuildManager.update0$1(RefinedBuildManager.scala:
130)
at
scala.tools.nsc.interactive.RefinedBuildManager.update(RefinedBuildManager.scala:
189)
at
scala.tools.nsc.interactive.RefinedBuildManager.update(RefinedBuildManager.scala:
99)
at
scala.tools.eclipse.buildmanager.refined.EclipseRefinedBuildManager.build(EclipseRefinedBuildManager.scala:
82)
at scala.tools.eclipse.ScalaProject.build(ScalaProject.scala:500)
at scala.tools.eclipse.ScalaBuilder.build(ScalaBuilder.scala:79)
at org.eclipse.core.internal.events.BuildManager
$2.run(BuildManager.java:629)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
172)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
203)
at org.eclipse.core.internal.events.BuildManager
$1.run(BuildManager.java:255)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
258)
at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:
311)
at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
343)
at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
144)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
242)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Alex Black

unread,
Aug 5, 2011, 10:15:59 AM8/5/11
to Scala IDE User
Any ideas on this one? What assertion is failing? This keeps happening
to me, I have to clean to fix it, but sometimes just making a trivial
white space change and saving will fix it (temporarily).

- Alex
> atscala.tools.eclipse.ScalaBuilder.build(ScalaBuilder.scala:79)
> >ErrorinScalacompiler: assertion failed: method differenceProperties
> > in object Class$class in package model
>
> > I looked at this class its referring to, its a trait, with a method...
>
> read more »

Mirco Dotta

unread,
Aug 8, 2011, 3:42:58 AM8/8/11
to scala-i...@googlegroups.com

> Any ideas on this one? What assertion is failing? This keeps happening
> to me, I have to clean to fix it, but sometimes just making a trivial
> white space change and saving will fix it (temporarily).

From your description it seems likely to be a builder problem. Though, it is hard
to say more than that. We know the builder is really the one next thing we have
to get right. The new SBT builder is coming soon, and I hope that issues like
the one you are reporting will just go away :)

-- Mirco

Ruediger Keller

unread,
Aug 8, 2011, 5:28:00 AM8/8/11
to scala-i...@googlegroups.com
Hi,

are you sure you have the latest version of the plugin? The latest
beta is beta 9.

Regards,
Rüdiger


2011/6/7 Alex Black <al...@alexblack.ca>:

Alex Black

unread,
Aug 8, 2011, 9:43:48 AM8/8/11
to Scala IDE User
Hi Rudiger, yes, I'm using Beta 9, I've been experiencing this problem
for a while.

On Aug 8, 5:28 am, Ruediger Keller <ruediger.kel...@rk42.de> wrote:
> Hi,
>
> are you sure you have the latest version of the plugin? The latest
> beta is beta 9.
>
> Regards,
> Rüdiger
>
> 2011/6/7 Alex Black <a...@alexblack.ca>:

Alex Black

unread,
Aug 8, 2011, 9:45:43 AM8/8/11
to Scala IDE User
Hi Mirco, thanks.

Any ideas on how to find out what the problem is, e.g. which assertion
is failing?

Its a very frustrating problem.. many times a day when I hit save this
error happens, and the work around is to go to the file mentioned in
the assertion, make a trivial white space change, hit save, then it
builds.

Mirco Dotta

unread,
Aug 8, 2011, 9:55:39 AM8/8/11
to scala-i...@googlegroups.com
Unfortunately, I have not yet had a chance to look into the builder, so I can be of little help.

What I would do is enabling the `verbose` option in Preferences -> Scala Compiler. Make
sure to start eclipse from the terminal and this way you will see a lot more log. This way you
may be able to understand what is the bit causing the assertion failure.

As usual, if you can narrow it down to a simple example, file a ticket.

Maybe Hubert, Iulian (though, he's still on holiday this week) or Miles would be able to tell
you more.

Hope this helps.

-- Mirco

Alex Black

unread,
Aug 8, 2011, 8:13:10 PM8/8/11
to Scala IDE User
I'll try that, thanks, hopefully I can come up with a simple example.

Alex Black

unread,
Aug 8, 2011, 9:07:05 PM8/8/11
to Scala IDE User
I'm seeing a new variation of what is probably the same thing:

In the problems view:

Description Resource Path Location Type
Unknown cs Unknown Scala Problem

In the error log:

org.eclipse.core.runtime.AssertionFailedException: assertion failed:
Marker property value is too long: Error in Scala compiler: assertion
failed: method fmt in ...

The part about "marker property value is too long", does that mean
anything?

- Alex

Ruediger Keller

unread,
Aug 9, 2011, 11:05:12 AM8/9/11
to scala-i...@googlegroups.com
Hmm, it's the same error I was seeing recently.

Regards,
Rüdiger

2011/8/9 Alex Black <al...@alexblack.ca>:

Mirco Dotta

unread,
Aug 9, 2011, 2:23:10 PM8/9/11
to scala-i...@googlegroups.com
Hi Alex,

Iulian is the compiler expert and he might be able to help. He will be back next week.

-- Mirco

Reply all
Reply to author
Forward
0 new messages