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
Since commit 424b219 vis will segfault if vis:pipe() is called when
no windows are open. This can happen if you have some function calling vis:pipe() based on an event such as FILE_OPEN which doesn't actually
depend on a window being present. For example my vis-gpg plugin does
this when decrypting a file.
A temporary patch will follow in a pull request.
The text was updated successfully, but these errors were encountered:
rnpnr
added a commit
to rnpnr/vis
that referenced
this issue
Jul 3, 2023
When `file` was made optional the variable was changed to be initialized
by `vis->win->file` instead of a known safe file pointer. If `vis:pipe()`
is called based on the event `FILE_OPEN` the `file` parameter can be
valid even when `vis->win` is not yet present. Assuming `file` was
provided this would be handled later on if vis didn't segfault. By
initializing to NULL when `vis->win` isn't present `file` is given
a chance be handled later. In the case where `file` wasn't given and
`vis->win` is missing an error is thrown and `vis:pipe()` exits.
fixesmartanne#1107 - Lua API: vis:pipe() causes a segfault when called before
a window is open
Since commit 424b219 vis will segfault if
vis:pipe()
is called whenno windows are open. This can happen if you have some function calling
vis:pipe()
based on an event such asFILE_OPEN
which doesn't actuallydepend on a window being present. For example my vis-gpg plugin does
this when decrypting a file.
A temporary patch will follow in a pull request.
The text was updated successfully, but these errors were encountered: