Bug 419783 - Random crashes on Mac
Summary: Random crashes on Mac
Status: RESOLVED LATER
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-07 10:08 UTC by Yu-Hsuan Lai
Modified: 2020-05-04 12:40 UTC (History)
2 users (show)

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


Attachments
system.log is the crash log shown by the OS. (120.20 KB, text/plain)
2020-04-07 10:08 UTC, Yu-Hsuan Lai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yu-Hsuan Lai 2020-04-07 10:08:51 UTC
Created attachment 127343 [details]
system.log is the crash log shown by the OS.

SUMMARY
Krita crashes on my Mac every once in a while. It seems to be very random and can happen at any time. Sometimes it crashes when I simply select a brush preset, but next time I can select the same brush preset without problem. I tried to launch Krita with LLDB but it doesn't work at all. So I launched Krita from Terminal and attached the log.


STEPS TO REPRODUCE
Unknown. It usually happens after 10~15 minutes of usage. 

OBSERVED RESULT
Crash. Exited by SIGSEGV.


EXPECTED RESULT
Not crash.


SOFTWARE/OS VERSIONS
macOS: 10.14.6
Krita: Nightly build. Git commit 5a1f66f

ADDITIONAL INFORMATION
Below is the log printed by Krita, launched with `$ /Applications/krita.app/Contents/MacOS/krita`, but it's very long I only cut the last part of it close to the crash moment.

LOG
resourceByName "c)_Pencil-5_Tilted"
Load preset  "c)_Pencil-5_Tilted.kpp"
resourceByFilename "Foreground to Background"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
resourceByFilename "Foreground to Transparent"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
resourceByFilename "Foreground to Background"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
resourceByFilename "Foreground to Transparent"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
resourceByFilename "Foreground to Background"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
resourceByFilename "Foreground to Transparent"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
resourceByFilename "Foreground to Background"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
resourceByFilename "Foreground to Transparent"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
resourceByFilename "Foreground to Background"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
resourceByFilename "Foreground to Transparent"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
resourceByFilename "Foreground to Background"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
resourceByFilename "Foreground to Transparent"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
resourceByFilename "Foreground to Background"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
resourceByFilename "Foreground to Transparent"
>>>>>>>>>>>>>>>> storageLocation "memory" resource storage location "memory"
KisResourceModel::resetQuery for "gradients" took 1 ms
2020-04-07 17:39:31.076 krita[2510:423328] Ignoring request from Finder Sync Extension to register for file:///Library/Application%20Support/Adobe/CEP/
2020-04-07 17:39:31.078 krita[2510:423328] Ignoring request from Finder Sync Extension to register for file:///Users/raincole/Library/Preferences/Adobe%20Photoshop%202020%20Settings/
PALETTELIST storage [RESOURCESTORAGE] Name: "{56781261-2fc7-44c7-acb1-9361441c999c}" Version: "{56781261-2fc7-44c7-acb1-9361441c999c}" Valid: true Storage: "Memory" Timestamp: QDateTime(2020-04-07 17:34:51.723 CST Qt::LocalTime)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len) <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE DOC PUBLIC '-//KDE//DTD krita 2.0//EN' 'http://www.calligra.org/DTD/krita-2.0.dtd'>
<DOC xmlns="http://www.calligra.org/DTD/krita" kritaVersion="5.0.0-prealpha" editor="Krita" syntaxVersion="2">
 <IMAGE proofing-profile-name="Gray-D50-elle-V2-srgbtrc.icc" description="" name="krita-test" width="1600" height="1200" profile="sRGB-elle-V2-srgbtrc.icc" proofing-intent="3" y-res="100" colorspacename="RGBA" proofing-adaptation-state="1" x-res="100" proofing-model="GRAYA" mime="application/x-kra" proofing-depth="U8">
  <layers>
   <layer filename="layer2" uuid="{ef9bd856-b80e-4026-a8e4-d34f6c1ab619}" onionskin="0" locked="0" y="0" visible="1" intimeline="1" name="Layer 3" channelflags="" opacity="255" colorlabel="0" nodetype="paintlayer" collapsed="0" compositeop="normal" x="0" colorspacename="RGBA" channellockflags="1111"/>
   <layer nodetype="paintlayer" colorspacename="RGBA" onionskin="0" channellockflags="1111" name="Layer 1" filename="layer3" locked="0" compositeop="normal" visible="1" opacity="255" y="27" colorlabel="0" uuid="{a62d93e7-a591-48f6-abad-56ced90f0e84}" collapsed="0" selected="true" x="146" intimeline="1" channelflags=""/>
   <layer filename="layer4" uuid="{e6f08c23-ba17-458e-b81f-9a9df0da15a2}" onionskin="0" locked="1" y="0" visible="1" intimeline="1" name="Background" channelflags="" opacity="255" colorlabel="0" nodetype="paintlayer" collapsed="0" compositeop="normal" x="0" colorspacename="RGBA" channellockflags="1111"/>
  </layers>
  <ProjectionBackgroundColor ColorData="AAAAAA=="/>
  <GlobalAssistantsColor SimpleColorData="176,176,176,255"/>
  <ProofingWarningColor>
   <RGB r="0" b="0" g="1" space="sRGB-elle-V2-srgbtrc.icc"/>
  </ProofingWarningColor>
  <MirrorAxis>
   <mirrorHorizontal type="value" value="0"/>
   <mirrorVertical type="value" value="0"/>
   <lockHorizontal type="value" value="0"/>
   <lockVertical type="value" value="0"/>
   <hideHorizontalDecoration type="value" value="0"/>
   <hideVerticalDecoration type="value" value="0"/>
   <handleSize type="value" value="32"/>
   <horizontalHandlePosition type="value" value="64"/>
   <verticalHandlePosition type="value" value="64"/>
   <axisPosition y="600" x="800" type="pointf"/>
  </MirrorAxis>
  <palettes/>
  <animation>
   <framerate type="value" value="24"/>
   <range from="0" to="100" type="timerange"/>
   <currentTime type="value" value="0"/>
  </animation>
 </IMAGE>
