View Single Post
  #6   Spotlight this post!  
Unread 28-12-2010, 18:46
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Native C string (char*) to java String

Quote:
Originally Posted by byteit101 View Post
I'm not sure about what died either (Netbeans won't connect and send me print statements)
Have you tried using the stand-alone NetConsole client to monitor what's happening at this time? You should be able to use both it and NetBeans at the same time (though probably not both on the same machine).

Quote:
Originally Posted by byteit101 View Post
...this code
Code:
zombinstance.Send("taco", joystick.GetY());
zombinstance.Send("value", zombinstance.GetString("invalue"));
does not, and all controls are dead, which leads me to assume that it kills Java somehow (but the DS still says Enabled and code) (and If I only execute the GetString function if a button is pressed, it dies when the button is pressed)
I'm guessing you are abbreviating here... I see no Send method that takes parameters... only an Add() that takes parameters, which you then follow up with a Send(). Do you get the "crash" or "death" or whatever if you just call GetString and then use it in a System.out.println or something?

If the DS still says there is code, then at least part of the JVM is still running a DS thread. Perhaps you are seeing a deadlock between your Java objects. Or maybe a task in C++ is crashing while holding a sync object that one of these calls needs. However, you don't seem to be using the BlockingFunction JNA function object, so if you blocked outside of Java, the whole VM would hang and stop the DS thread in Java.

See if you can isolate the issue a bit more.

-Joe
Reply With Quote