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

panic / index out of bounds during copy/paste(maybe?) after deleting layer #58

Open
slimsag opened this issue Jun 14, 2024 · 1 comment

Comments

@slimsag
Copy link
Sponsor Contributor

slimsag commented Jun 14, 2024

Not sure how exactly I triggered this, but I think it was during copy/paste after deleting a layer.

thread 2282599 panic: index out of bounds: index 1, len 1
/Volumes/data/slimsag/pixi/src/storage/internal.zig:1334:45: 0x102d0bd73 in spriteToImage (pixi)
            const layer = &file.layers.items[file.selected_layer_index];
                                            ^
/Volumes/data/slimsag/pixi/src/storage/internal.zig:933:64: 0x102d0c36b in copy (pixi)
            pixi.state.clipboard_image = try self.spriteToImage(self.selected_sprite_index, false);
                                                               ^
/Volumes/data/slimsag/pixi/src/input/Hotkeys.zig:251:30: 0x102d12f17 in process (pixi)
                try file.copy();
                             ^
/Volumes/data/slimsag/pixi/src/input/input.zig:8:39: 0x102d13e77 in process (pixi)
        try pixi.state.hotkeys.process();
                                      ^
/Volumes/data/slimsag/pixi/src/pixi.zig:319:22: 0x102d17a1b in update (pixi)
    try input.process();
                     ^
/Users/slimsag/.cache/zig/p/122015e1dac4afaf275f7f2adde3814e6a27f5799cbef96bb487ee305f7e33f4dca3/src/core/platform/glfw/Core.zig:587:23: 0x102cc888f in appUpdateThreadTick__anon_78859 (pixi)
        if (app.update() catch unreachable) {
                      ^
/Users/slimsag/.cache/zig/p/122015e1dac4afaf275f7f2adde3814e6a27f5799cbef96bb487ee305f7e33f4dca3/src/core/platform/glfw/Core.zig:606:36: 0x102caff0f in appUpdateThread__anon_78602 (pixi)
    while (self.appUpdateThreadTick(app)) {}
                                   ^
/Users/slimsag/zig/0.13.0-dev.351+64ef45eb0/files/lib/std/Thread.zig:408:13: 0x102c83507 in callFn__anon_78017 (pixi)
            @call(.auto, f, args);
            ^
/Users/slimsag/zig/0.13.0-dev.351+64ef45eb0/files/lib/std/Thread.zig:674:30: 0x102c4ce43 in entryFn (pixi)
                return callFn(f, args_ptr.*);
                             ^
???:?:?: 0x18c76d033 in ??? (libsystem_pthread.dylib)
???:?:?: 0x885f80018c767e3b in ??? (???)
run
└─ run pixi failure
error: the following command terminated unexpectedly:
@foxnne
Copy link
Owner

foxnne commented Jun 14, 2024

Thanks! I'll try to recreate this.

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

2 participants