ra4king / CircuitSim

Basic Circuit Simulator
https://ra4king.github.io/CircuitSim
BSD 3-Clause "New" or "Revised" License
77 stars 28 forks source link

java.lang.NullPointerException at Subcircuit.valueChanged #56

Closed ra4king closed 2 years ago

ra4king commented 5 years ago

java.lang.NullPointerException at com.ra4king.circuitsim.simulator.components.Subcircuit.valueChanged(Subcircuit.java:145) at com.ra4king.circuitsim.simulator.CircuitState$LinkState.propagate(CircuitState.java:323) at com.ra4king.circuitsim.simulator.CircuitState.propagateSignal(CircuitState.java:165) at com.ra4king.circuitsim.simulator.Simulator.lambda$null$9(Simulator.java:177) at java.lang.Iterable.forEach(Unknown Source) at com.ra4king.circuitsim.simulator.Simulator.lambda$step$10(Simulator.java:167) at com.ra4king.circuitsim.simulator.Simulator.runSync(Simulator.java:56) at com.ra4king.circuitsim.simulator.Simulator.step(Simulator.java:149) at com.ra4king.circuitsim.simulator.Simulator.lambda$stepAll$11(Simulator.java:217) at com.ra4king.circuitsim.simulator.Simulator.runSync(Simulator.java:56) at com.ra4king.circuitsim.simulator.Simulator.stepAll(Simulator.java:199) at com.ra4king.circuitsim.gui.CircuitSim.runSim(CircuitSim.java:408) at com.ra4king.circuitsim.gui.CircuitSim.access$900(CircuitSim.java:128) at com.ra4king.circuitsim.gui.CircuitSim$2.handle(CircuitSim.java:2572) at javafx.animation.AnimationTimer$AnimationTimerReceiver.lambda$handle$485(AnimationTimer.java:57) at java.security.AccessController.doPrivileged(Native Method) at javafx.animation.AnimationTimer$AnimationTimerReceiver.handle(AnimationTimer.java:56) at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:357) at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267) at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:514) at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:498) at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:491) at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$403(QuantumToolkit.java:319) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177) at java.lang.Thread.run(Unknown Source)

ra4king commented 2 years ago

I'm going to assume the race condition fixes in issue https://github.com/ra4king/CircuitSim/issues/46 have solved this. I'll reopen if this occurs again.