Bug 285739 - memcheck errors in soprano when saving a document that contains rdf data
Summary: memcheck errors in soprano when saving a document that contains rdf data
Status: RESOLVED UNMAINTAINED
Alias: None
Product: calligracommon
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Calligra Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-04 10:34 UTC by Halla Rempt
Modified: 2019-05-13 08:37 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Halla Rempt 2011-11-04 10:34:17 UTC
Version:           unspecified
OS:                Linux

Try to run words and add any semantic item. Saving gives the following error:

==12408== Mismatched free() / delete / delete []
==12408==    at 0x4C2599C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12408==    by 0x2E9E0114: ??? (in /usr/lib64/soprano/libsoprano_raptorserializer.so)
==12408==    by 0x5139483: KoDocumentRdf::saveRdf(KoStore*, KoXmlWriter*, Soprano::Node const&) const (KoDocumentRdf.cpp:344)
==12408==    by 0x5139CFB: KoDocumentRdf::saveOasis(KoStore*, KoXmlWriter*) (KoDocumentRdf.cpp:371)
==12408==    by 0x50BD150: KoDocument::saveNativeFormatODF(KoStore*, QByteArray const&) (KoDocument.cpp:913)
==12408==    by 0x50BDBED: KoDocument::saveNativeFormat(QString const&) (KoDocument.cpp:868)
==12408==    by 0x50B4BE8: KoDocument::saveFile() (KoDocument.cpp:536)
==12408==    by 0x72FF21F: KParts::ReadWritePart::save() (in /usr/lib64/libkparts.so.4.6.0)
==12408==    by 0x72FE660: KParts::ReadWritePart::saveAs(KUrl const&) (in /usr/lib64/libkparts.so.4.6.0)
==12408==    by 0x50E15C7: KoMainWindow::saveDocument(bool, bool) (KoMainWindow.cpp:933)
==12408==    by 0x50D7A20: KoMainWindow::slotFileSave() (KoMainWindow.cpp:1203)
==12408==    by 0x50DF793: KoMainWindow::qt_metacall(QMetaObject::Call, int, void**) (KoMainWindow.moc:142)
==12408==  Address 0x287d6fd0 is 0 bytes inside a block of size 21 alloc'd
==12408==    at 0x4C25D99: operator new[](unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12408==    by 0xA420286: qstrdup(char const*) (qbytearray.cpp:113)
==12408==    by 0x2E9DF264: ??? (in /usr/lib64/soprano/libsoprano_raptorserializer.so)
==12408==    by 0x2E9E01B6: ??? (in /usr/lib64/soprano/libsoprano_raptorserializer.so)
==12408==    by 0x5139483: KoDocumentRdf::saveRdf(KoStore*, KoXmlWriter*, Soprano::Node const&) const (KoDocumentRdf.cpp:344)
==12408==    by 0x5139CFB: KoDocumentRdf::saveOasis(KoStore*, KoXmlWriter*) (KoDocumentRdf.cpp:371)
==12408==    by 0x50BD150: KoDocument::saveNativeFormatODF(KoStore*, QByteArray const&) (KoDocument.cpp:913)
==12408==    by 0x50BDBED: KoDocument::saveNativeFormat(QString const&) (KoDocument.cpp:868)
==12408==    by 0x50B4BE8: KoDocument::saveFile() (KoDocument.cpp:536)
==12408==    by 0x72FF21F: KParts::ReadWritePart::save() (in /usr/lib64/libkparts.so.4.6.0)
==12408==    by 0x72FE660: KParts::ReadWritePart::saveAs(KUrl const&) (in /usr/lib64/libkparts.so.4.6.0)
==12408==    by 0x50E15C7: KoMainWindow::saveDocument(bool, bool) (KoMainWindow.cpp:933)
==12408== 
==12408== Mismatched free() / delete / delete []
==12408==    at 0x4C2599C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12408==    by 0x2E9E013A: ??? (in /usr/lib64/soprano/libsoprano_raptorserializer.so)
==12408==    by 0x5139483: KoDocumentRdf::saveRdf(KoStore*, KoXmlWriter*, Soprano::Node const&) const (KoDocumentRdf.cpp:344)
==12408==    by 0x5139CFB: KoDocumentRdf::saveOasis(KoStore*, KoXmlWriter*) (KoDocumentRdf.cpp:371)
==12408==    by 0x50BD150: KoDocument::saveNativeFormatODF(KoStore*, QByteArray const&) (KoDocument.cpp:913)
==12408==    by 0x50BDBED: KoDocument::saveNativeFormat(QString const&) (KoDocument.cpp:868)
==12408==    by 0x50B4BE8: KoDocument::saveFile() (KoDocument.cpp:536)
==12408==    by 0x72FF21F: KParts::ReadWritePart::save() (in /usr/lib64/libkparts.so.4.6.0)
==12408==    by 0x72FE660: KParts::ReadWritePart::saveAs(KUrl const&) (in /usr/lib64/libkparts.so.4.6.0)
==12408==    by 0x50E15C7: KoMainWindow::saveDocument(bool, bool) (KoMainWindow.cpp:933)
==12408==    by 0x50D7A20: KoMainWindow::slotFileSave() (KoMainWindow.cpp:1203)
==12408==    by 0x50DF793: KoMainWindow::qt_metacall(QMetaObject::Call, int, void**) (KoMainWindow.moc:142)
==12408==  Address 0x2a95b7d0 is 0 bytes inside a block of size 21 alloc'd
==12408==    at 0x4C25D99: operator new[](unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12408==    by 0xA420286: qstrdup(char const*) (qbytearray.cpp:113)
==12408==    by 0x2E9DF264: ??? (in /usr/lib64/soprano/libsoprano_raptorserializer.so)
==12408==    by 0x2E9E0209: ??? (in /usr/lib64/soprano/libsoprano_raptorserializer.so)
==12408==    by 0x5139483: KoDocumentRdf::saveRdf(KoStore*, KoXmlWriter*, Soprano::Node const&) const (KoDocumentRdf.cpp:344)
==12408==    by 0x5139CFB: KoDocumentRdf::saveOasis(KoStore*, KoXmlWriter*) (KoDocumentRdf.cpp:371)
==12408==    by 0x50BD150: KoDocument::saveNativeFormatODF(KoStore*, QByteArray const&) (KoDocument.cpp:913)
==12408==    by 0x50BDBED: KoDocument::saveNativeFormat(QString const&) (KoDocument.cpp:868)
==12408==    by 0x50B4BE8: KoDocument::saveFile() (KoDocument.cpp:536)
==12408==    by 0x72FF21F: KParts::ReadWritePart::save() (in /usr/lib64/libkparts.so.4.6.0)
==12408==    by 0x72FE660: KParts::ReadWritePart::saveAs(KUrl const&) (in /usr/lib64/libkparts.so.4.6.0)
==12408==    by 0x50E15C7: KoMainWindow::saveDocument(bool, bool) (KoMainWindow.cpp:933)


Reproducible: Always

Steps to Reproduce:
starts words, insert semantic item and save.

Actual Results:  
No memcheck errors

Expected Results:  
Are we using soprano the right way, or is this a problem in raptor?
Comment 1 Ben Martin 2012-06-26 03:22:09 UTC
I have made some cleanups to git from yesterday, not pushed yet. Running the below
valgrind --tool=memcheck ./calligrawords 
and creating a blank doc, inserting "fred" as a contact, and saving to /tmp/something then closing calligrawords does not show the above error in the log for me. But this is tested after my cleanups.

FWIW using soprano-2.7.4-1.fc16.x86_64
Comment 2 Halla Rempt 2019-05-13 08:37:38 UTC
I'm no longer able to test any fixes to these bugs, if there would be a fix forthcoming.