Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault with syntax error of space after 'origin:' #122

Open
JDLH opened this issue Jul 9, 2023 · 0 comments
Open

Segmentation fault with syntax error of space after 'origin:' #122

JDLH opened this issue Jul 9, 2023 · 0 comments

Comments

@JDLH
Copy link

JDLH commented Jul 9, 2023

A command with a syntax error of a space between 'origin:' and its value results in a segmentation fault.

How to reproduce

% displayplacer "origin: (0,0)"             
zsh: segmentation fault  displayplacer "origin: (0,0)"

Observed behaviour
Segmentation fault

Expected behaviour
Informative error message, and a more controlled exit of the program.

Discussion
I believe that it is the syntax error, rather than the incomplete set of arguments, which causes the segmentation fault.

Firstly, because the same command with the syntax error corrected results in informative error messages rather than a segmentation fault:

% displayplacer "origin:(0,0)"             
Unable to find screen  - skipping changes for that screen
Unable to find screen  - skipping changes for that screen
Unable to find screen  - skipping changes for that screen
Unable to find screen  - skipping changes for that screen
Unable to find screen  - skipping changes for that screen
Unable to find screen  - skipping changes for that screen

Secondly, because when I issued a command with full arguments which also had this syntax error, I still got the segmentation fault.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant