Sometime, "File -> save" action is unavailable

19 views
Skip to first unread message

Francois

unread,
Apr 10, 2012, 9:50:58 AM4/10/12
to scala-i...@googlegroups.com
Hello guys,

Since a long time, I sometimes (well, even several times a day) encounter a strange bug: some actions are no longer available and/or broken, like "save", of "ctrl-left/right" to move the cursor for words, and some other ones.

When it happens, not only the keyboard shortcut is unavailable, but the corresponding menu entry, when it exists, is greyed.

Even more surprisingly, a simple workaround make things start working normally again: either close the modified file (Eclipse ask for saving it, and when re-opened, all is fine again), or go to the "Error Log" window, and choose "delete logs" from the contextual menu - yeah, really, very strange.

The workaround is sufficiently easy to qualify that bug as an annoyance more than a showstopper, but it tends to appears more frequently when Eclipse is open for some times, and it really breaks the coding flow in an irritating way.

I didn't saw it mention anywhere, in the bugtracker nor in that mailing list, but I may have missed it.

Other observation: I'm not sure about any error message happening along with that bug. Lattely, I'm seing a lot of "Error during ask option", but I can't say the bug is related to them (stack trace at the end, nonetheless).
It does not seems to be some kind of focus bug in Eclipse, because I can click in the file, write code, etc. Just some features are broken. Well,

I do understand that with such a bug report, you Scala-IDE dev can't go really far... But at least, I would know if I'm the only one with that weird thing.

I saw that bug happening with several Eclipse versions, several Scala IDE revision, several JVM versions - actually, since before Scala IDE 2.0 release. Currently my configuration is:
  • Java 1.7.0_03
  • Eclipse 3.7 (up to date)
  • Scala 2.9
  • Scala IDE 2.1.0.nightly-2_09-201204100534-ef0c9d0

Thanks,

8<-------------------------------
Error occurred in an application involving default arguments.
2012-04-10 15:30:57,182 ERROR [main] - org.scala-ide.sdt.core - org.scala-ide.sdt.core - org.scala-ide.sdt.core - 0 - Error during askOption
scala.tools.nsc.symtab.Types$TypeError: type mismatch;
 found   : Unit
 required: Long
