Bug 420260 - Segfault when opening anything (master)
Summary: Segfault when opening anything (master)
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Resource Management (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-18 16:38 UTC by Storm Engineer
Modified: 2021-05-11 13:56 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
GDB backtrace (116.32 KB, text/plain)
2020-04-18 16:38 UTC, Storm Engineer
Details
GDB backtrace (18.02 KB, text/plain)
2020-04-20 02:32 UTC, M
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Storm Engineer 2020-04-18 16:38:03 UTC
Created attachment 127652 [details]
GDB backtrace

Krita crashes (segfault) when trying to open anything, including new document.


STEPS TO REPRODUCE
1. Start Krita
2. Create new document or open existing

OBSERVED RESULT
Segfault


SOFTWARE/OS VERSIONS
Krita

 Version: 5.0.0-prealpha (git 4a37f35)
 Languages: en_US, en, en_US, en, hu_HU, hu
 Hidpi: false

Qt

  Version (compiled): 5.14.2
  Version (loaded): 5.14.2

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.6.4-arch1-1
  Pretty Productname: Arch Linux
  Product Type: arch
  Product Version: unknown
  Desktop: KDE

OpenGL Info
 
  Vendor:  "NVIDIA Corporation" 
  Renderer:  "GeForce GTX 750 Ti/PCIe/SSE2" 
  Version:  "4.6.0 NVIDIA 440.82" 
  Shading language:  "4.60 NVIDIA" 
  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 4.6, 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) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false 

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

Hardware Information

  GPU Acceleration: auto
  Memory: 15981 Mb
  Number of Cores: 8
  Swap Location: /tmp

Current Settings

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


Display Information
Number of screens: 2
	Screen: 0
		Name: DP-0
		Depth: 24
		Scale: 1
		Resolution in pixels: 1600x900
		Manufacturer: Dell Inc.
		Model: DELL IN2030M-
		Refresh Rate: 59.9782
	Screen: 1
		Name: DVI-I-0
		Depth: 24
		Scale: 1
		Resolution in pixels: 1680x1050
		Manufacturer: Acer Technologies
		Model: Acer P221W-
		Refresh Rate: 59.9543
Comment 1 M 2020-04-20 02:32:39 UTC
Created attachment 127701 [details]
GDB backtrace

I can confirm this on my end, and it happens with both my build from master and a recent AppImage. My backtrace is attached, too.

What seems to solve it most of the time is if I move my resources folder and let Krita regenerate the default one on next startup. Then I can move my resources back and when I restart Krita it still manages to open documents. After I update my build, the crash usually returns, if that makes any sense.

Additionally, I think the same kind of crash happens after editing and resetting brush presets. The first part of that backtrace looks identical the attached one.
To reproduce:
1. Pick a (default) brush preset and edit some of its settings.
2. Press the reset icon to undo the temporary changes, then click on another preset.
Krita freezes and quits for me at that point.

Let me know if I should move the latter to a separate bug report.
Comment 2 Halla Rempt 2020-04-20 11:08:44 UTC
We'd need a zip of the original .local/share/krita folder to investigate what resource causes the crash.
Comment 3 wolthera 2020-04-24 11:51:40 UTC
Setting this to needs info.
Comment 4 M 2020-04-28 07:20:51 UTC
The brush preset crash happens without any custom resources also.

But here's my (messy) resource folder:
https://www.dropbox.com/s/93v7vnm3y8fm7qa/Krita%20resource%20folder.zip?dl=0
There were some symlinks that got replaced in the ZIP, if that makes any difference.
Comment 5 Bug Janitor Service 2020-05-13 04:33:13 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2020-05-28 04:33:11 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 7 Tiar 2020-05-28 10:55:26 UTC
M added the zip of the resource folder, so it shouldn't be closed but changed to REPORTED again.
Comment 8 M 2020-05-28 13:27:31 UTC
Yes, thank you. I wanted to add that this crash was still happening a few weeks ago, but with my most recent build and AppImage from yesterday I can open documents without issue. It had vanished and reappeared before, so I'm hesitant to call it gone for good.

With the newest build and AppImage I get a guaranteed full freeze when I try to select some particular ones of my custom brush presets from the editor window or presets docker, but that may be out of scope for this bug.
Comment 9 M 2020-05-28 17:22:57 UTC
Never mind, updated my build and the crash on opening documents returned. :D
Comment 10 Halla Rempt 2021-05-11 13:56:58 UTC
I cannot reproduce this assert anymore with the given resource folder. (Not so weird, because the assert is no longer there.)