Bug 413444 - Opening Photoshop file causes crash
Summary: Opening Photoshop file causes crash
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.2.7
Platform: macOS (DMG) macOS
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 413906 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-25 15:02 UTC by Stephen Bennington
Modified: 2019-11-07 09:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Mac OS crash report fro Krita (102.11 KB, text/rtf)
2019-10-25 15:02 UTC, Stephen Bennington
Details
Photoshop image file (318.95 KB, application/x-photoshop)
2019-10-26 17:40 UTC, Stephen Bennington
Details
attachment-14968-0.txt (519 bytes, text/plain)
2019-10-27 12:49 UTC, Stephen Bennington
Details
crash report krita 4.2.7.rtf (102.11 KB, text/rtf)
2019-10-27 12:49 UTC, Stephen Bennington
Details
krita.log (40.72 KB, application/octet-stream)
2019-10-27 12:49 UTC, Stephen Bennington
Details
attachment-23449-0.txt (310 bytes, text/plain)
2019-10-27 16:06 UTC, Stephen Bennington
Details
kritapsdimport.so (528.48 KB, application/octet-stream)
2019-10-27 16:06 UTC, Stephen Bennington
Details
file search (80.00 KB, image/png)
2019-11-03 09:49 UTC, Stephen Bennington
Details
attachment-9554-0.html (3.60 KB, text/html)
2019-11-03 09:53 UTC, Stephen Bennington
Details
attachment-9554-1.html (545 bytes, text/html)
2019-11-03 09:53 UTC, Stephen Bennington
Details
attachment-9554-2.html (307 bytes, text/html)
2019-11-03 09:53 UTC, Stephen Bennington
Details
attachment-9554-3.html (307 bytes, text/html)
2019-11-03 09:53 UTC, Stephen Bennington
Details
attachment-9554-4.html (2.50 KB, text/html)
2019-11-03 09:53 UTC, Stephen Bennington
Details
Screenshot 2019-11-02 at 16.26.51.png (87.02 KB, image/png)
2019-11-03 09:53 UTC, Stephen Bennington
Details
psd import find.txt (265 bytes, text/plain)
2019-11-03 09:53 UTC, Stephen Bennington
Details
krita.log (3.19 KB, application/octet-stream)
2019-11-03 09:53 UTC, Stephen Bennington
Details
Crash report-2 Nov.rtf (203 bytes, text/rtf)
2019-11-03 09:53 UTC, Stephen Bennington
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Bennington 2019-10-25 15:02:08 UTC
Created attachment 123480 [details]
Mac OS crash report fro Krita

SUMMARY


I am using Krita on a Mac running Mojave 10.14.6.

I am finding that opening any .psd file causes an instant crash. ( I have tested various documents even the most simple single layer file. )

I am using the latest 4.2.7 build. If I go back to a Krita version 3 the psd’s open OK.

I have not had this problem until recently so I am not sure if Krita has changed or something in my system.
Comment 1 wolthera 2019-10-25 15:06:29 UTC
Hey, thanks for adding the crashlog. Could you share the PSD file that causes the crash? That would really speed up resolving the bug.
Comment 2 Stephen Bennington 2019-10-25 15:25:50 UTC
Hi,
Here is a simple one.

Thanks, Stephen
Comment 3 wolthera 2019-10-25 15:31:38 UTC
I am sorry, a mistake must have happened? I cannot see the psd?
Comment 4 Stephen Bennington 2019-10-26 17:40:01 UTC
Created attachment 123498 [details]
Photoshop image file

Not sure if you received .PSD image so sending it again here. Had to reduce size as it was over 4000Kb.
Comment 5 wolthera 2019-10-27 10:17:23 UTC
I can open it here on 4.2.7, 4.2.6, the nightly... Does the file you attached crash for you? Or do you think it's the file reduction that may have vanished the crash?
Comment 6 Halla Rempt 2019-10-27 10:19:53 UTC
Weird, it also opens fine on the project's one and only Macbook Pro. (Still running Mojave).
Comment 7 Stephen Bennington 2019-10-27 11:14:48 UTC
Hi,
Thanks for your messages.
The reduced PSD still crashes  Krita 4.2.7 and also 4.2.6 as do all other PSDs I have, yet all will open successfully in Krita 3.3.3.
Curiously if I save a Krita file as PSD then re-open it it also crashes.
 
I guess if you have no problem then it must be something on my machine. I did a Mojave update last week so maybe it is that.
I'll just have to use version 3 an hope it resolves in the future but any ideas you have would be welcome.

Stephen
Comment 8 Halla Rempt 2019-10-27 12:18:09 UTC
This is pretty strange... I'm beginning to wonder whether krita is trying to load a psd plugin that doesn't belong itself.
Comment 9 Halla Rempt 2019-10-27 12:21:41 UTC
Hm, this could be likely. The difference between 3 and 4 is the way plugins are loaded: 3 used desktop files, 4 uses information embedded in the plugin.