Error occurred in an application involving default arguments.
    at scala.tools.nsc.typechecker.Contexts$Context.error(Contexts.scala:298)
    at scala.tools.nsc.typechecker.Infer$Inferencer.error(Infer.scala:207)
    at scala.tools.nsc.typechecker.Infer$Inferencer.typeError(Infer.scala:217)
    at scala.tools.nsc.typechecker.Infer$Inferencer.typeErrorTree(Infer.scala:232)
    at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:936)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4282)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:2191)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArgToPoly$1(Typers.scala:2479)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$32.apply(Typers.scala:2487)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$32.apply(Typers.scala:2487)
    at scala.Tuple2$Zipped$$anonfun$map$1.apply(Tuple2.scala:65)
    at scala.Tuple2$Zipped$$anonfun$map$1.apply(Tuple2.scala:63)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at scala.Tuple2$Zipped.map(Tuple2.scala:63)
    at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:2487)
    at scala.tools.nsc.typechecker.Typers$Typer.tryNamesDefaults$1(Typers.scala:2401)
    at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:2413)
    at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:3373)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4106)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4273)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4346)
    at scala.tools.nsc.typechecker.Typers$Typer.computeType(Typers.scala:4423)
    at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1207)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$typeCompleter$1.apply(Namers.scala:551)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$typeCompleter$1.apply(Namers.scala:549)
    at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1385)
    at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1381)
    at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:730)
    at scala.tools.nsc.symtab.Symbols$Symbol.initialize(Symbols.scala:842)
    at scala.tools.refactoring.analysis.CompilationUnitIndexes$CompilationUnitIndex$$anon$1$$anonfun$1.apply(CompilationUnitIndexes.scala:82)
    at scala.tools.refactoring.analysis.CompilationUnitIndexes$CompilationUnitIndex$$anon$1$$anonfun$1.apply(CompilationUnitIndexes.scala:82)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
    at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)
    at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:95)
    at scala.collection.Iterator$class.foreach(Iterator.scala:772)
    at scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:157)
    at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:190)
    at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:45)
    at scala.collection.mutable.HashMap.foreach(HashMap.scala:95)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
    at scala.collection.mutable.HashMap.map(HashMap.scala:45)
    at scala.tools.refactoring.analysis.CompilationUnitIndexes$CompilationUnitIndex$$anon$1.<init>(CompilationUnitIndexes.scala:82)
    at scala.tools.refactoring.analysis.CompilationUnitIndexes$CompilationUnitIndex$.apply(CompilationUnitIndexes.scala:81)
    at scala.tools.refactoring.analysis.GlobalIndexes$GlobalIndex$.apply(GlobalIndexes.scala:34)
    at scala.tools.eclipse.semantichighlighting.classifier.SymbolClassification$$anonfun$index$1.apply(SymbolClassification.scala:48)
    at scala.tools.eclipse.semantichighlighting.classifier.SymbolClassification$$anonfun$index$1.apply(SymbolClassification.scala:48)
    at scala.tools.nsc.interactive.CompilerControl$class.ask(CompilerControl.scala:237)
    at scala.tools.nsc.interactive.Global.ask(Global.scala:27)
    at scala.tools.eclipse.ScalaPresentationCompiler.askOption(ScalaPresentationCompiler.scala:122)
    at scala.tools.eclipse.semantichighlighting.classifier.SymbolClassification.index(SymbolClassification.scala:48)
    at scala.tools.eclipse.semantichighlighting.classifier.SymbolClassification$$anonfun$3.apply(SymbolClassification.scala:53)
    at scala.tools.eclipse.semantichighlighting.classifier.SymbolClassification$$anonfun$3.apply(SymbolClassification.scala:53)
    at scala.tools.nsc.util.InterruptReq.liftedTree1$1(InterruptReq.scala:20)
    at scala.tools.nsc.util.InterruptReq.execute(InterruptReq.scala:19)
    at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:330)
    at scala.tools.nsc.interactive.Global.checkForMoreWork(Global.scala:387)
    at scala.tools.nsc.interactive.Global.signalDone(Global.scala:244)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4292)
    at scala.tools.nsc.typechecker.Typers$Typer.typedType(Typers.scala:4376)
    at scala.tools.nsc.typechecker.Typers$Typer.typedType(Typers.scala:4379)
    at scala.tools.nsc.typechecker.Typers$Typer.typedValDef(Typers.scala:1535)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:2038)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:2038)
    at scala.collection.immutable.List.loop$1(List.scala:148)
    at scala.collection.immutable.List.mapConserve(List.scala:164)
    at scala.tools.nsc.typechecker.Typers$Typer.typedFunction(Typers.scala:2038)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3980)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4002)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4273)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:2191)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArgToPoly$1(Typers.scala:2479)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$32.apply(Typers.scala:2487)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$32.apply(Typers.scala:2487)
    at scala.Tuple2$Zipped$$anonfun$map$1.apply(Tuple2.scala:65)
    at scala.Tuple2$Zipped$$anonfun$map$1.apply(Tuple2.scala:63)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at scala.Tuple2$Zipped.map(Tuple2.scala:63)
    at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:2487)
    at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:3373)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4106)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4273)
    at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:4352)
    at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:4358)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4146)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4273)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:2191)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedArgs$3.apply(Typers.scala:2204)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedArgs$3.apply(Typers.scala:2203)
    at scala.Tuple3$Zipped$$anonfun$map$1.apply(Tuple3.scala:66)
    at scala.Tuple3$Zipped$$anonfun$map$1.apply(Tuple3.scala:64)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at scala.Tuple3$Zipped.map(Tuple3.scala:64)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArgs(Typers.scala:2203)
    at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:2423)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$tryTypedApply$1$1.apply(Typers.scala:3297)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$tryTypedApply$1$1.apply(Typers.scala:3297)
    at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:624)
    at scala.tools.nsc.typechecker.Typers$Typer.tryTypedApply$1(Typers.scala:3297)
    at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:3371)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4106)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4273)
    at scala.tools.nsc.typechecker.Typers$Typer.typedAssign$1(Typers.scala:3142)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3983)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4273)
    at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:1920)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3953)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4273)
    at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:4430)
    at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:1760)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3921)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4273)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
    at scala.collection.immutable.List.loop$1(List.scala:148)
    at scala.collection.immutable.List.mapConserve(List.scala:164)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
    at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1512)
    at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1278)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3912)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4273)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2100)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$24.apply(Typers.scala:2184)
    at scala.collection.immutable.List.loop$1(List.scala:148)
    at scala.collection.immutable.List.mapConserve(List.scala:164)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2184)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3908)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4273)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4333)
    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:94)
    at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:329)
    at scala.tools.nsc.interactive.Global$TyperRun$$anonfun$applyPhase$1.apply(Global.scala:1054)
    at scala.tools.nsc.interactive.Global$TyperRun$$anonfun$applyPhase$1.apply(Global.scala:1054)
    at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:95)
    at scala.tools.nsc.interactive.Global$TyperRun.applyPhase(Global.scala:1054)
    at scala.tools.nsc.interactive.Global$TyperRun.typeCheck(Global.scala:1047)
    at scala.tools.nsc.interactive.Global.scala$tools$nsc$interactive$Global$$typeCheck(Global.scala:556)
    at scala.tools.nsc.interactive.Global$$anonfun$backgroundCompile$5$$anonfun$apply$7.apply(Global.scala:473)
    at scala.tools.nsc.interactive.Global$$anonfun$backgroundCompile$5.apply(Global.scala:469)
    at scala.tools.nsc.interactive.Global$$anonfun$backgroundCompile$5.apply(Global.scala:469)
    at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:743)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:76)
    at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:742)
    at scala.tools.nsc.interactive.Global.backgroundCompile(Global.scala:469)
    at scala.tools.nsc.interactive.PresentationCompilerThread.run(PresentationCompilerThread.scala:25)
