View Single Post
  #9   Spotlight this post!  
Unread 19-02-2013, 12:36
rsaccone rsaccone is offline
Registered User
FRC #3950
 
Join Date: Feb 2013
Location: Glen Head, NY
Posts: 23
rsaccone is an unknown quantity at this point
Re: NetworkTable issues...

Hi Mitchell,

I took a run up to the school and I figured out the issue as soon I got a stack trace. We had a local variable that was shadowing an instance variable so the instance variable for the NetworkTable never got initialized! Hence the null reference exception when the instance variable for the table was being referenced later. I'm going to get the code refactored to avoid the deadlock scenario that you pointed out.

One thing I noticed is that the getDouble api is struck out by NetBeans. I guess it has been deprecated in favor of getNumber. Also there is a variation on getNumber which takes not only the key but a double as well. The JavaDoc I have is not very descriptive but I'm assuming the double parameter is returned if the key doesn't exist in the table. Sound right?

Thanks again,
Rob
Reply With Quote