Open TheMindVirus opened 10 years ago
add_empty_macro isn't an engine command, it's internal to artiste, so not doing much there.
Leaving this open as you'll find more of these ;)
To write the visual fader program with Safari, I'll need something similar to add_empty_macro to load 2 states at the same time. Which command should I use to add a macro to vsxu_server?
macro_create [macro_name] [pos_x] [pos_y] [size]
File: (???vsxu_engine_command_parser_filepath???)
Possible Explanation There are certain commands in the VSXu engine which take in arguments which are comma separated lists of values. When the command is evaluated, the parser splits these commands using the comma delimiter.
However, when these commands are entered incorrectly, the parser cannot split the command string correctly, thus causing a segfault.
What Happens Normally The current behaviour for other incorrectly entered commands in the engine is to send back either "Invalid Command" or "alert fail= etc...". The engine sends no messages back if the command has the wrong number of arguments, but is still recognised as a command.
What Should Happen Normally If cparts[0](command name) is not recognised then: cmd_out->add_raw("Invalid Command"); If the command has been recognised but the number of arguments is incorrect then: cmd_out->add_raw("Invalid Syntax"); If any relevant sanity checks on the arguments fail then: cmd_out->add_raw("Invalid Argument(s)"); If the command succeeded, print out the command_ok messages and proceed. (this already happens.)
Known Affected Commands component_assign [macro name] [component],[component],[component] [x] [y] add_empty_macro [macro name] [x],[y] Other commands which use commas as delimiters for arguments (only when entered incorrectly)
Steps to Replicate
OR alternatively "component_assign desktop_local colored_rectangle 1 1"VSXu will crash with segfault (you can see this if you launched from terminal) WHEREAS this command should work "component_assign desktop_local empty.colored_rectangle 1 1"