Bug 427296 - Crashes when opening 'Predefined' Tab of 'Brush Engine - General - Brush Tip' section after importing a PNG image as new brush stroke
Summary: Crashes when opening 'Predefined' Tab of 'Brush Engine - General - Brush Tip'...
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 4.3.0
Platform: Debian stable Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-03 14:49 UTC by tth.heng@gmail.com
Modified: 2020-10-04 07:35 UTC (History)
1 user (show)

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


Attachments
The Krita Usage Log and the Krita configuration files. (29.48 KB, text/plain)
2020-10-03 14:49 UTC, tth.heng@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tth.heng@gmail.com 2020-10-03 14:49:28 UTC
Created attachment 132092 [details]
The Krita Usage Log and the Krita configuration files.

SUMMARY
After importing a PNG image as a new predefined brush stroke, Krita crashes whenever the 'Predefined' tab of the 'General - Brush Tip' section in the brush engine is opened.

STEPS TO REPRODUCE
1. With 'Freehand Brush Tool' selected, select the 'Edit brush settings' option on the toolbar, or press shortcut key F5.
2. Select 'Brush Tip' under General section.
3. Open the 'Predefined' tab.
4. Import a PNG image as a new brush stroke and select the imported PNG image.
5. Close the opened dialogues and restart Krita.
6. Repeat steps 1 to 3.

OBSERVED RESULT
Krita crashes and closes itself immediately.

EXPECTED RESULT
The 'Predefined' tab is opened normally.

SOFTWARE/OS VERSIONS
Windows: N/A
macOS: N/A
Linux/KDE Plasma: Ubuntu 20.04.1 LTS
KDE Plasma Version: N/A
KDE Frameworks Version: N/A 
Qt Version: 5.12.8

ADDITIONAL INFORMATION
Krita

 Version: 4.3.0
 Languages: en_GB, en, en, en_GB, en
 Hidpi: true

Qt

  Version (compiled): 5.12.8
  Version (loaded): 5.12.8

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.4.0-48-generic
  Pretty Productname: Ubuntu 20.04.1 LTS
  Product Type: ubuntu
  Product Version: 20.04
  Desktop: ubuntu:GNOME

OpenGL Info
 
  Vendor:  "Intel Open Source Technology Center" 
  Renderer:  "Mesa DRI Intel(R) HD Graphics 2000 (SNB GT1)" 
  Version:  "3.0 Mesa 20.0.8" 
  Shading language:  "1.30" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
     Version: 3.0
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 

Hardware Information

  GPU Acceleration: auto
  Memory: 5862 Mb
  Number of Cores: 2
  Swap Location: /tmp

Current Settings

  Current Swap Location: /tmp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 30
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 900
  Use Backup Files: true
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: false
  Use Zip64: false


Display Information
Number of screens: 1
	Screen: 0
		Name: VGA-1
		Depth: 24
		Scale: 1
		Resolution in pixels: 1366x768
		Manufacturer: ENV
		Model: LCD1971w-
		Refresh Rate: 59
Comment 1 Halla Rempt 2020-10-03 15:00:48 UTC
Are you using the appimage or a distribution package? At one point, there was a version of Qt packaged by Debian that would assert on PNG images with a broken ICC profile. If Debian still ships that, that could be the problem. If you're  using Krita from the debian repo, please start it from the terminal and note whether there's any output that sounds like a PNG fatal error.
Comment 2 tth.heng@gmail.com 2020-10-03 15:15:29 UTC
(In reply to Boudewijn Rempt from comment #1)
> Are you using the appimage or a distribution package? At one point, there
> was a version of Qt packaged by Debian that would assert on PNG images with
> a broken ICC profile. If Debian still ships that, that could be the problem.
> If you're  using Krita from the debian repo, please start it from the
> terminal and note whether there's any output that sounds like a PNG fatal
> error.

I'm using a distribution package (I installed Krita through the terminal using apt-get). 

After launching Krita through terminal twice, the outputs are as follows:

[1st attempt]
(process:2081): Gtk-WARNING **: 23:07:48.678: Locale not supported by C library.
	Using the fallback 'C' locale.
Invalid profile :  "/usr/share/color/icc/colord/Crayons.icc" "Crayon Colors"
Invalid profile :  "/usr/share/color/icc/colord/x11-colors.icc" "X11 Colors"
QObject::startTimer: Timers cannot have negative intervals
/usr/lib/x86_64-linux-gnu/krita-python-libs/krita added to PYTHONPATH
qrc:/touchstrip.qml:1:1: module "QtQuick" is not installed
QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout
Segmentation fault (core dumped)


[2nd attempt]
(process:2235): Gtk-WARNING **: 23:08:31.650: Locale not supported by C library.
	Using the fallback 'C' locale.
Invalid profile :  "/usr/share/color/icc/colord/Crayons.icc" "Crayon Colors"
Invalid profile :  "/usr/share/color/icc/colord/x11-colors.icc" "X11 Colors"
QObject::startTimer: Timers cannot have negative intervals
/usr/lib/x86_64-linux-gnu/krita-python-libs/krita added to PYTHONPATH
QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout
krita.general: "file:///usr/bin/..//share/krita/qmlthemes/default/theme.qml:19 module \"QtQuick\" is not installed\n"
qrc:/touchstrip.qml:1:1: module "QtQuick" is not installed
krita: malloc.c:2379: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Aborted (core dumped)
Comment 3 Halla Rempt 2020-10-03 15:36:01 UTC
Can you try the appimage instead? Preferably the one for the latest beta.
Comment 4 tth.heng@gmail.com 2020-10-04 01:11:53 UTC
(In reply to Boudewijn Rempt from comment #3)
> Can you try the appimage instead? Preferably the one for the latest beta.

I've tried the Appimage version (the stable one, ver. 4.30). However, Krita still crashes at first when doing the steps mentioned before.

After that, I tried the 4.4.1-alpha Appimage version, and surprisingly, Krita does not crash when doing the steps mentioned, and then I deleted the imported PNG image brush stroke.

I launched Krita using the 4.3.0 appimage again afterwards. However, after importing a PNG image as a new brush stroke again, Krita does not crash anymore.
Comment 5 Bug Janitor Service 2020-10-04 04:33:18 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 6 Halla Rempt 2020-10-04 07:35:05 UTC
Okay, then I guess there isn't much we can do. It's either the Qt problem with PNG files, or an issue with some icc files that was fixed in 4.4.0.