Orama-Interactive/Pixelorama

Crash while attempting to save a large project with compression

OverloadedOrama opened this issue · 1 comments

Pixelorama version:
v0.10.3 and v0.11-dev (latest master), most likely previous versions too.

OS/device including version:
OpenSUSE Tumbleweed, but it has been reported on Windows 10 Pro as well.

Issue description:
When attempting to save a project with canvas size 1280x720, with 4 layers and 60 frames and ZSTD compression is enabled, Pixelorama freezes and after a while crashes leaving a 0B empty pxo file, which may cause data loss if a previous pxo file is saved in the same location and has the same file name EDIT: Fixed in fbe6ea9. Disabling ZSTD compression doesn't cause any crashes, but it's not impossible that it may cause crashes in even larger projects, though this is unconfirmed.

No errors appear in Godot's debugger, but running Pixelorama in verbose mode (with the --verbose command line argument) displays this error

ERROR: Condition "p_size < 0" is true. Returned: ERR_INVALID_PARAMETER
   at: resize (./core/cowdata.h:253)
Segmentation fault (core dumped)

Running Pixelorama from Godot in verbose mode prints this:

ERROR: Condition "p_size < 0" is true. Returned: ERR_INVALID_PARAMETER
   at: resize (./core/cowdata.h:253)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v3.5.stable.official (991bb6ac74ac8c09d7683041b50a8ced3a2defb1)
Dumping the backtrace. Please include this when reporting the bug on: https://github.com/godotengine/godot/issues
[1] /lib64/libc.so.6(+0x3d910) [0x7f8dd64cc910] (??:0)
[2] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x3106528] (??:0)
[3] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2f1f39c] (??:0)
[4] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x3064402] (??:0)
[5] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xf501f5] (??:0)
[6] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2e6fd89] (??:0)
[7] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2f01cd2] (??:0)
[8] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xb6e1dc] (??:0)
[9] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xb01b00] (??:0)
[10] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2e6fcae] (??:0)
[11] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2f01cd2] (??:0)
[12] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xb6e1dc] (??:0)
[13] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xb01b00] (??:0)
[14] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2e6fcae] (??:0)
[15] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2f01cd2] (??:0)
[16] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xb6e1dc] (??:0)
[17] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xb01b00] (??:0)
[18] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2e6fcae] (??:0)
[19] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2f01cd2] (??:0)
[20] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xb6e1dc] (??:0)
[21] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xb01b00] (??:0)
[22] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2e6fcae] (??:0)
[23] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2f01cd2] (??:0)
[24] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xb6e1dc] (??:0)
[25] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xb01b00] (??:0)
[26] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2e6fcae] (??:0)
[27] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2e7b14a] (??:0)
[28] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x20f7f7a] (??:0)
[29] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2123098] (??:0)
[30] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x21232f6] (??:0)
[31] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x179c895] (??:0)
[32] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2e6f937] (??:0)
[33] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x1fcb01b] (??:0)
[34] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2000c93] (??:0)
[35] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2000fbb] (??:0)
[36] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xd08ad5] (??:0)
[37] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2e6fd89] (??:0)
[38] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x2e61cbe] (??:0)
[39] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x1fb1a5b] (??:0)
[40] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0x1fcab5a] (??:0)
[41] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xa40c0b] (??:0)
[42] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xa41e59] (??:0)
[43] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xa46f74] (??:0)
[44] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xa015dc] (??:0)
[45] /lib64/libc.so.6(+0x275b0) [0x7f8dd64b65b0] (??:0)
[46] /lib64/libc.so.6(__libc_start_main+0x8b) [0x7f8dd64b6679] (??:0)
[47] /home/emmanouil/Documents/Godot_v3.5-stable_x11.64() [0xa13fde] (??:0)
-- END OF BACKTRACE --
================================================================

#636 may be a possible duplicate, but I'm not sure.

Steps to reproduce:
Create a new 1280x720 project. Add 4 layers and 60 frames, then attempt to save while having ZSTD compression enabled.