|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
NetworkTable crash in unmodified SimpleRobot template
I'm getting a null pointer exeption in
Code:
NetworkTable::Initialize() Code:
staticProvider = new NetworkTableProvider(*(mode->CreateNode(ipAddress.c_str(), port, threadManager))); Earlier on in the call stack, the crash stems from Code:
SimpleRobot::StartCompetition() Code:
LiveWindow *lw = LiveWindow::GetInstance(); Code:
NetworkTable::GetTable("LiveWindow")
When will this be fixed in WPILib, and how can I work around it in the meantime? Last edited by IBeMad : 07-01-2013 at 01:12. |
|
#2
|
|||
|
|||
|
Re: NetworkTable crash in unmodified SimpleRobot template
Hi,
Are you sure that this is unmodified. We just ran the template project again and it worked fine. If you are still having issues would it be possible to do a little more debugging and figure out exactly what is null on that line. --Mitchell |
|
#3
|
|||
|
|||
|
Re: NetworkTable crash in unmodified SimpleRobot template
Yes, I'm sure that it's umodified. I guess I'll just have to fix the bug in WPILib myself and submit it.
|
|
#4
|
|||||
|
|||||
|
Re: NetworkTable crash in unmodified SimpleRobot template
I suggest that you reinstall the WindRiver update before blaming the library itself.
|
|
#5
|
|||
|
|||
|
Re: NetworkTable crash in unmodified SimpleRobot template
No luck reinstalling everything, however it does work on other computers. Just not mine. Any other ideas?
|
|
#6
|
|||
|
|||
|
Re: NetworkTable crash in unmodified SimpleRobot template
If you could run the debugger and determine what value on that line is null then I may be able to try to help a little more.
|
|
#7
|
|||
|
|||
|
Re: NetworkTable crash in unmodified SimpleRobot template
Code:
staticProvider = new NetworkTableProvider(*(mode->CreateNode(ipAddress.c_str(), port, threadManager))); Anyway, a null pointer exception would seem to indicate that something on that line is an uninitialized pointer. How/where did you declare staticProvider? |
|
#8
|
||||
|
||||
|
Re: NetworkTable crash in unmodified SimpleRobot template
Quote:
Last edited by nightpool : 08-01-2013 at 09:37. |
|
#9
|
|||
|
|||
|
Re: NetworkTable crash in unmodified SimpleRobot template
It looks like it expects an address to a node -- and if createNode returns a pointer, he has an asterisk in there that he doesn't need. I think that's the cause of his null pointer exception -- that asterisk creates an uninitialized pointer.
|
|
#10
|
|||
|
|||
|
Re: NetworkTable crash in unmodified SimpleRobot template
createNode will always return a non-null pointer. The NetworkTableProvider constructor takes a reference to the pointer type returned by createNode. This code has run fine on under linux and the crio so it is weird that it is failing here.
staticProvider is declared in NetworkTable.h |
|
#11
|
|||
|
|||
|
Re: NetworkTable crash in unmodified SimpleRobot template
Could ipAddress contain the null string? If so, ipAddress.c_str() would return nullptr.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|