Bug 422320 - Loading Gradient Overlay layer style is broken
Summary: Loading Gradient Overlay layer style is broken
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: layer styles (show other bugs)
Version: 4.2.8
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-01 11:04 UTC by undad
Modified: 2020-06-11 16:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description undad 2020-06-01 11:04:33 UTC
SUMMARY
I used to import .psd files into Krita before, but after an update to 4.2.8 it crashes every time I try to import any .psd file. Doesn't matter how big the file is of what it contains.

STEPS TO REPRODUCE
1. Take a .psd file to import
2. Put it in Krita
3. Wait for the crash

OBSERVED RESULT
If I try to open a file without having Krita started, it starts Krita, then freezes and crashes after about 1 minute.
If I have Krita started and try to import the file, it freezes Krita instantly and makes it crash.

EXPECTED RESULT
Import of .psd file without any problems.

SOFTWARE/OS VERSIONS
Windows: 8.1
Comment 1 Halla Rempt 2020-06-01 12:16:27 UTC
Hi,

Can you please try the 4.3.0 beta release? See https://krita.org/en/item/first-beta-of-krita-4-3-0-released/ I have no problems opening psd files with that version.
Comment 2 undad 2020-06-01 21:25:56 UTC
(In reply to Boudewijn Rempt from comment #1)
> Hi,
> 
> Can you please try the 4.3.0 beta release? See
> https://krita.org/en/item/first-beta-of-krita-4-3-0-released/ I have no
> problems opening psd files with that version.

I tried it, some files can now be opened. But some still cause the app to crash :/ Now it probably depends on how large the file is.
Comment 3 Bug Janitor Service 2020-06-02 04:33:15 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 4 Halla Rempt 2020-06-02 09:03:04 UTC
Okay, then I need to have access to the files that cause the crash so I can debug them.
Comment 5 undad 2020-06-04 09:10:58 UTC
(In reply to Boudewijn Rempt from comment #4)
> Okay, then I need to have access to the files that cause the crash so I can
> debug them.

Ok, no problem. I tried downloading some UI elements for analyzing, it should be this one:
https://downloadpsd.cc/downloads/Cartoon-Style-Game-GUI-Kit-Free-PSD.zip
The file is too big, so I can't send it as attachement.
But I think that the crash might have been caused by RAM failure, because the file was too big. I tried loading a bit smaller file and it loded fine, just took about 3 minutes loading.
So it is probably just on my side, but I hope there will be some way of making Krita process these files faster and that they will take less RAM (the smaller file I had took 12GB of my RAM, about a half I have).

Just an idea- would it be possible to make some sort of online converter or another mini-app just as converter for .psd files into .kra? It might help a lot, but I honestly have no idea how much work it would take you...
Comment 6 Halla Rempt 2020-06-04 09:14:06 UTC
The specific problem seems to be with a gradient layer style in this file. I get the crash with this file, too, and I have the following crash log:

hread 1 (Thread 0x7f6d7c3f1800 (LWP 5852)):
[KCrash Handler]
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#5  0x00007f6d76b8b801 in __GI_abort () at abort.c:79
#6  0x00007f6d775b668b in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f6d775b5e81 in qt_assert(char const*, char const*, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f6d7482c4cd in QList<KoGradientSegment*>::last (this=0x560b9d232568) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1059
#9  KisAslXmlWriter::writeSegmentGradient (this=this@entry=0x7fff20e66970, key=..., gradient=gradient@entry=0x560b9d232550) at /home/boud/dev/4.3/libs/psd/asl/kis_asl_xml_writer.cpp:363
#10 0x00007f6d7b093446 in KisAslLayerStyleSerializer::formXmlDocument (this=0x7fff20e66aa0) at /home/boud/dev/4.3/libs/ui/kis_asl_layer_style_serializer.cpp:585
#11 0x00007f6d7b0957ea in KisAslLayerStyleSerializer::saveToDevice (this=this@entry=0x7fff20e66aa0, device=device@entry=0x7fff20e66a90) at /home/boud/dev/4.3/libs/ui/kis_asl_layer_style_serializer.cpp:720
#12 0x00007f6d7b0b8ce7 in KisPSDLayerStyleCollectionResource::saveToDevice (dev=0x7fff20e66a90, this=0x560ba7069ce0) at /home/boud/dev/4.3/libs/ui/kis_psd_layer_style_resource.cpp:92
#13 KisPSDLayerStyleCollectionResource::generateMD5 (this=0x560ba7069ce0) at /home/boud/dev/4.3/libs/ui/kis_psd_layer_style_resource.cpp:118
#14 0x00007f6d7458c6e9 in KoResource::md5 (this=this@entry=0x560ba7069ce0) at /home/boud/dev/4.3/libs/pigment/resources/KoResource.cpp:81
#15 0x00007f6d1cc87aa9 in KoResourceServer<KisPSDLayerStyleCollectionResource, PointerStoragePolicy<KisPSDLayerStyleCollectionResource> >::addResourceToMd5Registry (resource=0x560ba7069ce0, this=0x560b318c8e30) at /home/boud/dev/4.3/libs/widgets/KoResourceServer.h:717
#16 KoResourceServer<KisPSDLayerStyleCollectionResource, PointerStoragePolicy<KisPSDLayerStyleCollectionResource> >::addResource (this=0x560b318c8e30, resource=<optimized out>, resource@entry=0x560ba7069ce0, save=save@entry=false, infront=infront@entry=false) at /home/boud/dev/4.3/libs/widgets/KoResourceServer.h:281
#17 0x00007f6d1cc80d82 in PSDLoader::decode (this=<optimized out>, io=<optimized out>) at /home/boud/dev/4.3/plugins/impex/psd/psd_loader.cpp:356
#18 0x00007f6d1cc8311e in PSDLoader::buildImage (this=this@entry=0x7fff20e67000, io=io@entry=0x7fff20e67070) at /home/boud/dev/4.3/plugins/impex/psd/psd_loader.cpp:364
#19 0x00007f6d1cc7de42 in psdImport::convert (this=<optimized out>, document=0x560b290e9be0, io=0x7fff20e67070) at /home/boud/dev/4.3/plugins/impex/psd/psd_import.cc:41
#20 0x00007f6d7b0e89c8 in KisImportExportManager::doImport (this=0x560b99441660, location=..., filter=...) at /home/boud/dev/4.3/libs/global/kis_shared_ptr.h:75
#21 0x00007f6d7b0ea1bc in KisImportExportManager::convert (this=0x560b99441660, direction=<optimized out>, location=..., realLocation=..., mimeType=..., showWarnings=<optimized out>, exportConfiguration=..., isAsync=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qsharedpointer_impl.h:324
#22 0x00007f6d7b0eae5e in KisImportExportManager::importDocument (this=this@entry=0x560b99441660, location=..., mimeType=...) at /home/boud/dev/4.3/libs/global/kis_shared_ptr.h:218
#23 0x00007f6d7b0d9179 in KisDocument::openFile (this=0x560b290e9be0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:1051
#24 0x00007f6d7b0d9a4d in KisDocument::openUrlInternal (this=0x560b290e9be0, url=...) at /home/boud/dev/4.3/libs/ui/KisDocument.cpp:2037
#25 0x00007f6d7b0da072 in KisDocument::openUrl (this=0x560b290e9be0, _url=..., flags=...) at /home/boud/dev/4.3/libs/ui/KisDocument.cpp:1452
#26 0x00007f6d7b0f1805 in KisMainWindow::openDocumentInternal (this=0x560b298c5920, url=..., flags=...) at /home/boud/dev/4.3/libs/ui/KisMainWindow.cpp:1033
#27 0x00007f6d7b0fc4f5 in KisMainWindow::openDocument (this=0x560b298c5920, url=..., flags=...) at /home/boud/dev/4.3/libs/ui/KisMainWindow.cpp:997
#28 0x00007f6d7b0fc8a0 in KisMainWindow::slotFileOpen (this=0x560b298c5920, isImporting=false) at /home/boud/dev/4.3/libs/ui/KisMainWindow.cpp:1624
#29 0x00007f6d7b10604d in KisMainWindow::qt_static_metacall (_o=0x560b298c5920, _c=<optimized out>, _id=<optimized out>, _a=0x7fff20e67a90) at /home/boud/dev/b-4.3/libs/ui/kritaui_autogen/include/moc_KisMainWindow.cpp:352
#30 0x00007f6d778054b9 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007f6d786b34a2 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007f6d786b5b0c in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007f6d786b64a1 in QAction::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007f6d786b99ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007f6d786c0bb0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007f6d7b0c1489 in KisApplication::notify (this=<optimized out>, receiver=0x560bac6966b0, event=0x7fff20e67e20) at /home/boud/dev/4.3/libs/ui/KisApplication.cpp:680
#37 0x00007f6d777ca4a8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#38 0x00007f6d77df2872 in QShortcutMap::dispatchEvent(QKeyEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#39 0x00007f6d77df293a in QShortcutMap::tryShortcut(QKeyEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#40 0x00007f6d77da4a93 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#41 0x00007f6d77dc3f67 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#42 0x00007f6d77dc89c5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#43 0x00007f6d77da11cb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#44 0x00007f6d67d45f9a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#45 0x00007f6d6eb25417 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007f6d6eb25650 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007f6d6eb256dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007f6d778297ac in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#49 0x00007f6d777c8d2a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#50 0x00007f6d777d24a0 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#51 0x0000560b2554ab47 in main (argc=<optimized out>, argv=0x7fff20e685a8) at /home/boud/dev/4.3/krita/main.cc:594
[Inferior 1 (process 5852) detached]
Comment 7 Halla Rempt 2020-06-04 11:18:23 UTC
Okay, I've got the image loading. The problem is that some of the gradient overlays are broken. It's not really too big in any case, only 212.4 mb when loaded. But all the layer styles make updating the image very slow in Krita.
Comment 8 Halla Rempt 2020-06-04 11:24:41 UTC
Git commit c6aeea52bd4f4239fb8588f01eeeab8960ef93f9 by Boudewijn Rempt.
Committed on 04/06/2020 at 11:24.
Pushed by rempt into branch 'krita/4.3'.

Do not crash on loading broken gradients in layer styles

The real bug is, of course, that we don't load those gradients
correctly to start with.

M  +0    -2    libs/pigment/resources/KoSegmentGradient.cpp
M  +2    -1    libs/psd/asl/kis_asl_xml_writer.cpp
M  +9    -10   libs/ui/kis_asl_layer_style_serializer.cpp

https://invent.kde.org/graphics/krita/commit/c6aeea52bd4f4239fb8588f01eeeab8960ef93f9
Comment 9 Halla Rempt 2020-06-04 11:24:49 UTC
Git commit cc3adcfd25be14e977081720b631173470bbc0d4 by Boudewijn Rempt.
Committed on 04/06/2020 at 11:24.
Pushed by rempt into branch 'master'.

Do not crash on loading broken gradients in layer styles

The real bug is, of course, that we don't load those gradients
correctly to start with.
(cherry picked from commit edf21708d15addb2598a6aedcd510ede14e969f1)

M  +9    -10   libs/image/kis_asl_layer_style_serializer.cpp
M  +0    -2    libs/pigment/resources/KoSegmentGradient.cpp
M  +2    -1    libs/psd/asl/kis_asl_xml_writer.cpp

https://invent.kde.org/graphics/krita/commit/cc3adcfd25be14e977081720b631173470bbc0d4
Comment 10 Halla Rempt 2020-06-04 11:30:41 UTC
Enabling extra warnings show:

WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 1
WARNING: ASL gradient has inconsistent number of transparency stops. Dropping transparency... colors.size() = 1 transparencies.size() = 2
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
WARNING: ASL gradient has too few stops colors.size() = 0
Comment 11 Halla Rempt 2020-06-06 10:07:10 UTC
When assinging a bug to yourself, please change the status to assigned.
Comment 12 undad 2020-06-06 18:34:37 UTC
(In reply to Boudewijn Rempt from comment #11)
> When assinging a bug to yourself, please change the status to assigned.

I'm really confused from past few comments :D
I get this- that file will probably not work because it has some gradient problem, or it will load very, very slowly.
I tried loading one of pictures my friend made for me and it took kinda long as well and it is not even very complicated file.

Do you have some tips for me how to make Krita load them more efficient then?
Comment 13 Halla Rempt 2020-06-06 18:54:03 UTC
Well, that's because this is a bug tracker; it's a tool for developers, not a user support area.

So, the thing is, I found why the file didn't load, Dmitry assigned the job of fixing that issue properly to himself after I had mitigated the issue by making Krita more resilient.

But as for your actual question; the only way to make Krita work better with psd files is to use fewer layers and certainly fewer layer styles. Krita is the only open source application that supports psd layer styles, but they do slow down things.
Comment 14 undad 2020-06-08 20:12:31 UTC
Ok, thank you :)
So I think that this is closed from my side now, I have nothing more to add.

Thanks for explaining and testing it.
Comment 15 Dmitry Kazakov 2020-06-11 09:29:02 UTC
I think the bug is caused by the fact that some gradients have only one segment/spot. That is officially supported by SVG standard. Though I need a bit more investigation.
Comment 16 Halla Rempt 2020-06-11 11:10:06 UTC
I think I even encountered a gradient with no segments, and I was wondering whether that was how photoshop is describing the fg/bg autogradient...
Comment 17 Dmitry Kazakov 2020-06-11 16:29:21 UTC
Git commit ffa705f730acc0f7ef6b4b9bc704e342f246f7a6 by Dmitry Kazakov.
Committed on 11/06/2020 at 16:28.
Pushed by dkazakov into branch 'krita/4.3'.

Fix loading ASL gradients with only one stop

A gradient with only one stop is perfectly valid and means solid
color fill. We should convert such gradients in to a form that
can be anderstood by Krita

M  +45   -23   libs/psd/asl/kis_asl_xml_parser.cpp
M  +1    -0    libs/psd/asl/kis_asl_xml_writer.cpp
M  +2    -2    libs/ui/kis_asl_layer_style_serializer.cpp

https://invent.kde.org/graphics/krita/commit/ffa705f730acc0f7ef6b4b9bc704e342f246f7a6
Comment 18 Dmitry Kazakov 2020-06-11 16:30:46 UTC
Git commit 44e2bf444b815d6036afcb65cec39e2c2ec418b2 by Dmitry Kazakov.
Committed on 11/06/2020 at 16:30.
Pushed by dkazakov into branch 'master'.

Fix loading ASL gradients with only one stop

A gradient with only one stop is perfectly valid and means solid
color fill. We should convert such gradients in to a form that
can be anderstood by Krita

M  +2    -2    libs/image/kis_asl_layer_style_serializer.cpp
M  +45   -23   libs/psd/asl/kis_asl_xml_parser.cpp
M  +1    -0    libs/psd/asl/kis_asl_xml_writer.cpp

https://invent.kde.org/graphics/krita/commit/44e2bf444b815d6036afcb65cec39e2c2ec418b2