Bug 345312 - Krita does not show an imported ".odg" file created with Inkscape 0.91 correctly
Summary: Krita does not show an imported ".odg" file created with Inkscape 0.91 correctly
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 2.9
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-18 18:44 UTC by mvowada
Modified: 2018-02-01 12:57 UTC (History)
1 user (show)

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


Attachments
Krita crash by making a "File Layer" from ".odg" files that have been created with Inkscape 0.91 (gdb report) - GDB REPORT (30.22 KB, text/plain)
2015-03-18 18:45 UTC, mvowada
Details
small test odg file from inkscape (4.73 KB, application/vnd.oasis.opendocument.graphics)
2015-03-19 12:11 UTC, Halla Rempt
Details
small test odg file "bla2.odg" from inkscape (3.86 KB, application/vnd.oasis.opendocument.graphics)
2015-03-19 13:00 UTC, mvowada
Details
Attachments: "ink.odg", "krb.odg" (Two ODG files created with Inkscape and Karbon for testing) (38.73 KB, application/zip)
2015-11-02 09:15 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mvowada 2015-03-18 18:44:37 UTC
When I try to create a "File Layer" from an .odg file generated by Inkscape 0.91, I get a crash of Krita. 
No problems creating a "File Layer" from the same .odg file, if it has been re-saved with Karbon before. 
Please, see also the gdb report in attachment in the below comment. Thank you.

- Krita: 2.9.1 (git cd8f08b)
- Karbon: 2.9.1
- Inkscape 0.91 r (Feb 12 2015)

Reproducible: Always

Steps to Reproduce:
1. create an .odg file with Inkscape version 0.91
2. start Krita and create a new "File Layer" from the .odg file generated with Inkscape 0.91.

Actual Results:  
Krita crash.

Expected Results:  
Krita should not crash + a new "File Layer" should be made from .odg files saved with Inkscape 0.91.
Comment 1 mvowada 2015-03-18 18:45:17 UTC
Created attachment 91624 [details]
Krita crash by making a "File Layer" from ".odg" files that have been created with Inkscape 0.91 (gdb report) - GDB REPORT
Comment 2 Halla Rempt 2015-03-19 12:11:04 UTC
Interesting, Karbon doesn't crash on a sample odg file, but it doesn't load it correctly either. It seems that the inkscape odg is missing something. After opening and resaving in lodraw, it's fine in karbon, but the result is empty in Krita.
Comment 3 Halla Rempt 2015-03-19 12:11:28 UTC
Created attachment 91632 [details]
small test odg file from inkscape
Comment 4 mvowada 2015-03-19 13:00:28 UTC
Created attachment 91638 [details]
small test odg file "bla2.odg" from inkscape

"Karbon doesn't crash on a sample odg file, but it doesn't load it correctly either."

Thank you for investigating. Well, not always in my experience. Actually:
- Karbon opens "bla.odg" from Inkscape 0.91, but it doesn't display its content.
- Karbon opens "bla2.odg" from Inkscape 0.91 and it displays its content.
Comment 5 Halla Rempt 2015-03-24 19:20:49 UTC
Thread 1 (Thread 0x7f3a246fe7c0 (LWP 10080)):
[KCrash Handler]
#5  0x00007f3a209b0143 in KoXmlNode::namedItemNS(QString const&, QString const&) const (this=this@entry=0x0, nsURI=..., name=...) at /home/boud/kde/src/2.9/libs/odf/KoXmlReader.cpp:2182
#6  0x00007f3a209b01f1 in KoXml::namedItemNS(KoXmlNode const&, QString const&, QString const&) (node=..., nsURI=..., localName=...) at /home/boud/kde/src/2.9/libs/odf/KoXmlReader.cpp:2733
#7  0x00007f3a209a10f1 in KoPageLayout::loadOdf(KoXmlElement const&) (this=this@entry=0x7fff499314c0, style=...) at /home/boud/kde/src/2.9/libs/odf/KoPageLayout.cpp:74
#8  0x00007f39e2edb811 in KisODGImport::convert(QByteArray const&, QByteArray const&) (this=<optimized out>, from=..., to=...) at /home/boud/kde/src/2.9/krita/plugins/formats/odg/kis_odg_import.cc:123
#9  0x00007f3a23fe5c9f in CalligraFilter::ChainLink::invokeFilter(CalligraFilter::ChainLink const*) (this=0x36824e0, parentChainLink=<optimized out>) at /home/boud/kde/src/2.9/krita/ui/KisFilterChainLink.cpp:90
#10 0x00007f3a23fe48e2 in KisFilterChain::invokeChain() (this=0x33b3fd0) at /home/boud/kde/src/2.9/krita/ui/KisFilterChain.cpp:95
#11 0x00007f3a23ff3c6d in KisImportExportManager::importDocument(QString const&, QString const&, KisImportExportFilter::ConversionStatus&) (this=0x3541f00, url=..., documentMimeType=..., status=@0x7fff499319f0: 54439728) at /home/boud/kde/src/2.9/krita/ui/KisImportExportManager.cpp:169
#12 0x00007f3a23fcea63 in KisDocument::openFile() (this=0x39e8b10) at /home/boud/kde/src/2.9/krita/ui/KisDocument.cpp:1328
#13 0x00007f3a23fd5a9a in KisDocument::Private::openLocalFile() (this=0x39e6bf0) at /home/boud/kde/src/2.9/krita/ui/KisDocument.cpp:380
#14 0x00007f3a23fd5a9a in KisDocument::Private::openLocalFile() (this=0x39e6bf0) at /home/boud/kde/src/2.9/krita/ui/KisDocument.cpp:402
#15 0x00007f3a23fd3054 in KisDocument::openUrlInternal(KUrl const&) (this=this@entry=0x39e8b10, url=...) at /home/boud/kde/src/2.9/krita/ui/KisDocument.cpp:2425
#16 0x00007f3a23fd3278 in KisDocument::openUrl(KUrl const&) (this=0x39e8b10, _url=...) at /home/boud/kde/src/2.9/krita/ui/KisDocument.cpp:1232
#17 0x00007f3a23ffc36b in KisMainWindow::openDocumentInternal(KUrl const&, KisDocument*) (this=this@entry=0x2fb7390, url=..., newdoc=0x39e8b10) at /home/boud/kde/src/2.9/krita/ui/KisMainWindow.cpp:672
#18 0x00007f3a23fbb63a in KisApplication::start() (this=this@entry=0x7fff49932700) at /home/boud/kde/src/2.9/krita/ui/KisApplication.cpp:404
#19 0x0000000000402a00 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/boud/kde/src/2.9/krita/main.cc:167
Comment 6 Halla Rempt 2015-10-30 06:43:04 UTC
Git commit 07691776d34f19b4f7e58fc2b8f92841d07a914e by Boudewijn Rempt.
Committed on 30/10/2015 at 06:42.
Pushed by rempt into branch 'master'.

