You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't use CP Editor very much. This morning when I was participating a contest, I used CP Editor to test a number of samples. Then I found my code got RE on one of the samples, while it ran well in VSCode. I spent ~10 minutes on this and finally found out by log file that it's because my output length limit is too low, so the process is forcefully killed.
I noticed that actually CP Editor do have told me that the RE is caused by output limit, but the prompt message is too long and is so similar to the message about Output Display Length Limit that I just ignored it.
Suggestion
Coloring
I think we shouldn't treat messages about Output Length Limit and Output Display Length Limit as same kind, since in the former case CP Editor implicitly killed a process. If the output display length is limited, we cound see ... at the end of the text box, so it's not that important. Therefore, message about Output Length Limit should show in color like yellow in order to attract user's attention, making sure killing the process is what user expect.
Improve the message itself
In this case, this is CP Editor's output:
[15:26:11] [Runner[4]] [The stdout of the process running on the testcase #4 contains more than 100000 characters, which is longer than the output length limit, so the process is killed. You can change the output length limit at [Preferences->Advanced->Limits->Output Length Limit](#Preferences/Advanced/Limits/Output%20Length%20Limit).]
[15:26:11] [Runner[4]] [Execution for test case #4 has finished with non-zero exitcode 9 in 1093ms].
[15:26:11] [Output[4]] [Only the first 50000 characters are shown. Now the test case editor is read-only. You can set the length limit at [Preferences->Advanced->Limits->Output Display Length Limit](#Preferences/Advanced/Limits/Output%20Display%20Length%20Limit).]
What shows in log file is better than this: Process was running, and forcefully killed it because stdout limit was reached.
I don't really see why we need such a long message. And why we need a full sentence? For example, it can be written in this way:
[Runner[4]] Killed. (Reached Output Length Limit, [Change the setting](link to the setting))
I think emphasize killed is very important, since user's code didn't cause RE.
Also, I think the execution result can be rewritten like this.
[Runner[4]] Finished with non-zero exitcode 9 (SIGKILL). Time: 1093 ms, Memory: 100000 KB.
SIGKILL is for people who don't familiar with the exitcode (like me), this can help them find problem faster.
This is much more compendious. At least there should be a setting given to user, let him choose what to see.
These are my suggestions. These suggestions are immature. I wish some discussions.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Background
I don't use CP Editor very much. This morning when I was participating a contest, I used CP Editor to test a number of samples. Then I found my code got RE on one of the samples, while it ran well in VSCode. I spent ~10 minutes on this and finally found out by log file that it's because my output length limit is too low, so the process is forcefully killed.
I noticed that actually CP Editor do have told me that the RE is caused by output limit, but the prompt message is too long and is so similar to the message about Output Display Length Limit that I just ignored it.
Suggestion
Coloring
I think we shouldn't treat messages about Output Length Limit and Output Display Length Limit as same kind, since in the former case CP Editor implicitly killed a process. If the output display length is limited, we cound see
...
at the end of the text box, so it's not that important. Therefore, message about Output Length Limit should show in color like yellow in order to attract user's attention, making sure killing the process is what user expect.Improve the message itself
In this case, this is CP Editor's output:
What shows in log file is better than this:
Process was running, and forcefully killed it because stdout limit was reached
.I don't really see why we need such a long message. And why we need a full sentence? For example, it can be written in this way:
I think emphasize killed is very important, since user's code didn't cause RE.
Also, I think the execution result can be rewritten like this.
SIGKILL is for people who don't familiar with the exitcode (like me), this can help them find problem faster.
This is much more compendious. At least there should be a setting given to user, let him choose what to see.
These are my suggestions. These suggestions are immature. I wish some discussions.
Beta Was this translation helpful? Give feedback.
All reactions