</DOC>
 2443
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len) <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document-info PUBLIC '-//KDE//DTD document-info 1.1//EN' 'http://www.calligra.org/DTD/document-info-1.1.dtd'>
<document-info xmlns="http://www.calligra.org/DTD/document-info">
 <about>
  <title>krita-test</title>
  <description></description>
  <subject></subject>
  <abstract><![CDATA[]]></abstract>
  <keyword></keyword>
  <initial-creator>Unknown</initial-creator>
  <editing-cycles>3</editing-cycles>
  <editing-time>606</editing-time>
  <date>2020-04-07T15:23:07</date>
  <creation-date>2020-04-07T14:39:26</creation-date>
  <language></language>
  <license></license>
 </about>
 <author>
  <full-name></full-name>
  <creator-first-name></creator-first-name>
  <creator-last-name></creator-last-name>
  <initial></initial>
  <author-title></author-title>
  <position></position>
  <company></company>
 </author>
</document-info>
 883
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len) �PNG

�i�o� 8
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  8
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  13
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len) ���fIHDR� 4
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  8
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  9
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  4
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  8
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len) x����J�Q��5��9�"$�����i!@�����N�!�u��u�ֻ��i@�r��| 799
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len) ����IDAT� 4
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  8
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len) �B`�IEND� 4
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len) VERSION 2
TILEWIDTH 64
TILEHEIGHT 64
PIXELSIZE 4
DATA 2
 56
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len) 896,768,LZF,919
 16
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  919
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len) 896,704,LZF,1269
 17
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  1269
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  4
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  9080
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len) VERSION 2
TILEWIDTH 64
TILEHEIGHT 64
PIXELSIZE 4
DATA 0
 56
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  4
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  9080
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len) VERSION 2
TILEWIDTH 64
TILEHEIGHT 64
PIXELSIZE 4
DATA 0
 56
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len) ���� 4
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  9080
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  9080
qint64 KoQuaZipStore::write (3)
QUAZIP! qint64 KoQuaZipStore::write(const char *_data, qint64 _len)  8868
qint64 KoQuaZipStore::write (3)
PALETTELIST storage [RESOURCESTORAGE] Name: "{56781261-2fc7-44c7-acb1-9361441c999c}" Version: "{56781261-2fc7-44c7-acb1-9361441c999c}" Valid: true Storage: "Memory" Timestamp: QDateTime(2020-04-07 17:34:51.723 CST Qt::LocalTime)
saving palettes to document 0
PALETTELIST storage [RESOURCESTORAGE] Name: "{56781261-2fc7-44c7-acb1-9361441c999c}" Version: "{56781261-2fc7-44c7-acb1-9361441c999c}" Valid: true Storage: "Memory" Timestamp: QDateTime(2020-04-07 17:34:51.723 CST Qt::LocalTime)
fish: '/Applications/krita.app/Content…' terminated by signal SIGSEGV (Address boundary error)
Comment 1 Halla Rempt 2020-04-07 10:24:39 UTC
The crash happens deep inside Qt, where it tries to create or draw a window. I see you have a mac with a radeon gpu. If you disable canvas acceleration, do the crashes go away?
Comment 2 Yu-Hsuan Lai 2020-04-07 11:34:23 UTC
(In reply to Boudewijn Rempt from comment #1)
> The crash happens deep inside Qt, where it tries to create or draw a window.
> I see you have a mac with a radeon gpu. If you disable canvas acceleration,
> do the crashes go away?

Ok, I disabled it and will keep using for a while. Strangely, after I disabled canvas acceleration, the UI actually feels MUCH faster (especially when I zoom the canvas). Is it a known issue?
Comment 3 Halla Rempt 2020-04-07 12:07:09 UTC
Yes, unfortunately Apple ships really bad opengl drivers. They want everyone to use Metal, but that's proprietary stuff, which we don't want to use. Until there's a good opengl to metal translation library, we'll have problems with macOS. It's one reason we haven't put Krita in the Apple store. The CPU-based canvas has its own problems, and it doesn't support some features, like tiling the canvas.
Comment 4 Yu-Hsuan Lai 2020-04-07 12:27:54 UTC
(In reply to Boudewijn Rempt from comment #3)
> Yes, unfortunately Apple ships really bad opengl drivers. They want everyone
> to use Metal, but that's proprietary stuff, which we don't want to use.
> Until there's a good opengl to metal translation library, we'll have
> problems with macOS. It's one reason we haven't put Krita in the Apple
> store. The CPU-based canvas has its own problems, and it doesn't support
> some features, like tiling the canvas.

Ok, I understand that Mac has bad support for OpenGL. I've heard the same issue from Blender's community too. It's rather off-topic, but do you think it's possible to switch to Vulkan and MoltenVK, which are both open protocols? Again I understand it's not trivial work and not Krita devteams' priority.

Back to the original issue, I haven't experienced another crash so far, but I think it's better to wait for several days before we close the case. (And perhaps the canvas acceleration should be disabled by default on Mac?)
Comment 5 Halla Rempt 2020-04-07 12:42:50 UTC
We're hoping that Angle (which we use on Windows) will soon see its Metal backend released -- then our problems should be much less. Porting to Vulkan isn't planned at this point.
Comment 6 Yu-Hsuan Lai 2020-04-07 12:57:28 UTC
(In reply to Boudewijn Rempt from comment #5)
> We're hoping that Angle (which we use on Windows) will soon see its Metal
> backend released -- then our problems should be much less. Porting to Vulkan
> isn't planned at this point.

Got it. Another issue (anti-issue?) I've noticed is that even you said tilting canvas isn't supported, I can still rotate my canvas with canvas acceleration disabled. Or tilting and rotating are two different things?
Comment 7 Halla Rempt 2020-04-07 13:10:16 UTC
I was talking about tiling, not tilting. Tiling shows your image repeated horizontally and vertically -- it's very handy when painting seamless textures.
Comment 8 Yu-Hsuan Lai 2020-04-07 13:57:45 UTC
(In reply to Boudewijn Rempt from comment #7)
> I was talking about tiling, not tilting. Tiling shows your image repeated
> horizontally and vertically -- it's very handy when painting seamless
> textures.

Oh okay, I misread lol. Thanks for your patience to silly me.
Comment 9 Bug Janitor Service 2020-04-08 04:33:19 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 10 Yu-Hsuan Lai 2020-04-08 17:13:32 UTC
I kept using it for several hours and no crash so far. But technically this bug still presents right? Turning off canvas acceleration seems like a workaround. Do you have a WONT-FIX-YET status?
Comment 11 Halla Rempt 2020-04-08 17:18:51 UTC
That would be resolved-later -- but I'll just keep the bug open for now. Though resolved-upstream might also be the case, given it happens in Qt's code.
Comment 12 vanyossi 2020-04-26 05:48:59 UTC
Do take note that current master is extremely laggy and prone to crashes. Fo work I suggest using the 4.3 branch, and keep master for testing. Even on my macbook pro, current git master can be slow and unusable in some cases.
Comment 13 Halla Rempt 2020-05-04 12:40:41 UTC
won't-fix-yet is resolved-later :-)