I bet your NPE is propagated up the call stack, that's why it's caught at xGPA.java:341
.
final String variableText = (variable != null) ? variable.getText() : null;
final Double result = (variableText != null) ? Double.parseDouble(variableText) : 0;