Could you check how many kritapsdimport.so files there are on your system?
Comment 10 Stephen Bennington 2019-10-27 12:49:55 UTC
Created attachment 123514 [details]
attachment-14968-0.txt

When I search for the kind of file you request (kritapsdimport.so) I get referred to my crash report which does list them.
Please find attached.
Also the ’krita log’ from the Library/application support

Stephen
Comment 11 Stephen Bennington 2019-10-27 12:49:56 UTC
Created attachment 123515 [details]
crash report krita 4.2.7.rtf
Comment 12 Stephen Bennington 2019-10-27 12:49:56 UTC
Created attachment 123516 [details]
krita.log
Comment 13 Halla Rempt 2019-10-27 14:53:20 UTC
Hm, so that isn't the list of files called psdimport.so, which is what I actually was interested in.
Comment 14 Halla Rempt 2019-10-27 14:53:35 UTC
or rather, kritapsdimport.so, of course.
Comment 15 Stephen Bennington 2019-10-27 16:06:57 UTC
Created attachment 123519 [details]
attachment-23449-0.txt

I had trouble finding it but I guess this is the one from the 4.2.7 plugins folder.
Comment 16 Stephen Bennington 2019-10-27 16:06:58 UTC
Created attachment 123520 [details]
kritapsdimport.so
Comment 17 Stephen Bennington 2019-11-01 22:41:43 UTC
Hi, Have you had any success in locating what the PSD file problem in 4.2.7 is being caused by?
Thanks
Comment 18 Halla Rempt 2019-11-02 09:37:34 UTC
Well, I am certain it is not a bug in Krita or a problem with the builds I make, but a problem on your system. A newer version of Krita, or an older version, won't solve the issue.

I think that krita might be loading the wrong plugin library from another version of Krita, maybe because something has messed up the DYLD paths on your mac. That's why I wanted to know in which places there's a kritapsdimport.so on your system.

You've attached the actual kritapsdimport.so file, but that's not what I needed to know; ideally, you'd open the terminal and execute the following command:


find / -name kritapsdimport.so 1>log 2>/dev/null

The output should be the full list of all instances of that file. Please attatch the log file to the bug report.

Then it would be a good thing to look at all environment variables:

set > env.log

And then attach that file as well. Then we might begin to figure out what's up.

It would also be useful to login on your mac as a guest or separate user and try to run krita and import a psd file.
Comment 19 Stephen Bennington 2019-11-03 09:49:00 UTC
Created attachment 123680 [details]
file search
Comment 20 Stephen Bennington 2019-11-03 09:53:34 UTC
Created attachment 123681 [details]
attachment-9554-0.html

I am replying to the email because I am not sure if attachemnets went with KDE page.

Hi, Thank you for your interest in my issue.
This is what I have tried:

I found the ‘kritapsdimport.so’ files on my machine which were for other earlier versions had had installed and deleted all those versions.

I also deleted  ‘Library/Application support/krita folder’
—still same crash problem on opening PSD file in 4.2.7

I logged in as a guest user and installed a new copy of  4.2.7
—still same crash problem.

I installed 4.2.7 on another Mac (running Sierra 10.12.6) that has never had Krita installed and saved a new file as a .PSD.
—still same crash problem on opening that file.
I was wondering if the issue was an upgrade of Mojave which I installed 2-3 weeks ago but it is apparently nothing to do with Mojave.

I have attached the krita.log and recent crash report.








