The URCap I’m writing contains a JTree object as part of its UI, as seen below.
I can alter the structure of the tree just fine, and I have gotten to be bug free. However once a node has been removed from the tree, tapping any of the blank space below the list of nodes gives this big NullPointerException window, not like the usual window which would tell me where in my java code the error was thrown.
The unusual thing about this error is that it only occurs when testing the cap on a real robot, in the simulator this error doesn’t occur. I’ve tested it on a real robot software 3.7 and 3.8, and the error is thrown on both. Likewise I’ve tested it on simulator software 3.7 and 3.8, and the error isn’t thrown on either. I couldn’t test the cap on earlier versions of software as it was built on sdk 1.4.
I’ve tried wrapping the body of the TreeSelectionListener in a try{}/catch(NullPointerExcetion){}
but that hasn’t helped.