Acly / krita-ai-tools

Krita plugin which adds selection tools to mask objects with a single click, or by drawing a bounding box.
GNU General Public License v3.0
398 stars 20 forks source link

bug - Krita Freezes #3

Closed Rubenacp closed 1 year ago

Rubenacp commented 1 year ago

Krita version: Krita 5.2.0 RC1

Issue: Krita freezes if I mistakenly select a part of the layer that contains only transparency. Steps: 1.- select something in the image. 2.- cut and paste (ctrl+c, ctrl+v) A new layer is created with the selected part. 3.- still with the same region selected I try to select a part of the new layer that only contains transparency 4.- Not always, but after one or 2 times Krita freezes.

This happens with the 2 selection tools and even when the selection reference is only the active layer or the merged layers.

Thank you for this incredible tool, I've been wanting it for a long time.

Acly commented 1 year ago

Hm, I cannot reproduce a freeze. Everything works if selection reference is merged layers.

While testing I found that when using only active layer as selection reference, it doesn't work properly if the layer contains transparency. The layer bounds don't match the image bounds because transparent regions are ignored, and the selection ends up wrong or not selecting anything. Working on a fix, but not sure if it's related.

If you provide a .kra file and where to click I can try that.

Acly commented 1 year ago

Okay after fixing the out of bounds issue I did get a hang in scenarios where the selection was cancelled, maybe it's the same thing you observed. Please try release 1.0.2. Note that I built it for the official 5.2.0 release since that's out now (but probably will also work for RC1).

Rubenacp commented 1 year ago

Now I wanted to send you a video I made about the error, but I'm going to test what you tell me, hopefully it has been fixed. Thanks a lot

Rubenacp commented 1 year ago

It works perfectly, it's great. thank you very very much