0 periods Byo-Yomi

I too have argued in favour of nobody being banned for using settings that the server allows :man_shrugging: we live in a weird world, not everything makes sense I guess.

3 Likes

My guess is that anyone can make failures even in bad attitude and this include mis-using bugs or poor programation. But then there is a first time to warn, explain, ask and there is a second time to take these kind of decisions.

I was initially unable to find this thread, since its title used 0 rather than null.
As I result, I created a different thread, in which someone gave me the link to this thread.
The thread I created was accordingly deleted - as I mostly requested -
so I’m mentioning here that yesterday, I saw a game offer for

9x9 2m+nullx 10s Yes Auto Friendly Match Japanese

.

Presumably as a result of the now-deleted thread, discussion at

was resumed.

However, the game offer showing
nullx 10s
rather than
0x 10s
makes me wonder if there’s a further issue:

It’s apparently possible to have the “number” of byoyomi periods be null.
Is it also possible to have that value be
negative ​ or ​ infinite ​ or ​ NaN ​ or ​ something else that’s not an integer ​ ​ ?

3 Likes

As it’s said in GitHub, there’s a further issue… the backend should validate and reject these challenges… but it doesn’t.

3 Likes

either that or replace their number of periods with 1

2 Likes

I just saw this again, about 5 minutes ago:

19x19 ​ 1h+nullx 1m ​ No ​ No ​ Friendly Match ​ Japanese

(I also have the player’s name and rank, but I imagine I shouldn’t post that.)

If you want you can report the game and add details on the main site. Or report the player there also.

Or update the issue on GitHub, that could be an option too.

I just tried to recreate the settings on Beta. It wouldn’t let me go below 1 byo-yomi period. Perhaps the user has the setting there from pre-fix and can continue to use it?

1 Like

@shinuito
For reporting the game, would that be via the Call moderator option,
or is there something else for such non-urgent situations?

I think it’s probably fine to use that button yes when there’s some potential issue with a game and you want someone to look at it :slight_smile:

One can also make a private thread/pm on the forums and sent it to moderators with @moderators and give details that way either.

3 Likes

I replaced empty line with “2” , pressed create and then got this:

image

1 Like

I unable to create game with more than 0 periods!


update: after some refreshes and change of settings, I finally created with 2 periods

2 Likes

A few minutes ago, I saw a
9x9 2m+0x 10s
challenge at the Play page.

(I noted the player’s name too, but figure I shouldn’t post that part here.)

Even if 0 periods is to be allowed, I would think that should warn as Unusual Time Setting.
(Does 2 minutes sudden death give that warning? ​ These two time-settings are equivalent.)

This has occurred before. maybe about a year ago, but my old memory does not remember the resolution.

even if 0 periods is impossible to do, in the code there should be “IF 0 periods, display warn symbol”

3 Likes

The frontend problem should be fixed, but I agree that this should be checked in the backend as well.

6 Likes

So it was a year ago when first reported, as I thought.

I see that at the page joooom linked to, anoek said

we have this line in our backend sanitization
ret["periods"] = min(300, max(1, int(
time_control_parameters["periods"] or "0")))

.


Is that Python 3? ​ If yes, what happens with a ValueError from int()?
(For example, it could be that, due to this being live code, something will
use 0 rather than halting if it gets a KeyError for ret["periods"].)

1 Like

I saw another one, this time
9x9 5m+nullx 30s ​ ​ ​ .

I believe Python has “None” rather than “hull”, so here are two hypotheses:

the Python hypothesis:

time_control_parameters["periods"] is NaN, or something else truthy that
would cause int to raise ValueError. ​ (I know that in Python 3, NaN is truthy.)
Since the left input is truthy, the or outputs that, and then int accordingly raises ValueError. ​ That exception stops the execution of that Python code, leaving null,
or something that gets treated as such, in whatever location your other code
​- maybe something like C++, maybe database code - reads to get ret["periods"].

the something-else hypothesis:

time_control_parameters["periods"] is either
null or NaN or NA or something similar, and is truthy.
Since time_control_parameters["periods"] is truthy, that is the output of the or.
int of that is null. ​ ​ ​ max and min both output null when one of their inputs is null.

This apparently has not been fixed:
About a minute ago, I was seeing ​ ​ ​ 5m+nullx 30s ​ .