Bug 387058 - Krita crashes when loading a .kra file with vector objects
Summary: Krita crashes when loading a .kra file with vector objects
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: Layers/Vector (show other bugs)
Version: git master (please specify the git hash!)
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-11-18 08:01 UTC by Dennis Fehr
Modified: 2018-10-29 02:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
PVD Logo. (1.01 MB, application/x-krita)
2017-11-18 17:45 UTC, Dennis Fehr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Fehr 2017-11-18 08:01:34 UTC
1) If you position with the center geometry (not the default top left), the vector objects won't be at the positions from when you saved it.. I always have to remove them every time I load the file..

2) Does not save the new gradient you use for the filters on a layer style (go into layer styles). In the inner glow color gradient always defaults to foreground to background gradient, and gradient style also defaults to foreground to background gradient.

3) Does not save/load the 'reverse' option in the gradient style area in the layer styles.
Comment 1 Halla Rempt 2017-11-18 15:39:52 UTC
Hi Dennis,

We have just rewritten most of the vector layer stuff code for Krita 4.0, which uses SVG instead of ODG to save the vector information. Could you check whether you can reproduce your issues with the latest development build (https://krita.org/en/item/4-0-development-update/)?
Comment 2 Dennis Fehr 2017-11-18 15:55:32 UTC
Sure. Tried 4.0.0-pre-alpha x86_64 AppImage and it crashed when loading. Ran it in the terminal, and it crashes with:

ASSERT (krita): "!d->gcStack.isEmpty()" in file /krita-4.0.0-prealpha.2/libs/flake/svg/SvgLoadingContext.cpp, line 289
Comment 3 Halla Rempt 2017-11-18 15:59:24 UTC
Hm.... That's interesting, so could you please attach the image to the bug report? Was this an image that was created with 3.0, or was this when loading the image you had created in 3.x?
Comment 4 Dennis Fehr 2017-11-18 17:45:33 UTC
Created attachment 108952 [details]
PVD Logo.

Sure, it's my company's logo.
Comment 5 Dennis Fehr 2017-11-18 17:59:29 UTC
Another quick note, I changed the geometry positions in the file to top left so it wouldn't keep moving on me. But you can check what happens when you use center positioning too (for the P and the D for example). Let me know if it helps with your bug testing.
Comment 6 Dennis Fehr 2017-11-19 12:12:52 UTC
Also, still doesn't keep the 'reverse' flag in the gradient layer area.. The rest seems to stick though so far? Only tested a bit on an empty file. I'll let you know when I can test a newer update where I can load my .kra
Comment 7 Dennis Fehr 2017-11-21 12:15:25 UTC
Oops I didn't see your other question there. I created it with 3.x
Comment 8 Halla Rempt 2017-11-26 14:50:31 UTC
Here's the backtracde for the crash:

Thread 1 (Thread 0x7f044eec3940 (LWP 3283)):
[KCrash Handler]
#6  0x00007f044375f8d7 in raise () at /lib64/libc.so.6
#7  0x00007f0443760caa in abort () at /lib64/libc.so.6
#8  0x00007f044440856e in  () at /usr/lib64/libQt5Core.so.5
#9  0x00007f044acf27cc in kis_assert_common(char const*, char const*, int, bool, bool) (assertion=assertion@entry=0x7f044c5c4d16 "!d->gcStack.isEmpty()", file=file@entry=0x7f044c5c4ba8 "/home/boud/dev/krita/libs/flake/svg/SvgLoadingContext.cpp", line=line@entry=289, throwException=throwException@entry=true, isIgnorable=isIgnorable@entry=false) at /home/boud/dev/krita/libs/global/kis_assert.cpp:90
#10 0x00007f044acf2b4d in kis_assert_exception(char const*, char const*, int) (assertion=assertion@entry=0x7f044c5c4d16 "!d->gcStack.isEmpty()", file=file@entry=0x7f044c5c4ba8 "/home/boud/dev/krita/libs/flake/svg/SvgLoadingContext.cpp", line=line@entry=289) at /home/boud/dev/krita/libs/global/kis_assert.cpp:113
#11 0x00007f044c5a9619 in SvgLoadingContext::isRootContext() const (this=this@entry=0x7fff11ea91a8) at /home/boud/dev/krita/libs/flake/svg/SvgLoadingContext.cpp:289
#12 0x00007f044c5962b8 in SvgParser::parseSvg(QDomElement const&, QSizeF*) (this=this@entry=0x7fff11ea9190, e=..., fragmentSize=fragmentSize@entry=0x0) at /home/boud/dev/krita/libs/flake/svg/SvgParser.cpp:1243
#13 0x00007f044c5af08b in SvgShapeFactory::createShapeFromOdf(QDomElement const&, KoShapeLoadingContext&) (this=<optimized out>, element=..., context=...) at /home/boud/dev/krita/libs/flake/svg/SvgShapeFactory.cpp:122
#14 0x00007f044c4df0e6 in KoShapeRegistry::Private::createShapeInternal(QDomElement const&, KoShapeLoadingContext&, QDomElement const&) const (this=<optimized out>, fullElement=..., context=..., element=...) at /home/boud/dev/krita/libs/flake/KoShapeRegistry.cpp:314
#15 0x00007f044c4e0885 in KoShapeRegistry::createShapeFromOdf(QDomElement const&, KoShapeLoadingContext&) const (this=0x7f044c81e180 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder>, e=..., context=...) at /home/boud/dev/krita/libs/flake/KoShapeRegistry.cpp:200
#16 0x00007f044e58848b in KisShapeLayer::loadLayer(KoStore*) (this=this@entry=0xad8e7c0, store=<optimized out>) at /home/boud/dev/krita/libs/ui/flake/kis_shape_layer.cc:581
#17 0x00007f03d0b239de in KisKraLoadVisitor::visit(KisExternalLayer*) (this=0x7fff11ea9bf0, layer=0xad8e7c0) at /home/boud/dev/krita/plugins/impex/libkra/kis_kra_load_visitor.cpp:139
#18 0x00007f044d44849d in KisNodeVisitor::visitAll(KisNode*, bool) (this=0x7fff11ea9bf0, node=0xad47d50, breakOnFail=false) at /home/boud/dev/krita/libs/image/kis_node_visitor.cpp:26
#19 0x00007f03d0b14e59 in KisKraLoader::loadBinaryData(KoStore*, KisSharedPtr<KisImage>, QString const&, bool) (this=0x960fb20, store=store@entry=0xad23210, image=..., uri=..., external=external@entry=true) at /home/boud/dev/krita/plugins/impex/libkra/kis_kra_loader.cpp:410
#20 0x00007f03d0d5231d in KraConverter::completeLoading(KoStore*) (this=this@entry=0x7fff11ea9dc0, store=0xad23210) at /home/boud/dev/krita/plugins/impex/kra/kra_converter.cpp:329
#21 0x00007f03d0d52b6a in KraConverter::buildImage(QIODevice*) (this=this@entry=0x7fff11ea9dc0, io=io@entry=0x7fff11ea9e50) at /home/boud/dev/krita/plugins/impex/kra/kra_converter.cpp:89
#22 0x00007f03d0d4f98b in KraImport::convert(KisDocument*, QIODevice*, KisPinnedSharedPtr<KisPropertiesConfiguration>) (this=<optimized out>, document=0xac81c50, io=0x7fff11ea9e50) at /home/boud/dev/krita/plugins/impex/kra/kra_import.cpp:43
#23 0x00007f044e7fe531 in KisImportExportManager::doImport(QString const&, QSharedPointer<KisImportExportFilter>) (this=this@entry=0x97fcfd0, location=..., filter=...) at /home/boud/dev/krita/libs/ui/KisImportExportManager.cpp:559
#24 0x00007f044e7ff4fe in KisImportExportManager::convert(KisImportExportManager::Direction, QString const&, QString const&, QString const&, bool, KisPinnedSharedPtr<KisPropertiesConfiguration>, bool) (this=0x97fcfd0, direction=direction@entry=KisImportExportManager::Import, location=..., realLocation=..., mimeType=..., showWarnings=showWarnings@entry=false, exportConfiguration=..., isAsync=isAsync@entry=false) at /home/boud/dev/krita/libs/ui/KisImportExportManager.cpp:354
#25 0x00007f044e7ffdc8 in KisImportExportManager::importDocument(QString const&, QString const&) (this=<optimized out>, location=..., mimeType=...) at /home/boud/dev/krita/libs/ui/KisImportExportManager.cpp:133
#26 0x00007f044e7e7ce3 in KisDocument::openFile() (this=this@entry=0xac81c50) at /home/boud/dev/krita/libs/ui/KisDocument.cpp:1111
#27 0x00007f044e7e8581 in KisDocument::openUrlInternal(QUrl const&) (this=this@entry=0xac81c50, url=...) at /home/boud/dev/krita/libs/ui/KisDocument.cpp:1492
#28 0x00007f044e7e8804 in KisDocument::openUrl(QUrl const&, QFlags<KisDocument::OpenFlag>) (this=0xac81c50, _url=..., flags=...) at /home/boud/dev/krita/libs/ui/KisDocument.cpp:1010
#29 0x00007f044e808405 in KisMainWindow::openDocumentInternal(QUrl const&, QFlags<KisMainWindow::OpenFlag>) (this=this@entry=0x91ecd70, url=..., flags=..., flags@entry=...) at /home/boud/dev/krita/libs/ui/KisMainWindow.cpp:845
#30 0x00007f044e80e926 in KisMainWindow::openDocument(QUrl const&, QFlags<KisMainWindow::OpenFlag>) (this=0x91ecd70, url=..., flags=flags@entry=...) at /home/boud/dev/krita/libs/ui/KisMainWindow.cpp:820
#31 0x00007f044e7dc149 in KisApplication::start(KisApplicationArguments const&) (this=this@entry=0x7fff11eaae00, args=...) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:529
#32 0x000000000040558e in main(int, char**) (argc=2, argv=<optimized out>) at /home/boud/dev/krita/krita/main.cc:290
Comment 9 Dmitry Kazakov 2018-02-24 11:07:23 UTC
The crash is fixed now after the UnavailShape removal. The other bugs are possibly actual.
Comment 10 Dmitry Kazakov 2018-02-26 09:43:30 UTC
Git commit da42207ee8b61fc3b1e1223d7957c0f503c1e4ae by Dmitry Kazakov.
Committed on 26/02/2018 at 09:43.
Pushed by dkazakov into branch 'master'.

Fix several problems with loading layer style gradients

1) Resource server should not return resources by empty md5 sum,
   Just return nothing, otherwise all memory-based gradients will
   be defaulted to Fg-to-Bg gradient

2) KisDlgLayerStyle should not allow recursive double entry to
   KisDlgLayerStyle::setStyle() via cycling signals.

M  +9    -3    libs/ui/dialogs/kis_dlg_layer_style.cpp
M  +19   -5    libs/widgets/KoResourceServer.h

https://commits.kde.org/krita/da42207ee8b61fc3b1e1223d7957c0f503c1e4ae
Comment 11 Dmitry Kazakov 2018-02-26 09:51:57 UTC
Hi, Dennis!

I have fixed 2) and 3) points of your report. Could you please check if the 1) point is still actual with the recent builds of Krita?
Comment 12 Andrew Crouthamel 2018-09-28 03:41:12 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 Andrew Crouthamel 2018-10-29 02:01:05 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!