Bugs item #1335905, was opened at 2005-10-23 20:04
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1335905&group_id=44253
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Other
Group: Crashes
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: NullPointerException while using interactions window
Initial Comment:
DrJava Version : 20050814-2234
On Mac OS10.4, JDK 1.5
Hi, I don't have a sourceforge account, but my e-mail
is: tim...@ho.... I was doing my
homework, using the interaction and the bug came up.
(Running the main method from the interaction)
Here's the trace and the source code:
java.lang.NullPointerException
at
javax.swing.text.StyledEditorKit$AttributeTracker.updateInputAttributes(StyledEditorKit.java:223)
at
javax.swing.text.StyledEditorKit$AttributeTracker.caretUpdate(StyledEditorKit.java:258)
at
javax.swing.text.JTextComponent.fireCaretUpdate(JTextComponent.java:367)
at
javax.swing.text.JTextComponent$MutableCaretEvent.fire(JTextComponent.java:3232)
at
javax.swing.text.JTextComponent$MutableCaretEvent.stateChanged(JTextComponent.java:3254)
at
javax.swing.text.DefaultCaret.fireStateChanged(DefaultCaret.java:776)
at apple.laf.AquaCaret.fireStateChanged(AquaCaret.java:50)
at
javax.swing.text.DefaultCaret.changeCaretPosition(DefaultCaret.java:1206)
at
javax.swing.text.DefaultCaret.handleSetDot(DefaultCaret.java:1114)
at
javax.swing.text.DefaultCaret.setDot(DefaultCaret.java:1095)
at
javax.swing.text.DefaultCaret.setDot(DefaultCaret.java:1023)
at
javax.swing.text.JTextComponent.setCaretPosition(JTextComponent.java:1400)
at
edu.rice.cs.drjava.ui.AbstractDJPane.setCaretPosition(AbstractDJPane.java:135)
at
edu.rice.cs.drjava.ui.AbstractConsoleController.moveTo(AbstractConsoleController.java:366)
at
edu.rice.cs.drjava.ui.AbstractConsoleController.moveToEnd(AbstractConsoleController.java:350)
at
edu.rice.cs.drjava.ui.AbstractConsoleController$CaretUpdateListener$1.run(AbstractConsoleController.java:232)
at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:267)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:196)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:190)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:182)
at
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
//CS440DL-Fall 2006
//Assignment2--Ting-Ku Liu
//calculation of 3.14159
import java.util.Scanner;
public class assi2 {
public static void main(String[] arg) {
Scanner input = new Scanner(System.in);
double pi;
double x = 1;
double z = 1;
pi = 0;
int numTimes = 0;
// while (pi < 3.14159) {
while(pi < 3.14159 || pi >= 3.1416) {
double term = (4/x)*z;
pi = pi + term;
System.out.println(term +", " + pi);
x = x+2;
z = z*-1;
numTimes = numTimes + 1;
}
System.out.println("Took "+numTimes+" iterations!!!!");
}
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1335905&group_id=44253
|