Bug 488647 - Internal error/crash when setting palette columns to 0
Summary: Internal error/crash when setting palette columns to 0
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Manjaro Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-18 00:10 UTC by varkatope
Modified: 2024-06-18 08:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description varkatope 2024-06-18 00:10:21 UTC
SUMMARY

Editing the palette swatch columns to 0 (which I did accidentally when it happened), will result in an error message and an unexpected quit if one of the choices is picked. 

STEPS TO REPRODUCE
1. Open any palette in the palette docker and click the "Edit current palette" button at the bottom.
2. Change the number of "Columns of swatches" to 0 and click OK.

OBSERVED RESULT

You will see the following error message. Clicking "Abort" or the "X" window close button results in the program closing/crashing/unexpectedly quitting. Choosing "Ignore" may allow you to continue. After ignoring, I did not encounter the error on the same palette, but doing it again with another palette produced the same error.

"""
Krita has encountered an internal error:

SAFE ASSERT (krita): "columnCount >= 1" in file /builds/graphics/krita/libs/pigment/resources/KisSwatchGroup.cpp, line 104

Please report a bug to developers!

Press Ignore to try to continue.
Press Abort to see developers information (all unsaved data will be lost)
"""

EXPECTED RESULT

I would expect it to either fail a bit more gracefully or simply not allow 0 as an input value.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro Linux Kernel: 6.8.12-3-MANJARO x86_64

ADDITIONAL INFORMATION

Krita Version: 5.3.0-prealpha (git 7fb0cda), Qt version compiled: 5.15.7, loaded: 5.15.7. Process ID: 136519


Krita

 Version: 5.3.0-prealpha (git d9c69b6)
 Hidpi: false

Qt

  Version (compiled): 5.15.7
  Version (loaded): 5.15.7

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 6.8.12-3-MANJARO
  Pretty Productname: Manjaro Linux
  Product Type: manjaro
  Product Version: unknown
  Desktop: XFCE
  Appimage build: Yes
Comment 1 Halla Rempt 2024-06-18 08:49:05 UTC
Git commit 7db12ecc352f552490cf51c8a339b4a60c84851f by Halla Rempt.
Committed on 18/06/2024 at 08:48.
Pushed by rempt into branch 'master'.

Set number rows/cols to minimum 1

M  +10   -2    libs/ui/forms/WdgDlgPaletteEditor.ui

https://invent.kde.org/graphics/krita/-/commit/7db12ecc352f552490cf51c8a339b4a60c84851f
Comment 2 Halla Rempt 2024-06-18 08:51:20 UTC
Git commit 5eb18eea370723b1ddf987a7cd2307eab398c084 by Halla Rempt.
Committed on 18/06/2024 at 08:51.
Pushed by rempt into branch 'krita/5.2'.

Set number rows/cols to minimum 1
(cherry picked from commit 7db12ecc352f552490cf51c8a339b4a60c84851f)

M  +10   -2    libs/ui/forms/WdgDlgPaletteEditor.ui

https://invent.kde.org/graphics/krita/-/commit/5eb18eea370723b1ddf987a7cd2307eab398c084