Ok, i've narrowed it down a bit, and the crashing is due to Double.parseDouble("") throwing an exception because GetString is always returning "" (empty string)
Code:
public String GetString(String name)
{
Pointer ptr = Pointer.createStringBuffer(name);
int retturn = getstringfnc.call1(ptr);
Address adr = Address.fromPrimitive(retturn);
String str = Pointer.NativeUnsafeGetString(adr);
System.out.println("String:'"+str+"'");
ptr.free();
return str;
}
public double GetDouble(String name)
{
try
{
return Double.parseDouble(GetString(name));
}
catch(Throwable t) { }
return 0;
}
and
Code:
public void operatorControl() {
getWatchdog().setEnabled(false);
while (isOperatorControl()) {
if (z.CanSend()) {
z.Add("taco", stick.getY());
z.Add("val", z.GetDouble("ival"));
z.Send();
}
Timer.delay(0.01);
}
}
produces
Code:
String:''
String:''
String:''
String:''
String:''
String:''
String:''
String:''
String:''
String:''
String:''
String:''