Visualiser. The nullptr issues relating to the XML data files appears to be fixed. Essentially, the StartController.startRaceNoScaling() function was being called as soon possible, before it was even ready - setRaceClock either hadn't been called or hadn't finished executing yet, so the StartController.raceClock member was null, causing crashes.

Also changed the while(visualiserInput.getRaceStatus() == null) loops to an if-then-return early block. They caused the program to freeze if the race data source wasn't sending any race status messages (currently, our mock doesn't send any once the race has finished).

#story[782]
This commit is contained in:
fjc40
2017-05-07 18:34:44 +12:00
parent 020c0329b0
commit 466e22437b
2 changed files with 32 additions and 7 deletions
@@ -162,6 +162,7 @@ public class MockOutput implements Runnable
try {
while (true){
System.out.println("Waiting for a connection...");//TEMP DEBUG REMOVE
mockSocket = serverSocket.accept();
outToVisualiser = new DataOutputStream(mockSocket.getOutputStream());