- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Debugging specialization stack traces
Sat, 2010-05-01, 08:38
Hi,
I'm trying to build my libraries under the latest 2.8 snapshot using
specialization in my own code, and I've run into a number of bugs in
specialization (#3378,#3379,#3380,#3381). I've managed to isolate and
workaround most of them, but I'm stuck on this new one because I can't
figure out where it's giving up so that I can file a ticket. The stack
trace looks like what I've pasted at the end of the email.
-Ylog:specialization has been my usual trick of choice for finding
these bugs, but in this case it looks like specialized has gone far
beyond my user code before it stumbles into this error. There are
roughly 100 lines of specialized-related output between the last
mention of one of my classes, and where the exception is thrown. Are
there any other tricks or magical compiler flags to help find what's
wrong?
Thanks,
David
java.lang.Error: no-symbol does not have owner
at scala.tools.nsc.symtab.SymbolTable.abort(SymbolTable.scala:34)
at scala.tools.nsc.symtab.Symbols$NoSymbol$.owner(Symbols.scala:2036)
at scala.tools.nsc.ast.TreeGen.isInPkgObject$1(TreeGen.scala:164)
at scala.tools.nsc.ast.TreeGen.mkAttributedSelect(TreeGen.scala:170)
at scala.tools.nsc.ast.TreeGen.mkAttributedRef(TreeGen.scala:113)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6.transform(SpecializeTypes.scala:1117)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:831)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:831)
at scala.collection.immutable.List.loop$1(List.scala:116)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.collection.immutable.List.loop$1(List.scala:120)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.collection.immutable.List.loop$1(List.scala:120)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.collection.immutable.List.loop$1(List.scala:120)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.collection.immutable.List.loop$1(List.scala:120)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.collection.immutable.List.loop$1(List.scala:120)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.collection.immutable.List.loop$1(List.scala:120)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.collection.immutable.List.loop$1(List.scala:120)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:831)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6$$anonfun$transform$3.apply(SpecializeTypes.scala:1038)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6$$anonfun$transform$3.apply(SpecializeTypes.scala:1038)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:857)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:36)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:29)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6.transform(SpecializeTypes.scala:1038)
(pruned here, if you want the whole thing, let me know)
Tue, 2010-05-04, 06:37
#2
Re: Debugging specialization stack traces
On Sun, May 2, 2010 at 1:11 AM, Iulian Dragos wrote:
> Part of specialization happens at the next phase, explicitouter. That's in
> fact where all type errors may happen, so you could try -Ylog:expl. -Ydebug
> adds even more logging.
Ok, thanks!
> If you cannot reduce the crash to a small example, that's ok, post a ticket
> anyway, with a link to the project, or an archive of your source code.
ok, I'm unfortunately swamped for the next two weeks, and so I think I
have to give up and give you a code pointer. The Ticket is #3387,
which includes the link, and some compiler output.
Thanks!
On Sat, May 1, 2010 at 9:38 AM, David Hall <dlwh@cs.berkeley.edu> wrote:
Part of specialization happens at the next phase, explicitouter. That's in fact where all type errors may happen, so you could try -Ylog:expl. -Ydebug adds even more logging.
If you cannot reduce the crash to a small example, that's ok, post a ticket anyway, with a link to the project, or an archive of your source code.
iulian
--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais