#901 Internal Program Error: Can't find method data for Word:

4: Serious
open
nobody
5
2011-02-02
2011-02-02
Mathias Ricken
No

This program, saved as IntOps.dj (functional Java language level), blows up in the compiler:

public class IntOps {
public static void main(String[] args) {
int a = Integer.parseInt(args[0]);
int b = Integer.parseInt(args[1]);
int sum = a + b;
int prod = a * b;
int quot = a / b;
int rem = a % b;

System.out.println(a + " + " + b + " = " + sum);
System.out.println(a + " * " + b + " = " + prod);
System.out.println(a + " / " + b + " = " + quot);
System.out.println(a + " % " + b + " = " + rem);
System.out.println(a + "=" + quot + " * " + b + " + " + rem);
}
}

The exception is

edu.rice.cs.util.UnexpectedException: java.lang.RuntimeException: Internal Program Error: Can't find method data for Word:
sourceInfo = [IntOps.dj: (2,24)-(2,27)]
text = main Please report this bug.
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel._doCompile(DefaultCompilerModel.java:276)
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel.compileAll(DefaultCompilerModel.java:170)
at edu.rice.cs.drjava.ui.MainFrame._compileAll(MainFrame.java:5535)
at edu.rice.cs.drjava.ui.MainFrame.access$5200(MainFrame.java:121)
at edu.rice.cs.drjava.ui.MainFrame$55.actionPerformed(MainFrame.java:941)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Internal Program Error: Can't find method data for Word:
sourceInfo = [IntOps.dj: (2,24)-(2,27)]
text = main Please report this bug.
at edu.rice.cs.javalanglevels.Augmentor.forConcreteMethodDef(Augmentor.java:221)
at edu.rice.cs.javalanglevels.Augmentor.forConcreteMethodDef(Augmentor.java:51)
at edu.rice.cs.javalanglevels.tree.ConcreteMethodDef.visit(ConcreteMethodDef.java:28)
at edu.rice.cs.javalanglevels.tree.JExpressionIFDepthFirstVisitor.forBracedBody(JExpressionIFDepthFirstVisitor.java:1553)
at edu.rice.cs.javalanglevels.tree.BracedBody.visit(BracedBody.java:21)
at edu.rice.cs.javalanglevels.Augmentor.forClassDef(Augmentor.java:260)
at edu.rice.cs.javalanglevels.Augmentor.forClassDef(Augmentor.java:51)
at edu.rice.cs.javalanglevels.tree.ClassDef.visit(ClassDef.java:28)
at edu.rice.cs.javalanglevels.Augmentor.forSourceFile(Augmentor.java:471)
at edu.rice.cs.javalanglevels.Augmentor.forSourceFile(Augmentor.java:51)
at edu.rice.cs.javalanglevels.tree.SourceFile.visit(SourceFile.java:42)
at edu.rice.cs.javalanglevels.LanguageLevelConverter.convert(LanguageLevelConverter.java:382)
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel._compileLanguageLevelsFiles(DefaultCompilerModel.java:550)
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel._compileFiles(DefaultCompilerModel.java:343)
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel._doCompile(DefaultCompilerModel.java:271)
... 29 more

