In class RunsTablePane, in method startAutoJudging(), there is the following code:
// make sure the OS supports judging of all problems this judge
// is set up to autojudge BEFORE starting autojudging.
List<Problem> plist = autoJudgingMonitor.getOSUnsupportedAutojudgeProblemList();
if(!plist.isEmpty()) {
StringBuffer message =new StringBuffer();
... a bunch of code to construct a detailed message listing the problems which cannot be judged ...
FrameUtilities.showMessage(this, message.toString(), "Judging Not Supported");
return;
}
The second and third arguments to FrameUtilities.showMessage(...) are backwards. The method signature is
public static void showMessage(Component component, String title, String message)
but the code above is passing the message, THEN the title. The result is a dialog with a short, uninformative message ("Judging Not Supported") and a title which is lengthy and contains details -- but is cut off by the GUI component.
To Reproduce:
On a Linux system, do NOT enable the "CGroup support" for PC2 (do NOT run the pc2installservice or pc2installsandbox scripts, and make sure the corresponding pc2 cgroup service has not been previously installed.
Start a server, loading the samps/contests/interactive test contest.
Start Judge 1.
Expected behavior:
Since CGroups have not been enabled but the interactive contest has problems which require CGroups, and since Judge 1 is by default to configured to Auto-Judge the interactive problems, a dialog should appear giving a detailed explanation of the issue.
Actual behavior:
The following very unhelpful dialog appears:
Environment:
OS name and version under which the issue was detected Ubuntu 22.04:
PC2 Version 9.9-build-6682 (built from PR #798 )
Additional context:
The fix for this bug is to simply swap the arguments in the call to FrameUtilities.showMessage(...) in method RunsTablePane.startAutoJudging().
Describe the issue:
In class
RunsTablePane
, in methodstartAutoJudging()
, there is the following code:The second and third arguments to
FrameUtilities.showMessage(...)
are backwards. The method signature isbut the code above is passing the
message
, THEN thetitle
. The result is a dialog with a short, uninformative message ("Judging Not Supported") and a title which is lengthy and contains details -- but is cut off by the GUI component.To Reproduce:
pc2installservice
orpc2installsandbox
scripts, and make sure the corresponding pc2 cgroup service has not been previously installed.samps/contests/interactive
test contest.Expected behavior: Since CGroups have not been enabled but the
interactive
contest has problems which require CGroups, and since Judge 1 is by default to configured to Auto-Judge the interactive problems, a dialog should appear giving a detailed explanation of the issue.Actual behavior: The following very unhelpful dialog appears:
Environment:
Additional context: The fix for this bug is to simply swap the arguments in the call to
FrameUtilities.showMessage(...)
in methodRunsTablePane.startAutoJudging()
.