Bug 382588 - Krita crashes on startup (Windows, 3.2.0-beta.2)
Summary: Krita crashes on startup (Windows, 3.2.0-beta.2)
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (other bugs)
Version First Reported In: 3.2.0-beta.1
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-22 13:03 UTC by cyaoeu
Modified: 2017-10-16 19:42 UTC (History)
2 users (show)

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


Attachments
one crash from kritacrash.log (8.04 KB, text/plain)
2017-07-22 13:03 UTC, cyaoeu
Details
New crash log (34.38 KB, text/plain)
2017-08-07 21:08 UTC, cyaoeu
Details
list of broken brushes (11.61 KB, image/png)
2017-08-13 17:03 UTC, cyaoeu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cyaoeu 2017-07-22 13:03:41 UTC
Created attachment 106786 [details]
one crash from kritacrash.log

Hi, I've had crashes on startup for a while on Windows. Win8.1, 16GB of RAM, GTX1070.

Attaching an excerpt of kritacrash.log.
Comment 1 Alvin Wong 2017-07-22 16:55:37 UTC
Do you have any custom brushes installed?

If possible, can you try with a fresh config without any custom brushes? And if it does not crash without custom brushes, can you try to isolate the specific brush(es) that might be causing the crash?
Comment 2 Alvin Wong 2017-07-22 16:56:54 UTC
Also, may I ask what is the last version of Krita that worked normally for you? (e.g. 3.2 beta 1 or 3.1.4)
Comment 3 cyaoeu 2017-07-22 19:39:12 UTC
(In reply to Alvin Wong from comment #1)
> Do you have any custom brushes installed?
> 
> If possible, can you try with a fresh config without any custom brushes? And
> if it does not crash without custom brushes, can you try to isolate the
> specific brush(es) that might be causing the crash?

I did have custom brushes installed. I tried running the 2.9.4.3 and 3.0 versions I had on my harddrive and they worked even with the custom brushes. After moving the custom brushes (well, the whole krita appdata folders) I confirmed that the custom brushes/settings were gone in the older versions, but I'm still getting crashes in 3.2 beta. 


(In reply to Alvin Wong from comment #2)
> Also, may I ask what is the last version of Krita that worked normally for
> you? (e.g. 3.2 beta 1 or 3.1.4)

I tested downloading 3.1.4 but it also crashes on startup. The last working version I had was 3.0, I don't remember any later ones but judging from the crash logs I started getting these crashes November 16, 2016.
Comment 4 Halla Rempt 2017-07-27 13:22:08 UTC
That is still quite strange, because the crash clearly happens when loading brushes (gimp brushes or photoshop brushes, not the krita brush preset files with the .kpp extension)
Comment 5 Halla Rempt 2017-07-27 13:24:01 UTC
Or rather, it's trying to load a brush that is defined inside a krita paintop preset.
Comment 6 Halla Rempt 2017-07-27 13:32:31 UTC
Git commit b82a6640295ed22a0aa940c22c433eeb32dbfc63 by Boudewijn Rempt.
Committed on 27/07/2017 at 13:30.
Pushed by rempt into branch 'krita/3.2'.

Fix reference counting for the text brush

The actual bug puzzles me, because it could only have happened
if there were a paintop preset with a text brush, and the reporter
said all his custom brushes and presets were removed and this
still happened, but logically this is the only place where the
given backtrace could come from.

M  +1    -2    libs/brush/kis_brush_registry.cpp
M  +5    -2    libs/brush/kis_text_brush_factory.cpp

https://commits.kde.org/krita/b82a6640295ed22a0aa940c22c433eeb32dbfc63
Comment 7 Halla Rempt 2017-07-27 13:32:44 UTC
Git commit 70607a526fae5c9095bf13d133caaf4c997d1399 by Boudewijn Rempt.
Committed on 27/07/2017 at 13:32.
Pushed by rempt into branch 'master'.

Fix reference counting for the text brush

The actual bug puzzles me, because it could only have happened
if there were a paintop preset with a text brush, and the reporter
said all his custom brushes and presets were removed and this
still happened, but logically this is the only place where the
given backtrace could come from.

M  +1    -2    libs/brush/kis_brush_registry.cpp
M  +5    -2    libs/brush/kis_text_brush_factory.cpp

https://commits.kde.org/krita/70607a526fae5c9095bf13d133caaf4c997d1399
Comment 8 cyaoeu 2017-08-07 21:08:10 UTC
Created attachment 107131 [details]
New crash log

Hi, I'm still having the same issue in 3.2.0 rc1. I missed some files the first time around that were in the AppData\Local folder, but I'm pretty sure I've removed everything now because the language changed from English to the language of my main system IME. 

It didn't really help though, I'm getting the same (or at least similar) crashes so I'm attaching a new crash log.
Comment 9 cyaoeu 2017-08-13 13:33:22 UTC
Not fixed for me so I'm reverting status, but you can do whatever you want. Still experiencing crashes in rc3.
Comment 10 Halla Rempt 2017-08-13 14:11:51 UTC
There must still be something specific to your system and your configuration, because it's not happening to other people. If you also still get the same backtrace, then there must still be a brush somewhere that is broken/breaks krita. Without that brush file, I cannot go further fixing this bug. I need that information... If all else fails, we could setup teamviewer so I can investigate your system...
Comment 11 cyaoeu 2017-08-13 17:03:54 UTC
Created attachment 107261 [details]
list of broken brushes

(In reply to Boudewijn Rempt from comment #10)
> There must still be something specific to your system and your
> configuration, because it's not happening to other people. If you also still
> get the same backtrace, then there must still be a brush somewhere that is
> broken/breaks krita. Without that brush file, I cannot go further fixing
> this bug. I need that information... If all else fails, we could setup
> teamviewer so I can investigate your system...

I'm pretty sure I removed all custom brushes and so in a last ditch effort I removed all files in \Program Files\Krita (x64)\share\krita\paintoppresets and to my surprise Krita started successfully. I then spent some time adding brushes that still enabled Krita to start and thus isolated the ones that were broken for me. I attached an image file with the names of the broken brushes.

Still, when starting Krita with the presets that were working, not all of them even work when clicking on them. The only ones that actually change the preset were these: 

Chalk_brush, Curve_curvy, Curve_ink, Curve_recurvy, Curve_smooth, Grid_square_25, Move_tool, Quick_circle_big, Quick_circle_huge, Quick_circle_layout, Shape_fill, Shape_smooth, Special_dyna_dots, Special_particles_crazy, Spray_splat

The rest just keep the same preset (of the list above of the ones that work) until a new one from the above list is selected. Anyway if I'm the only one with this issue I don't know if it's worth wasting your time trying to fix it, I have no idea what's wrong or changed with my system. Krita just stopped working suddenly for me when a new version came out. And as mentioned before I can still run the older versions.
Comment 12 Halla Rempt 2017-08-15 07:55:50 UTC
That's still totally weird, because those brushes have been part of Krita for years... I wonder whether you could create another user for testing on your system, download the latest release candidate as a portable zip file and start that? https://download.kde.org/unstable/krita/3.2.0-rc.3/
Comment 13 cyaoeu 2017-08-15 12:51:50 UTC
(In reply to Boudewijn Rempt from comment #12)
> That's still totally weird, because those brushes have been part of Krita
> for years... I wonder whether you could create another user for testing on
> your system, download the latest release candidate as a portable zip file
> and start that? https://download.kde.org/unstable/krita/3.2.0-rc.3/

I know, I mean, I used those brushes myself in previous versions. I tested creating a new local user and running Krita 3.2.0 rc3 there but it crashed the same way. 

I tested a bunch of previous versions and the latest version I could run was 3.0.1.1, so I guess 3.1 broke Krita for me.
Comment 14 Alvin Wong 2017-08-15 12:53:36 UTC
Do the respective 32-bit versions work for you?
Comment 15 cyaoeu 2017-08-15 13:27:32 UTC
(In reply to Alvin Wong from comment #14)
> Do the respective 32-bit versions work for you?

Nope, they crash the same way.
Comment 16 Alvin Wong 2017-08-15 13:35:01 UTC
Perhaps you should try doing a system file check by running `dism /Online /Cleanup-Image /ScanHealth` and `sfc /scannow`... it's a long shot...
Comment 17 cyaoeu 2017-10-16 19:42:19 UTC
Hi, I tried 3.3.1 and was surprised when Krita worked again. I have no idea what actually fixed it, the only difference from before is that I renamed a bunch of folders on my system drive.