Bug 396179

Summary: Krita crashing randomly
Product: [Applications] krita Reporter: Mohammad <turtleyboy101>
Component: OpenGL CanvasAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: antti.savo, dimula73, griffinvalley, halla
Priority: NOR    
Version: 4.1.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: kritacrash.log
kritarc file
kritacrash.log 2
kritarc file #2

Description Mohammad 2018-07-05 02:10:53 UTC
Created attachment 113770 [details]
kritacrash.log

I just upgraded from Krita 4.0.3 to 4.1.0 and it's been crashing too often for no reason. I submitted a post on the Krita sub:

(https://www.reddit.com/r/krita/comments/8vzjgc/i_just_installed_krita_410_and_it_crashes_too/)

And I've been told to submit a bug with the kritacrash.log information if the transform tool fix in the kritarc file doesn't work.
Comment 1 Antti Savolainen 2018-07-05 12:43:52 UTC
Can you attach your kritarc file? We have a lot of people doing long projects without experiencing any crashes so I assume it's your personal config. After posting it, you can delete the file to test if the program crashes with the default settings. Let me know.
Also, would you have any pointers on what you were doing before the crash?
Comment 2 Mohammad 2018-07-05 19:02:04 UTC
Created attachment 113785 [details]
kritarc file

Here's the kritarc file. And as far as I know, I haven't done anything that might have caused the crashes, but there's a program that I tried to use (Silky Shark) that didn't work with Krita and was very buggy.
Comment 3 Mohammad 2018-07-05 23:22:45 UTC
(In reply to Antti Savolainen from comment #1)
> Can you attach your kritarc file? We have a lot of people doing long
> projects without experiencing any crashes so I assume it's your personal
> config. After posting it, you can delete the file to test if the program
> crashes with the default settings. Let me know.
> Also, would you have any pointers on what you were doing before the crash?

I downgraded to 4.1.0 beta 2 and now it works even better, since in the official 4.1.0 "stable" release I couldn't open the pop up palette when I right clicked with my stylus. Now I can open the pop up palette, and Krita doesn't crash every 5 minutes.
Comment 4 Mohammad 2018-07-06 00:38:08 UTC
(In reply to Mohammad from comment #3)

Never mind that. For some reason it crashes a lot as well.
Comment 5 Dmitry Kazakov 2018-07-09 07:31:44 UTC
Hi, Mohammad!

Could you check this table nightly build, the bug should be fixed there:

https://binary-factory.kde.org/job/Krita_Stable_Windows_Build/

If you still have this very crash on activation of the Transform Tool, please reopen the bug.


The crash itself was in this commit but it was not included into the release:
https://phabricator.kde.org/R37:5f86c598a310da66006d29cb8976260d4853abf5
Comment 6 Mohammad 2018-07-09 15:05:23 UTC
Hi, Dmitry.

I’ve downloaded the nightly build and it worked fine with the transform tool, until it decided to crash when I used it again..

It’s very confusing and I don’t know if the crashes are caused by the transform tool or not.
Comment 7 Mohammad 2018-07-09 15:07:28 UTC
Hi, Dmitry.

I’ve downloaded the nightly build and it worked fine with the transform tool, until it decided to crash when I used it again..

It’s very confusing and I don’t know if the crashes are caused by the transform tool or not.
Comment 8 Mohammad 2018-07-11 20:57:18 UTC
The crashing is not caused by the transform tool. I don't know what is causing it though, and it crashes every 10-15 minutes. 

It's been a week or more since this has been happening and it's the most annoying thing ever. I hope I get it fixed soon.
Comment 9 Mohammad 2018-07-18 23:15:16 UTC
Any news, guys? Krita literally crashes every two minutes for me.
Comment 10 Halla Rempt 2018-07-19 07:24:23 UTC
Well, that's not normal, of course, but the problem is that this doesn't happen to other people. I don't see any crashes on any of my test systems... So there cannot be news from our side, since we don't have the problem.

You could: try to disable canvas acceleration, or switch between opengl and angle, check whether your computer's graphics drivers are up to date. 

We could take a look at a fresh crash log, and it might be interesting to see the output of help/system information for bug reports, to see what kind of hardware setup you have.
Comment 11 Mohammad 2018-07-19 09:41:36 UTC
Created attachment 114010 [details]
kritacrash.log 2

I already sent a crash log a week or so ago but here's another one.
Comment 12 Halla Rempt 2018-07-19 10:15:52 UTC
Hm, that one doesn't show Krita literally crashing every two minutes. There are six crashes, spaced out from March to July:

Error occurred on Friday, March 9, 2018 at 16:22:18.
Error occurred on Friday, March 9, 2018 at 18:46:43.
Error occurred on Thursday, April 12, 2018 at 21:53:08.
Error occurred on Wednesday, April 18, 2018 at 17:40:31.
Error occurred on Wednesday, July 4, 2018 at 08:02:29.
Error occurred on Thursday, July 5, 2018 at 03:29:32

The first couple of crashes are related to the GPU, the last two to the transform tool bug. And that one has been fixed in 4.1.1, which was released yesterday.
Comment 13 Mohammad 2018-07-19 10:36:05 UTC
Maybe because I close Krita with the task manager it doesn't add it in the crash log? And the transform tool works fine for me most of the time.
Comment 14 Halla Rempt 2018-07-19 11:05:29 UTC
Hm, yes, in that case we won't get a crash log :-(. Does Krita hang if you disable CPU acceleration?
Comment 15 Halla Rempt 2018-07-19 11:05:56 UTC
Oh, and if you start Krita as administrator, does it still hang?
Comment 16 Mohammad 2018-07-19 11:28:02 UTC
Yes, it does crash when opened as administrator with CPU acceleration disabled. 

I wanted to record a video to show my process, so here https://streamable.com/bbdt8
Comment 17 Halla Rempt 2018-07-19 11:47:09 UTC
Hm... And do you have any "security" software installed other than Windows Defender?
Comment 18 Mohammad 2018-07-19 11:48:52 UTC
Nope. I despise them so I never even bothered to use them.
Comment 19 Halla Rempt 2018-07-19 12:31:26 UTC
Damn, that's another hypothesis down...
Comment 20 Halla Rempt 2018-07-19 12:48:58 UTC
It looks like you're zooming in or out when the hang happens -- is that correct? If so, how do you usally zoom?

And have you run a memory checker to see whether there might be a hardware issue?
Comment 21 Halla Rempt 2018-07-19 12:55:33 UTC
Could you try to get a stack trace when Krita hangs, like this:

use Process Explorer: right-click on krita.exe, choose Properties, go to the Threads tab, selects the thread which's probably consuming 100% CPU time, then click the Stack button
Comment 22 Mohammad 2018-07-19 13:09:51 UTC
I have noticed that zooming causes the crashes sometimes but I'm not entirely sure, I usually zoom with CTRL + Space. 

Here's the stack trace:

libkritaimage.dll!ZN18KisUpdateScheduler13processQueuesEv+0x56
libkritaimage.dll!ZN18KisUpdateScheduler11barrierLockEv+0x23
libkritaimage.dll!ZN8KisImage11barrierLockEb+0x46
libkritaui.dll!ZN18KisAnimationPlayer11uploadFrameEi+0x1e1
Qt5Core.dll!ZN11QMetaObject8activateEP7QObjectiiPPv+0x7fa
Qt5Core.dll!ZN6QTimer10timerEventEP11QTimerEvent+0x5a
Qt5Core.dll!ZN7QObject5eventEP6QEvent+0x7b
Qt5Widgets.dll!ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x9c
Qt5Widgets.dll!ZN12QApplication6notifyEP7QObjectP6QEvent+0x2f0
libkritaui.dll!ZN14KisApplication6notifyEP7QObjectP6QEvent+0x16
Qt5Core.dll!ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent+0x198
Qt5Core.dll!ZN28QEventDispatcherWin32Private14sendTimerEventEi+0xd9
Qt5Core.dll!ZN28QEventDispatcherWin32Private14sendTimerEventEi+0x5a3
USER32.dll!CallWindowProcW+0x4c1
USER32.dll!DispatchMessageW+0x1d3
Qt5Core.dll!ZN21QEventDispatcherWin3213processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x5cb
qwindows.dll!qt_plugin_instance+0x28e5
Qt5Core.dll!ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x13f
Qt5Core.dll!ZN16QCoreApplication4execEv+0x77
krita.exe+0x6641
krita.exe+0x13f7
krita.exe+0x14fb
KERNEL32.DLL!BaseThreadInitThunk+0x14
ntdll.dll!RtlUserThreadStart+0x21
Comment 23 Halla Rempt 2018-07-20 09:17:50 UTC
Were you working on an animation at that point?
Comment 24 Mohammad 2018-07-20 11:04:50 UTC
Nope, only drawing
Comment 25 Mohammad 2018-09-15 03:49:01 UTC
I made a new user on my laptop (same laptop that crashes) and Krita runs just fine on it. No crashes, bugs or anything.
Comment 26 Halla Rempt 2018-09-15 08:17:32 UTC
Then I guess that somehow krita's settings for your normal user are broken. Could you attach the kritarc file to this bug?
Comment 27 Mohammad 2018-09-16 08:36:03 UTC
Created attachment 114999 [details]
kritarc file #2
Comment 28 Mohammad 2018-09-20 12:47:32 UTC
Any news, guys?
Comment 29 Halla Rempt 2018-09-20 16:58:28 UTC
Sorry, no, I was a bit busy because we just started the new fundraiser. If you've reset your regular user's kritarc, you can work, right?
Comment 30 Mohammad 2018-09-20 17:02:20 UTC
I've tried deleting the kritarc as you guys suggested before and it still hasn't been fixed.

It's been months since I reported this bug and I guess it's a problem on my own laptop. So I'll just end it here and let you guys do your work, sorry for interrupting.
Comment 31 Halla Rempt 2018-09-20 17:56:38 UTC
I still need to test with that kritarc file -- and I still wonder what the deuce is up -- I mean, we've tried to eliminate lots of things, but there just seems something associated with your regular user account on that hardware that is a problem which is not present with that new user account. And I do wish I knew what the difference was!
Comment 32 Mohammad 2018-09-21 11:07:13 UTC
Take your time. School is starting tomorrow and I won't be using Krita much but I'd love to have it fixed. Good luck with the fundraiser :D
Comment 33 wolthera 2019-04-08 16:05:45 UTC
Hopefully this'll be fixed by 4.2 or perhaps a new laptop.

Mohammad, if you can find any more information about the issue, please don't hesitate to reopen this report!