Closed programatt closed 11 years ago
This was fixed by adding -Dcom.ibm.icu.util.TimeZone.DefaultTimeZoneType=ICU
to the config.ini file and restarting. I have absolutely no idea why, because it was in a forum post. But obviously is a bug.
Matt, thanks for your bug report and fix. I am puzzled: the steps you give are not enough to reproduce it. In fact, Mac OS X is the most tested platform, given that the worksheet was developed on Macs. I can definitely not reproduce it with either the Scala IDE or the Typesafe IDE. It must be something else, but I will investigate and try to understand where does the timezone come into play. Could you post the link to the forum?
I have the same problem on Linux. Downloaded scala-ide just today:
Scala plugin version: 2.1.0.m2-2_09-201209130821-0dd7542 Scala compiler version: 2.9.3.v20120906-004703-4c11a6593c Scala library version: 2.9.3.v20120906-004703-4c11a6593c Eclipse version: 3.7.2.v201202080800
But -Dcom.ibm.icu.util.TimeZone.DefaultTimeZoneType=ICU
did not help me, so may be it is not really the 'same' problem.
scala-ide.log
2012-09-22 02:17:22,750 ERROR [ForkJoinPool-1-worker-3] - System.err - IncrementalDocumentMixer <actor>: caught java.lang.NumberFormatException: For input string: "Picked"
2012-09-22 02:17:22,751 ERROR [ForkJoinPool-1-worker-3] - System.err - java.lang.NumberFormatException: For input string: "Picked"
2012-09-22 02:17:22,751 ERROR [ForkJoinPool-1-worker-3] - System.err - at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
2012-09-22 02:17:22,751 ERROR [ForkJoinPool-1-worker-3] - System.err - at java.lang.Integer.parseInt(Integer.java:492)
2012-09-22 02:17:22,751 ERROR [ForkJoinPool-1-worker-3] - System.err - at java.lang.Integer.parseInt(Integer.java:527)
2012-09-22 02:17:22,751 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.collection.immutable.StringLike$class.toInt(StringLike.scala:231)
2012-09-22 02:17:22,751 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.collection.immutable.StringOps.toInt(StringOps.scala:31)
2012-09-22 02:17:22,751 ERROR [ForkJoinPool-1-worker-3] - System.err - at org.scalaide.worksheet.text.Mixer$$anon$1.next(Mixer.scala:27)
2012-09-22 02:17:22,751 ERROR [ForkJoinPool-1-worker-3] - System.err - at org.scalaide.worksheet.text.Mixer$$anon$1.next(Mixer.scala:19)
2012-09-22 02:17:22,751 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.collection.Iterator$$anon$22.hasNext(Iterator.scala:458)
2012-09-22 02:17:22,751 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.collection.Iterator$class.foreach(Iterator.scala:772)
2012-09-22 02:17:22,751 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.collection.Iterator$$anon$22.foreach(Iterator.scala:451)
2012-09-22 02:17:22,751 ERROR [ForkJoinPool-1-worker-3] - System.err - at org.scalaide.worksheet.text.Mixer.mix(Mixer.scala:72)
2012-09-22 02:17:22,751 ERROR [ForkJoinPool-1-worker-3] - System.err - at org.scalaide.worksheet.runtime.IncrementalDocumentMixer.org$scalaide$worksheet$runtime$IncrementalDocumentMixer$$updateDocument(IncrementalDocumentMixer.scala:48)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at org.scalaide.worksheet.runtime.IncrementalDocumentMixer$$anonfun$act$1$$anonfun$apply$1.apply(IncrementalDocumentMixer.scala:39)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at org.scalaide.worksheet.runtime.IncrementalDocumentMixer$$anonfun$act$1$$anonfun$apply$1.apply(IncrementalDocumentMixer.scala:35)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.actors.ReactorTask.run(ReactorTask.scala:31)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.actors.Reactor$class.resumeReceiver(Reactor.scala:129)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at org.scalaide.worksheet.runtime.IncrementalDocumentMixer.scala$actors$ReplyReactor$$super$resumeReceiver(IncrementalDocumentMixer.scala:25)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.actors.ReplyReactor$class.resumeReceiver(ReplyReactor.scala:68)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at org.scalaide.worksheet.runtime.IncrementalDocumentMixer.resumeReceiver(IncrementalDocumentMixer.scala:25)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.actors.Actor$class.searchMailbox(Actor.scala:500)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at org.scalaide.worksheet.runtime.IncrementalDocumentMixer.searchMailbox(IncrementalDocumentMixer.scala:25)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.actors.Reactor$$anonfun$startSearch$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(Reactor.scala:117)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.actors.Reactor$$anonfun$startSearch$1$$anonfun$apply$mcV$sp$1.apply(Reactor.scala:114)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.actors.Reactor$$anonfun$startSearch$1$$anonfun$apply$mcV$sp$1.apply(Reactor.scala:114)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.actors.ReactorTask.run(ReactorTask.scala:33)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.concurrent.forkjoin.ForkJoinPool$AdaptedRunnable.exec(ForkJoinPool.java:611)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.concurrent.forkjoin.ForkJoinTask.quietlyExec(ForkJoinTask.java:422)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.concurrent.forkjoin.ForkJoinWorkerThread.mainLoop(ForkJoinWorkerThread.java:340)
2012-09-22 02:17:22,752 ERROR [ForkJoinPool-1-worker-3] - System.err - at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:325)
Heh.
java.lang.NumberFormatException: For input string: "Picked"
I realized that I have _JAVA_OPTIONS environment variable defined, so when every Java program is started it first output:
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
And if I unset _JAVA_OPTIONS before starting eclipse the problem is gone.
@dragos unfortunately I think the forum post is not publicly available because it's in a coursera class. I don't even have the original forum post because many of the students (Odersky's scala programming class on coursera) had this issue, and the one post I found with this answer in it just said "I'm not sure where I found the answer but adding (that line) fixed it". I do know that I didn't have the scala ide or any eclipse installed before I did this. All i did was download the scala ide from the typesafe website and run it. To be quite honest I don't know how to tell if that was in fact what fixed it, because I added the line to the config file, then rebooted, and it worked. If the ide threw an exception or something maybe I could have debugged it. I'd be willing to help you troubleshoot it if you can tell me how I can get a meaningful message about why it doesn't evaluate the worksheet. Maybe if I remove that line and reboot eclipse and try and evaluate a worksheet will it log somewhere that I can send you?
@mathewrphillips Thanks a lot for your help. @Bad-ptr has some diagnostics and a very precise indication of what needs to be fixed. It may be the same problem, you could check the scala-ide log file (Eclipse Preferences/Scala/Logging and there's logging leve, as well as a link to open the log file) and see if you see the same NumberFormatException
being logged.
Ran into the same problem with a recent build:
Build id: 3.0.0-vfinal-20130326-1146-Typesafe
Simply removed the worksheet body, put a single println that got evaluated, then paste my actual worksheet.
Same symptoms, different stack trace, -Dcom.ibm.icu.util.TimeZone.DefaultTimeZoneType=ICU
does not help.
Problems occurred when invoking code from plug-in: "org.eclipse.text".
eclipse.buildId=3.0.0-vfinal-20130320-1624-Typesafe
java.version=1.6.0_45
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -keyring /Users/vit/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -keyring /Users/vit/.eclipse_keyring -showlocation````
java.util.NoSuchElementException: None.get
at scala.None$.get(Option.scala:313)
at scala.None$.get(Option.scala:311)
at org.scalaide.worksheet.ScriptCompilationUnit.scalaProject$lzycompute(ScriptCompilationUnit.scala:33)
at org.scalaide.worksheet.ScriptCompilationUnit.scalaProject(ScriptCompilationUnit.scala:33)
at org.scalaide.worksheet.ScriptCompilationUnit.askReload(ScriptCompilationUnit.scala:77)
at org.scalaide.worksheet.reconciler.ScalaReconcilingStrategy$reloader$.documentChanged(ScalaReconcilingStrategy.scala:45)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged2(AbstractDocument.java:769)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:736)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:721)
at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:796)
at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1191)
at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1210)
at org.eclipse.jface.text.DefaultDocumentAdapter.replaceTextRange(DefaultDocumentAdapter.java:248)
at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:7180)
at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:7994)
at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2456)
at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5911)
at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5941)
at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5635)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1494)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1490)
at org.eclipse.swt.widgets.Canvas.sendKeyEvent(Canvas.java:493)
at org.eclipse.swt.widgets.Control.doCommandBySelector(Control.java:1060)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5563)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSResponder.interpretKeyEvents(NSResponder.java:68)
at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:587)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5473)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2095)
at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2253)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5535)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4989)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5138)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3610)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
I'm basically getting the same thing. Installed scala-ide using the Eclipse Marketplace.
eclipse.buildId=M20130204-1200
java.version=1.7.0_21
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product -vm/usr/bin/java -keyring /Users/sfitch/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -vm/usr/bin/java -keyring /Users/sfitch/.eclipse_keyring -showlocation
Backtrace:
java.util.NoSuchElementException: None.get
at scala.None$.get(Option.scala:313)
at scala.None$.get(Option.scala:311)
at org.scalaide.worksheet.ScriptCompilationUnit.scalaProject$lzycompute(ScriptCompilationUnit.scala:33)
at org.scalaide.worksheet.ScriptCompilationUnit.scalaProject(ScriptCompilationUnit.scala:33)
at org.scalaide.worksheet.ScriptCompilationUnit.askReload(ScriptCompilationUnit.scala:77)
at org.scalaide.worksheet.reconciler.ScalaReconcilingStrategy$reloader$.documentChanged(ScalaReconcilingStrategy.scala:45)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged2(AbstractDocument.java:769)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:736)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:721)
at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:796)
at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1191)
at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1210)
at org.eclipse.jface.text.DefaultDocumentAdapter.replaceTextRange(DefaultDocumentAdapter.java:248)
at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:7178)
at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:8007)
at org.eclipse.swt.custom.StyledText.doBackspace(StyledText.java:2277)
at org.eclipse.swt.custom.StyledText.invokeAction(StyledText.java:6986)
at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5911)
at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5937)
at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5629)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4136)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1495)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1491)
at org.eclipse.swt.widgets.Canvas.sendKeyEvent(Canvas.java:497)
at org.eclipse.swt.widgets.Control.doCommandBySelector(Control.java:1060)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5587)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSResponder.interpretKeyEvents(NSResponder.java:68)
at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:587)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5497)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:221)
at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2102)
at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2299)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5559)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5004)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5153)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3618)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
I had the same issue when installing from the marketplace. By switching the default jre to java 6 the worksheet is working again. Ubuntu 13.04 64bit.
Steps to reproduce.
I have also checked under Preferences -> Scala Worksheet and saw that the checkbox for
Evaluate worksheet on save
is checked and greyed out so it is not able to be unchecked.This is a fresh install of whatever version is available at http://typesafe.com/technology/scala-ide