Caused by:
java.lang.RuntimeException: Internal Program Error: Can't find method data for Word:
sourceInfo = [IntOps.dj: (2,24)-(2,27)]
text = main Please report this bug.
at edu.rice.cs.javalanglevels.Augmentor.forConcreteMethodDef(Augmentor.java:221)
at edu.rice.cs.javalanglevels.Augmentor.forConcreteMethodDef(Augmentor.java:51)
at edu.rice.cs.javalanglevels.tree.ConcreteMethodDef.visit(ConcreteMethodDef.java:28)
at edu.rice.cs.javalanglevels.tree.JExpressionIFDepthFirstVisitor.forBracedBody(JExpressionIFDepthFirstVisitor.java:1553)
at edu.rice.cs.javalanglevels.tree.BracedBody.visit(BracedBody.java:21)
at edu.rice.cs.javalanglevels.Augmentor.forClassDef(Augmentor.java:260)
at edu.rice.cs.javalanglevels.Augmentor.forClassDef(Augmentor.java:51)
at edu.rice.cs.javalanglevels.tree.ClassDef.visit(ClassDef.java:28)
at edu.rice.cs.javalanglevels.Augmentor.forSourceFile(Augmentor.java:471)
at edu.rice.cs.javalanglevels.Augmentor.forSourceFile(Augmentor.java:51)
at edu.rice.cs.javalanglevels.tree.SourceFile.visit(SourceFile.java:42)
at edu.rice.cs.javalanglevels.LanguageLevelConverter.convert(LanguageLevelConverter.java:382)
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel._compileLanguageLevelsFiles(DefaultCompilerModel.java:550)
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel._compileFiles(DefaultCompilerModel.java:343)
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel._doCompile(DefaultCompilerModel.java:271)
at edu.rice.cs.drjava.model.compiler.DefaultCompilerModel.compileAll(DefaultCompilerModel.java:170)
at edu.rice.cs.drjava.ui.MainFrame._compileAll(MainFrame.java:5535)
at edu.rice.cs.drjava.ui.MainFrame.access$5200(MainFrame.java:121)
at edu.rice.cs.drjava.ui.MainFrame$55.actionPerformed(MainFrame.java:941)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

System Properties:
DrJava Version drjava-20100913-r5387
DrJava Build Time 20100913-2126

drjava.debug.port = 60644
java.runtime.name = Java(TM) SE Runtime Environment
sun.boot.library.path = C:\Program Files (x86)\Java\jre6\bin
java.vm.version = 14.3-b01
java.vm.vendor = Sun Microsystems Inc.
java.vendor.url = http://java.sun.com/
path.separator = ;
java.vm.name = Java HotSpot(TM) Client VM
file.encoding.pkg = sun.io
sun.java.launcher = SUN_STANDARD
user.country = US
sun.os.patch.level =
java.vm.specification.name = Java Virtual Machine Specification
user.dir = <anonymized user.home>\Downloads
java.runtime.version = 1.6.0_17-b04
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs = C:\Program Files (x86)\Java\jre6\lib\endorsed
os.arch = x86
java.io.tmpdir = <anonymized user.home>\AppData\Local\Temp\ line.separator = "\u000d\u000a"
java.vm.specification.vendor = Sun Microsystems Inc.
user.variant =
os.name = Windows 7
sun.jnu.encoding = Cp1252
java.library.path = C:\Program Files (x86)\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Imaging\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Quest Software\PuTTY\;C:\Program Files (x86)\Java\jre6\bin
java.specification.name = Java Platform API Specification
java.class.version = 50.0
sun.management.compiler = HotSpot Client Compiler
os.version = 6.1
user.home = <anonymized user.home>
user.timezone = America/Los_Angeles
java.awt.printerjob = sun.awt.windows.WPrinterJob
file.encoding = Cp1252
java.specification.version = 1.6
java.class.path = <anonymized user.home>\Downloads\drjava-stable-20100913-r5387.exe
user.name = <anonymized user.name>
java.vm.specification.version = 1.0
java.home = C:\Program Files (x86)\Java\jre6
sun.arch.data.model = 32
user.language = en
java.specification.vendor = Sun Microsystems Inc.
awt.toolkit = sun.awt.windows.WToolkit
java.vm.info = mixed mode, sharing
java.version = 1.6.0_17
java.ext.dirs = C:\Program Files (x86)\Java\jre6\lib\ext;C:\Windows\Sun\Java\lib\ext
sun.boot.class.path = C:\Program Files (x86)\Java\jre6\lib\resources.jar;C:\Program Files (x86)\Java\jre6\lib\rt.jar;C:\Program Files (x86)\Java\jre6\lib\sunrsasign.jar;C:\Program Files (x86)\Java\jre6\lib\jsse.jar;C:\Program Files (x86)\Java\jre6\lib\jce.jar;C:\Program Files (x86)\Java\jre6\lib\charsets.jar;C:\Program Files (x86)\Java\jre6\classes
java.vendor = Sun Microsystems Inc.
file.separator = \ java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
sun.io.unicode.encoding = UnicodeLittle
sun.cpu.endian = little
java.rmi.server.hostname = 127.0.0.1
sun.desktop = windows
sun.cpu.isalist = pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86

