General Category > Discussion - EVE

Bug: invalid options in commands are handled badly

(1/2) > >>

Rudolph:
I am currently rewriting parts of my code library and as part of this I am trying out all the commands that I rewrite.
Oh yes, I am using a BT815 right now.

Currently at cmd_toggle I somehow had the idea to feed it unsupported parameter options.
Listed as having an effect on cmd_toggle are OPT_3D and OPT_FLAT.
And of course, these do work just fine.

OPT_MONO -> black screen
OPT_NODL -> black screen
OPT_CENTERX -> black screen
OPT_CENTERY -> black screen
OPT_RIGHTX -> black screen
OPT_NOBACK -> no effect
OPT_FILL -> black screen
OPT_FLASH -> black screen
OPT_NOTICKS -> black screen
OPT_NOHM -> black screen
OPT_NOSECS -> black screen
OPT_NOTEAR -> black screen
OPT_FULLSCREEN -> black screen
OPT_MEDIAFIFO -> black screen
OPT_SOUND -> black screen

The options I left out either are alias ones use the same values or combinations of those above.
I have no idea how OPT_NOBACK has no effect but any other options makes EVE fail.

Please make the command co-processor filter out invalid options in BT817 and beyond.
And for all commands that take options.

BRT Community:
Hello,

Thanks for the feedback!
Our normal suggestion would be to do error checking for invalid parameters within the code library.
however I will pass this on to the development team to see if such a feature can be added for future revisions of EVE.

Best Regards,
BRT Community

Rudolph:

--- Quote from: BRT Community on August 24, 2020, 03:56:49 PM ---Our normal suggestion would be to do error checking for invalid parameters within the code library.

--- End quote ---

While one could add parameter checking to the calling function, that does not make the implementation of the called
function any more robust.
So no, parameter checking should be in the function that is called or at least a wrong parameter should
not lead to desaster like in this case a black screen.

BRT Community:
Hello,

The BT81x programmers guide does state that "The behavior of widgets is not defined if the parameter values are out of the valid range", but I have passed your suggestion on to the development team.

Best Regards.
BRT Community

Kaetemi:

--- Quote from: Rudolph on August 22, 2020, 01:39:53 PM ---any other options makes EVE fail.
--- End quote ---

Actually, the coprocessor will flag a fault.
"ERROR: illegal option in cmd_toggle()"
It's rather strict on invalid commands since BT815.

Maybe a register option to make it more lenient could be handy in future versions?

Navigation

[0] Message Index

[#] Next page

Go to full version