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
If Lua throws an error inside app.transaction it is causing undefined behavior, eventually leading to segmentation fault.
It can be as simple as:
app.transaction(function()
assert(crash)
end)
This causes a lot of random undefined behavior, mostly related to the undo history not working anymore or getting corrupted. Weird things can happen with selections too. If you continue in this state segmentation fault happens eventually.
It is possible to avoid it if you run your code inside a protected call like this:
This is still happening with Aseprite v1.3.6-x64's AppImage.
This is my workaround:
local try = function(label, func)
if not app.transaction(label,
function()
local ok, err = pcall(func)
if ok then return true end
app.alert{title=label, text=err}
end)
then
app.undo()
end
end
If Lua throws an error inside
app.transaction
it is causing undefined behavior, eventually leading to segmentation fault.It can be as simple as:
This causes a lot of random undefined behavior, mostly related to the undo history not working anymore or getting corrupted. Weird things can happen with selections too. If you continue in this state segmentation fault happens eventually.
It is possible to avoid it if you run your code inside a protected call like this:
In this case the error is printed and nothing breaks.
I am on Linux, but I've briefly tried this on Windows as well and observed exact same behavior.
Aseprite and System version
The text was updated successfully, but these errors were encountered: