The GUI Multithread Bug


Home Prefer the
Original?
New
EdSim51SH
About the
Simulator

User's
Guide

Installation
Instructions
Examples Contact
Us
The Fundamental
Simulations
Site Map
 

From time to time I have been bothered by a GUI bug. Users have also reported this bug. But it didn't happen very often and so I didn't make finding and fixing it a top priority. However, I finally put some time aside and, with the help of online discussions about multithreading and Java Swing components, I believe I have removed the bug.

If you find the bug still crops up, please let me know. Below is an example of what to look out for.



java.lang.NullPointerException

javax.swing.text.PlainView.updateMetrics(Unknown Source)
javax.swing.text.PlainView.updateDamage(Unknown Source)
javax.swing.text.PlainView.removeUpdate(Unknown Source)
javax.swing.text.FieldView.removeUpdate(Unknown Source)
javax.swing.plaf.basic.BasicTextUI$RootView.removeUpdate(Unknown Source)
javax.swing.plaf.basic.BasicTextUI$UpdateHandler.removeUpdate(Unknown Source)
javax.swing.text.AbstractDocument.fireRemoveUpdate(Unknown Source)
javax.swing.text.AbstractDocument.handleRemove(Unknown Source)
javax.swing.text.AbstractDocument.remove(Unknown Source)
javax.swing.text.AbstractDocument.replace(Unknown Source)
javax.swing.text.JTextComponent.setText(Unknown Source)
edsim51sh.MainPanel.updateBitFieldData(MainPanel.java:3312)
edsim51sh.MainPanel.update8051Gui(MainPanel.java:4006)
edsim51sh.TargetBoard.setPortPin(TargetBoard.java:166)
edsim51di.KeypadGraphics.updatePortPins(KeypadGraphics.java:373)
edsim51di.KeypadGraphics.update(KeypadGraphics.java:263)
edsim51di.Gui.updatePortPins(Gui.java:256)
edsim51di.Board.updatePortPins(Board.java:384)
edsim51sh.Memory.updatePortPins(Memory.java:362)
edsim51sh.Cpu.executeInstructions(Cpu.java:564)
edsim51sh.MainPanel.step(MainPanel.java:3762)
edsim51sh.MainPanel.run(MainPanel.java:3688)
java.lang.Thread.run(Unknown Source)



 
Copyright (c) 2013 James Rogers