However, the result is empty.

M  +6    -4    krita/plugins/formats/odg/kis_odg_import.cc

http://commits.kde.org/krita/07691776d34f19b4f7e58fc2b8f92841d07a914e
Comment 7 Halla Rempt 2015-10-30 06:51:34 UTC
Git commit ca15d3d83511a1cbaba9b6ae714dd797953fa54a by Boudewijn Rempt.
Committed on 30/10/2015 at 06:37.
Pushed by rempt into branch 'calligra/2.9'.

However, the result is empty.

M  +6    -4    krita/plugins/formats/odg/kis_odg_import.cc

http://commits.kde.org/calligra/ca15d3d83511a1cbaba9b6ae714dd797953fa54a
Comment 8 Halla Rempt 2015-10-30 07:03:32 UTC
Hum, my inkscape 0.91 refuses to load both test files!

boud@boud-XPS-12-9Q33:~/kde/src/calligra$ inkscape ~/Downloads/bla2.odg 
/home/boud/Downloads/bla2.odg:1: parser error : Start tag expected, '<' not found
PK
Comment 9 mvowada 2015-11-02 09:15:41 UTC
Created attachment 95251 [details]
Attachments: "ink.odg", "krb.odg" (Two ODG files created with Inkscape and Karbon for testing)

Hello Boudewijn, here:

    - Inkscape refuses to open Karbon's *.ODG files (error).
    - Karbon regularly opens Inkscape's *.ODG files (zoom-out if you can't see the content).
Comment 10 Halla Rempt 2015-11-02 12:08:01 UTC
Could it be a scaling issue for krita's loading of odg as well, now that krita no longer crashes?
Comment 11 mvowada 2015-11-05 15:30:05 UTC
(In reply to Boudewijn Rempt from comment #10)
> Could it be a scaling issue for krita's loading of odg as well, now that
> krita no longer crashes?

Hi Boudewijn, thank you.
I'm glad to hear that Krita no longer crashes with the latest version.
Currently I'm on Krita: 2.9.6 (git edd766e). I've checked but since it crashes there for me, when creating a file layer from a native Inkscape 0.91 *.ODG file, I can't say if it's a scaling issue at the moment. Hope to be able soon.
Comment 12 Halla Rempt 2015-11-05 15:33:52 UTC
Hm, a file layer -- I test opening the odg.
Comment 13 Halla Rempt 2018-02-01 12:57:02 UTC
Git commit 7eea86fbe96c56da5e6dfe2458de8aa59fb4a5f1 by Boudewijn Rempt.
Committed on 01/02/2018 at 12:53.
Pushed by rempt into branch 'master'.

Remove the ODG import filter

With Krita 4, ODG support is deprecated. We don't want to load ODG
directly into flake anymore.

M  +0    -1    plugins/impex/CMakeLists.txt
D  +0    -15   plugins/impex/odg/CMakeLists.txt
D  +0    -145  plugins/impex/odg/kis_odg_import.cc
D  +0    -36   plugins/impex/odg/kis_odg_import.h
D  +0    -70   plugins/impex/odg/krita_odg.desktop
D  +0    -13   plugins/impex/odg/krita_odg_import.json

https://commits.kde.org/krita/7eea86fbe96c56da5e6dfe2458de8aa59fb4a5f1