Java Exceptions While Testing Memory/Computer

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Java Exceptions While Testing Memory/Computer

CosmicVole
Hello,

I have been working through the project for Chapter 5, and I have noticed that sometimes Java exceptions are reported when running the HardwareSimulator. The simulator generally keeps running (though I have had it freeze up at least once), and the results of the tests seem correct.

The exceptions occur most commonly while running 'Memory.tst', but also sometimes during 'ComputerRect.tst'.

Example from a run of 'Memory.tst':
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at javax.swing.BufferStrategyPaintManager.flushAccumulatedRegion(BufferStrategyPaintManager.java:417)
	at javax.swing.BufferStrategyPaintManager.endPaint(BufferStrategyPaintManager.java:377)
	at javax.swing.RepaintManager.endPaint(RepaintManager.java:1363)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5164)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
	at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Just wondering if anyone else has encountered anything like this?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Java Exceptions While Testing Memory/Computer

ivant
I don't remember if I've seen exactly this exception, but I've seen a few.

One thing I've noticed is, that it tends to misbehave if you reload the script (or load another). It seems to be keeping some of its previous state and then run into trouble. That's why my routine was to always restart it any time I needed to reload.