2012-04-10 15:38:48,912  INFO [Worker-49] - ScalaPresentationCompiler - TypeError in ask:
scala.tools.nsc.symtab.Types$TypeError: type mismatch;
 found   : Unit
 required: Long
Error occurred in an application involving default arguments.

-- 
Francois ARMAND
http://fanf42.blogspot.com
http://www.normation.com

Francois

unread,
Apr 20, 2012, 4:10:48 AM4/20/12
to scala-i...@googlegroups.com
On 10/04/2012 15:50, Francois wrote:
Hello guys,

Since a long time, I sometimes (well, even several times a day) encounter a strange bug: some actions are no longer available and/or broken, like "save", of "ctrl-left/right" to move the cursor for words, and some other ones.



I found that : http://stackoverflow.com/questions/8429778/the-option-to-save-a-file-is-greyed-out-in-eclipse
That would mean that the responsible may be E17, and so perhaps I just have to live with it...

Thanks,

iulian dragos

unread,
Apr 20, 2012, 9:18:00 AM4/20/12
to scala-i...@googlegroups.com
On Fri, Apr 20, 2012 at 8:10 AM, Francois <fan...@gmail.com> wrote:
On 10/04/2012 15:50, Francois wrote:
Hello guys,

Since a long time, I sometimes (well, even several times a day) encounter a strange bug: some actions are no longer available and/or broken, like "save", of "ctrl-left/right" to move the cursor for words, and some other ones.



I found that : http://stackoverflow.com/questions/8429778/the-option-to-save-a-file-is-greyed-out-in-eclipse
That would mean that the responsible may be E17, and so perhaps I just have to live with it...

Thanks for reporting back!

iulian



--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais
Reply all
Reply to author
Forward
0 new messages