For anyone who is interested, here is the code I added to submission_details.php to get this to work:

//start attempt of determining any runtime errors
$test = $DB->q('MAYBETUPLE SELECT judgingid, output_error, runresult
                FROM judging_run
                WHERE judgingid = %i AND runresult = "run-error"',$row['judgingid']);

if($test) {
        echo "Runtime Error: ";
        foreach($test as $key => $value) {
                if($key == "output_error") {
                        echo "$value<br>";
                }
        }
}


On Thu, Oct 22, 2015 at 6:30 AM, Jaap Eldering <jaap@jaapeldering.nl> wrote:
Hi Matthew,

On 22-10-15 01:38, Matthew Fahrenbacher wrote:
> Hi all - is there a way to make runtime errors visible to competitors?
> I'd like our competitors to see that they are getting exceptions
> (ArrayIndexOutOfBoundsException, etc) and at what line of code (for
> java).  Is this something that can be enabled?

No, this is not possible with the current code. We only have the option
to show teams the compiler output, currently.

That said, it should not be too hard to try to do the same for runtime
errors, see www/team/submission_details.php for how the compile output
is displayed. Basically, you'd want to display the contents of the DB
field judging_run.output_error.

A couple of remarks:
- I suppose you're using DOMjudge in a teaching environment where
information leakage is not a real problem. But be aware that this error
output contains stderr from the team solution, so students could
potentially output secret testdata, etc.
- Although Java nicely reports a stack trace when it crashes, not all
languages do, and the different way they flag errors makes it impossible
to properly determine the precise cause of the crash (segment fault,
division by zero, etc...) Therefore we've not tried to detect these
subcases of "run-error".

Let us know if you're interested in implementing this: we might be able
to help out and see if we can include it in the main code.

Jaap

_______________________________________________
DOMjudge-devel mailing list
DOMjudge-devel@domjudge.org
https://www.domjudge.org/mailman/listinfo/domjudge-devel