DrJava configuration file
In resource bundle edu.rice.cs.drjava.config.options:
nothing

In shadowed configuration:
key.delete.next = [shift DELETE]
key.delete.previous = [shift BACK_SPACE]
language.level = 4
recent.files = [C:\\Users\\&lt;anonymized user.name>\\Documents\\Java\\HelloWorld.java]
window.x = 320
window.y = 100
last.dir = C:\\Users\\&lt;anonymized user.name>\\Documents\\Java\\IntOps.dj
last.interactions.dir = C:\\Users\\&lt;anonymized user.name>\\Documents\\Java
tabbedpanes.state = 720 450 700 400
new.version.notification.last = 1296251713281
drjava.survey.notification.last = 1296601912671
drjava.survey.result.last = http://www.drjava.org/submit-usage.php?rev=5387&os.name=Windows%207&os.version=6.1&java.version=1.6.0_17&java.vendor=Sun%20Microsystems%20Inc.
file.ext.registration = never

Used memory: about 17.04 megabytes
Free memory: about 8.97 megabytes
Total memory: about 26.00 megabytes
Total memory can expand to: about 63.56 megabytes

Number of processors/cores: 4

Compiler Discovery Log:
From config: not set
makeFromRuntime: compilerAdapter=edu.rice.cs.drjava.model.compiler.Javac160Compiler
attempt = JDK 6.0_17, isAvailable() = false
compiler=edu.rice.cs.drjava.model.compiler.NoCompilerAvailable
at least Java 6, try EclipseCompiler
version for Eclipse: Java 6.0
attempt = Eclipse Compiler 0.A48, isAvailable() = true
compiler=edu.rice.cs.drjava.model.compiler.EclipseCompiler
compiler found
compilers found: 1
From runtime: JDK library 6.0
Dir added: C:\Program Files (x86)\Java\jre6
Dir added: C:\Program Files (x86)\Java
Dir added: C:\Program Files (x86)
Dir added: C:\Program Files (x86)\Java
Dir added: C:\Program Files (x86)
Dir not added: C:\Program Files\Java
Dir added: C:\Program Files
Dir not added: C:\Java
Dir added: <anonymized user.home>\Downloads
Dir not added: C:\Java
Dir added: <anonymized user.home>\Downloads
Dir not added: C:\System\Library\Frameworks\JavaVM.framework\Versions
Dir not added: C:\usr\java
Dir not added: C:\usr\j2se
Dir not added: C:\usr
Dir not added: C:\usr\local\java
Dir not added: C:\usr\local\j2se
Dir not added: C:\usr\local
Dir not added: C:\usr\lib\jvm
Dir not added: C:\usr\lib\jvm\java-6-sun
Dir not added: C:\usr\lib\jvm\java-1.5.0-sun
Dir not added: C:\usr\lib\jvm\java-6-openjdk
Dir not added: C:\home\javaplt\java\Linux-i686
File not added: C:\Program Files (x86)\Java\lib\tools.jar
File not added: C:\Program Files (x86)\Java\Classes\classes.jar
File not added: C:\Program Files\JavaMint\langtools\dist\lib\classes.jar
File not added: C:\Program Files\JavaMint\langtools\dist\lib\tools.jar
File not added: C:\usr\local\soylatte\lib\classes.jar
File not added: C:\usr\local\soylatte\lib\tools.jar
File not added: C:\usr\local\JavaMint\langtools\dist\lib\classes.jar
File not added: C:\usr\local\JavaMint\langtools\dist\lib\tools.jar
MINT_HOME not set
File added: <anonymized user.home>\Downloads\drjava-stable-20100913-r5387.exe
Result:

Discussion

  • I have an internal build that fixes this bug. If you send you email address to cork@rice.edu, I will send you a jar file for the internal build. We also plan to fix the bug in the build distributed from sourceforge/drjava.org within the next day or so.