Export to GitHub

europa-pso - issue #96

Incorrect NDDL causes silent errors


Posted on Feb 8, 2011 by Swift Ox

What steps will reproduce the problem? 1. Use makeproject to create a example problem. 2. Change the predicate definition to be: {{{ YourObject::helloWorld{ eq(duration, 10);

int oops; this.oops == 1; // meets (object.helloWorld); // met_by(object.helloWorld); } }}}

  1. Try running the problem.

When I run from the Eclipse UI, or from the command line (using 'make'), I see no errors reported, even though 'this.oops' shouldn't have the 'this' there. Things seem to be dying silently behind the scenes, since no plan is created.

This kind of error is very difficult to track down without some indication of the source of the issue.

(I ran into other examples of the same thing, but there's a general solution for them all).

Comment #1

Posted on Mar 3, 2011 by Swift Ox

Two more examples I just came across:

  1. Change the class name itself, but leave everything else referencing the old class.

  2. Similarly, leave the class name, but change one of the references to it. For example, change "YourObject::helloWorld" to "YourObjectX::helloWorld".

Comment #2

Posted on Mar 3, 2011 by Swift Ox

Two more examples I just came across:

  1. Change the class name itself, but leave everything else referencing the old class.

  2. Similarly, leave the class name, but change one of the references to it. For example, change "YourObject::helloWorld" to "YourObjectX::helloWorld".

Comment #3

Posted on Apr 13, 2011 by Swift Ox

(No comment was entered for this change.)

Comment #4

Posted on Aug 17, 2011 by Happy Ox

(No comment was entered for this change.)

Comment #5

Posted on Sep 1, 2011 by Happy Rabbit

Another example of silent errors:

The model of the attached files has a mistake, the line
eq(p.to, successor.position);

compares p.to to a token that has not been declared yet. The easy way to fix this issue is moving previous command after
meets( effect object.currentLocation successor);

Insted of giving an error message, you just get an empty plandatabase.

Rover::Go{

met_by( condition object.currentLocation predecessor); neq( predecessor.position, to );

met_by( condition object.instrument.state_.setStowState predState); predState.value == unstowed;

// The path used must be between the 2 points eq(p.from, predecessor.position); eq(p.to, successor.position);

meets( effect object.currentLocation successor); eq(successor.position, to); // prevents rover from going from a location straight back to that location.

// Pull power from the battery equal to the path cost. starts( effect Battery.consume tx); eq(tx.quantity, p.cost);

}

Attachments

Comment #6

Posted on May 30, 2012 by Happy Ox

(No comment was entered for this change.)

Comment #7

Posted on Aug 7, 2014 by Swift Hippo

It turns out that the project template Main.cc file didn't actually catch any NDDL errors of any sort. That's been fixed, so NDDL errors should prevent further execution. NDDL problems in PSUI are reported to the console, which isn't ideal, but at least they aren't hidden.

I know everybody who's commented on this ticket has limited time to verify things (or even remember what was going on), so I'm going to leave this as "Started" for a couple of weeks for comments and then close it as fixed and open another, lower-priority ticket about better error reporting in PSUI.

Comment #8

Posted on Aug 7, 2014 by Swift Hippo

I forgot to mention: the change I committed was r6740.

Comment #9

Posted on Sep 20, 2014 by Swift Hippo

PSUI ticket is issue 164.

Status: Fixed

Labels:
Type-Defect Priority-Critical Milestone-EUROPA-2.7