> On 2 Nov 2019, at 09:37, Boudewijn Rempt <bugzilla_noreply@kde.org> wrote:
> 
> https://bugs.kde.org/show_bug.cgi?id=413444
> 
> --- Comment #18 from Boudewijn Rempt <boud@valdyas.org> ---
> Well, I am certain it is not a bug in Krita or a problem with the builds I
> make, but a problem on your system. A newer version of Krita, or an older
> version, won't solve the issue.
> 
> I think that krita might be loading the wrong plugin library from another
> version of Krita, maybe because something has messed up the DYLD paths on your
> mac. That's why I wanted to know in which places there's a kritapsdimport.so on
> your system.
> 
> You've attached the actual kritapsdimport.so file, but that's not what I needed
> to know; ideally, you'd open the terminal and execute the following command:
> 
> 
> find / -name kritapsdimport.so 1>log 2>/dev/null
> 
> The output should be the full list of all instances of that file. Please
> attatch the log file to the bug report.
> 
> Then it would be a good thing to look at all environment variables:
> 
> set > env.log
> 
> And then attach that file as well. Then we might begin to figure out what's up.
> 
> It would also be useful to login on your mac as a guest or separate user and
> try to run krita and import a psd file.
> 
> -- 
> You are receiving this mail because:
> You reported the bug.
Comment 21 Stephen Bennington 2019-11-03 09:53:35 UTC
Created attachment 123682 [details]
attachment-9554-1.html
Comment 22 Stephen Bennington 2019-11-03 09:53:35 UTC
Created attachment 123683 [details]
attachment-9554-2.html
Comment 23 Stephen Bennington 2019-11-03 09:53:35 UTC
Created attachment 123684 [details]
attachment-9554-3.html
Comment 24 Stephen Bennington 2019-11-03 09:53:35 UTC
Created attachment 123685 [details]
attachment-9554-4.html
Comment 25 Stephen Bennington 2019-11-03 09:53:35 UTC
Created attachment 123686 [details]
Screenshot 2019-11-02 at 16.26.51.png
Comment 26 Stephen Bennington 2019-11-03 09:53:35 UTC
Created attachment 123687 [details]
psd import find.txt
Comment 27 Stephen Bennington 2019-11-03 09:53:35 UTC
Created attachment 123688 [details]
krita.log
Comment 28 Stephen Bennington 2019-11-03 09:53:35 UTC
Created attachment 123689 [details]
Crash report-2 Nov.rtf
Comment 29 Halla Rempt 2019-11-04 08:16:27 UTC
This is so weird... I still cannot reproduce this on my mac, but if it happens on a completely separate mac with a different version of macos and only one copy of Krita installed, I must be wrong and it cannot be something specific to your system.
Comment 30 Halla Rempt 2019-11-04 11:48:31 UTC
Okay, I found the line Krita crashes on, and I'll make a workaround... If that line doesn't exist, Krita cannot crash :-)
Comment 31 Halla Rempt 2019-11-04 11:48:50 UTC
Git commit 959e4e355f685b3e68266d1263a7f8bd24c7f800 by Boudewijn Rempt.
Committed on 04/11/2019 at 11:48.
Pushed by rempt into branch 'master'.

Work around a bug in clang

Under some circumstances, the take() method of QScopedPointer
seems to cause a crash on macOS, probably because of an issue
in the compiler? It's the only place where we use clang.

M  +3    -2    plugins/impex/psd/psd_resource_section.cpp

https://invent.kde.org/kde/krita/commit/959e4e355f685b3e68266d1263a7f8bd24c7f800
Comment 32 Halla Rempt 2019-11-04 11:49:51 UTC
Git commit 331426cd3b7b26ab6474a4ac60d5bff88e55ac5d by Boudewijn Rempt.
Committed on 04/11/2019 at 11:49.
Pushed by rempt into branch 'krita/4.2'.

Work around a bug in clang

Under some circumstances, the take() method of QScopedPointer
seems to cause a crash on macOS, probably because of an issue
in the compiler? It's the only place where we use clang.
(cherry picked from commit 959e4e355f685b3e68266d1263a7f8bd24c7f800)

M  +3    -2    plugins/impex/psd/psd_resource_section.cpp

https://invent.kde.org/kde/krita/commit/331426cd3b7b26ab6474a4ac60d5bff88e55ac5d
Comment 33 Stephen Bennington 2019-11-05 09:38:52 UTC
Hi,
I just downloaded your build #194 and it works Ok for opening PSD files.
Well done you guys - you are very clever.

Stephen

> On 4 Nov 2019, at 11:49, Boudewijn Rempt <bugzilla_noreply@kde.org> wrote:
> 
> https://bugs.kde.org/show_bug.cgi?id=413444
> 
> Boudewijn Rempt <boud@valdyas.org> changed:
> 
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>      Latest Commit|https://invent.kde.org/kde/ |https://invent.kde.org/kde/
>                   |krita/commit/959e4e355f685b |krita/commit/331426cd3b7b26
>                   |3e68266d1263a7f8bd24c7f800  |ab6474a4ac60d5bff88e55ac5d
> 
> --- Comment #32 from Boudewijn Rempt <boud@valdyas.org> ---
> Git commit 331426cd3b7b26ab6474a4ac60d5bff88e55ac5d by Boudewijn Rempt.
> Committed on 04/11/2019 at 11:49.
> Pushed by rempt into branch 'krita/4.2'.
> 
> Work around a bug in clang
> 
> Under some circumstances, the take() method of QScopedPointer
> seems to cause a crash on macOS, probably because of an issue
> in the compiler? It's the only place where we use clang.
> (cherry picked from commit 959e4e355f685b3e68266d1263a7f8bd24c7f800)
> 
> M  +3    -2    plugins/impex/psd/psd_resource_section.cpp
> 
> https://invent.kde.org/kde/krita/commit/331426cd3b7b26ab6474a4ac60d5bff88e55ac5d
> 
> -- 
> You are receiving this mail because:
> You reported the bug.
Comment 34 Halla Rempt 2019-11-05 09:41:47 UTC
Thanks for testing!
Comment 35 Halla Rempt 2019-11-07 09:13:51 UTC
*** Bug 413906 has been marked as a duplicate of this bug. ***