Summary: | Crash after editing a plural | ||
---|---|---|---|
Product: | [Applications] lokalize | Reporter: | Freek de Kruijf <freekdekruijf> |
Component: | general | Assignee: | Simon Depiets <sdepiets> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | aacid, jazeix, pjfloyd, schwarzer, shafff |
Priority: | NOR | Keywords: | drkonqi |
Version First Reported In: | 23.04.2 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Content of output1.txt
output of valgrind --error-limit=no lokalize --project vertalingen/KF5trunk.lokalize > output.txt 2>&1 3>&1 output of QT_LOGGING_RULES="org.kde.lokalize=true" lokalize --project vertalingen/KF5trunk.lokalize > output.txt 2>&1 3>&1 |
Description
Freek de Kruijf
2023-06-30 18:48:42 UTC
I can't reproduce the crash at all :/ Can you run lokalize via valgrind? in a terminal lokalize valgrind And then do the same that makes it crash and attach the output of lokalize even if it doesn't crash (be patient, valgrind makes everything slower) (In reply to Albert Astals Cid from comment #1) > I can't reproduce the crash at all :/ > > Can you run lokalize via valgrind? > > in a terminal > > lokalize valgrind > > And then do the same that makes it crash and attach the output of lokalize > even if it doesn't crash (be patient, valgrind makes everything slower) Below is the output k@eiktum:~> lokalize --project vertalingen/KF5trunk.lokalize valgrind org.kde.lokalize: db "default140584906626752" opened 2 "nl" org.kde.lokalize: db "kde4-nl140584906626752" opened 10 "nl" QStatusBar::insertWidget: Index out of range (5), appending widget org.kde.lokalize: db "GNU140584906626752" opened 0 "nl" org.kde.lokalize: db "en_US-en140584906626752" opened 0 "en" org.kde.lokalize: "/reserv/k/vertalingen/messages/tokodon/tokodon.po" has different number of entries org.kde.lokalize: indexed "/home/freek/vertalingen/svn/trunkkf5/nl/messages/tokodon/tokodon.po" for word completion in 0 msecs KCrash: Application 'lokalize' crashing... KCrash: Attempting to start /usr/libexec/drkonqi [1]+ Gepauzeerd lokalize --project vertalingen/KF5trunk.lokalize valgrind k@eiktum:~> Unable to find file for pid 5459 expected at "kcrash-metadata/5459.ini" QSocketNotifier: Invalid socket 5 and type 'Read', disabling... Unable to start Dr. Konqi Re-raising signal for core dump handling. [1]+ Segmentatiefout (geheugendump gemaakt) lokalize --project vertalingen/KF5trunk.lokalize valgrind k@eiktum:~> sorry i wrote it the other way around valgrind lokalize and attach the output of that (In reply to Albert Astals Cid from comment #3) > sorry i wrote it the other way around > > valgrind lokalize > > and attach the output of that There was quite a lot before the data below, but only at the beginning, which was not saved, it was different from what seems to be repeated many many times. If needed I can try to repeat and store the output using " > output.txt 2>&1 3>&1" after the command. ==4308== Conditional jump or move depends on uninitialised value(s) ==4308== at 0x1DC8B3BB: ??? ==4308== by 0x1E7A6577: ??? ==4308== ==4308== Conditional jump or move depends on uninitialised value(s) ==4308== at 0x1DC8ECBB: ??? ==4308== by 0x23500BD7: ??? ==4308== ==4308== Conditional jump or move depends on uninitialised value(s) ==4308== at 0x1DC8DF63: ??? ==4308== by 0x23500BD7: ??? ==4308== ==4308== Conditional jump or move depends on uninitialised value(s) ==4308== at 0x1DC8D163: ??? ==4308== by 0x23500BD7: ??? ==4308== ==4308== Conditional jump or move depends on uninitialised value(s) ==4308== at 0x1DC8C343: ??? ==4308== by 0x23500BD7: ??? ==4308== ==4308== Conditional jump or move depends on uninitialised value(s) ==4308== at 0x1DC8B3BB: ??? ==4308== by 0x23500BD7: ??? ==4308== ==4308== Conditional jump or move depends on uninitialised value(s) ==4308== at 0x1DC8DF63: ??? ==4308== by 0x1E6EC3B7: ??? ==4308== ==4308== Conditional jump or move depends on uninitialised value(s) ==4308== at 0x1DC8D163: ??? ==4308== by 0x1E6EC3B7: ??? ==4308== ==4308== Conditional jump or move depends on uninitialised value(s) ==4308== at 0x1DC8C343: ??? ==4308== by 0x1E6EC3B7: ??? ==4308== ==4308== Conditional jump or move depends on uninitialised value(s) ==4308== at 0x1DC8B3BB: ??? ==4308== by 0x1E6EC3B7: ??? ==4308== ==4308== Conditional jump or move depends on uninitialised value(s) ==4308== at 0x1DC8DF63: ??? ==4308== by 0xD5CE577: ??? ==4308== ==4308== ==4308== More than 1000 different errors detected. I'm not reporting any more. ==4308== Final error counts will be inaccurate. Go fix your program! ==4308== Rerun with --error-limit=no to disable this cutoff. Note ==4308== that errors may occur in your program without prior warning from ==4308== Valgrind, because errors are no longer being displayed. ==4308== org.kde.lokalize: db "en_US-en453916352" opened 7 "en" org.kde.lokalize: db "GNU453916352" opened 6 "nl" org.kde.lokalize: db "standaard453916352" opened 5 "nl_NL" org.kde.lokalize: "/reserv/k/vertalingen/messages/tokodon/tokodon.po" has different number of entries org.kde.lokalize: indexed "/home/k/vertalingen/svn/trunkkf5/nl/messages/tokodon/tokodon.po" for word completion in 36 msecs org.kde.lokalize: db "kde4-nl453916352" opened 0 "nl" KCrash: Application 'lokalize' crashing... KCrash: Attempting to start /usr/libexec/drkonqi [1]+ Gepauzeerd valgrind lokalize --project vertalingen/KF5trunk.lokalize Unable to find file for pid 4308 expected at "kcrash-metadata/4308.ini" QSocketNotifier: Invalid socket 5 and type 'Read', disabling... Unable to start Dr. Konqi Re-raising signal for core dump handling. ==4308== ==4308== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==4308== at 0x6D64A7C: __pthread_kill_implementation (in /usr/lib64/libc.so.6) ==4308== by 0x6D13225: raise (in /usr/lib64/libc.so.6) ==4308== by 0x5AEAD39: KCrash::defaultCrashHandler(int) (in /usr/lib64/libKF5Crash.so.5.107.0) ==4308== by 0x6D132EF: ??? (in /usr/lib64/libc.so.6) ==4308== by 0x491043FFF: ??? ==4308== by 0x660D458: QMetaObject::cast(QObject const*) const (qmetaobject.cpp:389) ==4308== by 0x6635E1C: qt_qFindChildren_helper(QObject const*, QString const&, QMetaObject const&, QList<void*>*, QFlags<Qt::FindChildOption>) (qobject.cpp:2034) ==4308== by 0x5067365: ??? (in /usr/lib64/libKF5WidgetsAddons.so.5.107.0) ==4308== by 0x5066FBC: ??? (in /usr/lib64/libKF5WidgetsAddons.so.5.107.0) ==4308== by 0x5067429: ??? (in /usr/lib64/libKF5WidgetsAddons.so.5.107.0) ==4308== by 0x5066FBC: ??? (in /usr/lib64/libKF5WidgetsAddons.so.5.107.0) ==4308== by 0x5067429: ??? (in /usr/lib64/libKF5WidgetsAddons.so.5.107.0) ==4308== ==4308== HEAP SUMMARY: ==4308== in use at exit: 55,241,533 bytes in 809,531 blocks ==4308== total heap usage: 25,255,525 allocs, 24,445,994 frees, 6,770,480,430 bytes allocated ==4308== ==4308== LEAK SUMMARY: ==4308== definitely lost: 4,864 bytes in 19 blocks ==4308== indirectly lost: 1,053 bytes in 38 blocks ==4308== possibly lost: 2,201,786 bytes in 1,761 blocks ==4308== still reachable: 53,033,734 bytes in 807,710 blocks ==4308== of which reachable via heuristic: ==4308== newarray : 6,288 bytes in 52 blocks ==4308== multipleinheritance: 332,656 bytes in 409 blocks ==4308== suppressed: 96 bytes in 3 blocks ==4308== Rerun with --leak-check=full to see details of leaked memory ==4308== ==4308== Use --track-origins=yes to see where uninitialised values come from ==4308== For lists of detected and suppressed errors, rerun with: -s ==4308== ERROR SUMMARY: 1002 errors from 1000 contexts (suppressed: 0 from 0) [1]+ Segmentatiefout (geheugendump gemaakt) valgrind lokalize --project vertalingen/KF5trunk.lokalize k@eiktum:~> (In reply to Albert Astals Cid from comment #3) > sorry i wrote it the other way around > > valgrind lokalize > > and attach the output of that Did the following command: valgrind --leak-check=full lokalize --project vertalingen/KF5trunk.lokalize > output1.txt 2>&1 3>&1 See attached file output1.txt Created attachment 160106 [details]
Content of output1.txt
ha, valgrind got tired of reporting before you made it crash, please add --error-limit=no to the command line, you can also remove --leak-check=full, leaks are not something we're particularly interested for now. (In reply to Albert Astals Cid from comment #7) > ha, valgrind got tired of reporting before you made it crash, please add > --error-limit=no to the command line, you can also remove --leak-check=full, > leaks are not something we're particularly interested for now. See attachment. Created attachment 160119 [details]
output of valgrind --error-limit=no lokalize --project vertalingen/KF5trunk.lokalize > output.txt 2>&1 3>&1
That does indeed contain some interesting information ==10340== Invalid read of size 8 ==10340== at 0x649CF2C: UnknownInlinedFun (qbasicatomic.h:118) ==10340== by 0x649CF2C: UnknownInlinedFun (qrefcount.h:61) ==10340== by 0x649CF2C: QString::operator=(QString const&) (qstring.cpp:2403) ==10340== by 0x1C0CE1: MergeCatalog::copyFromBaseCatalog(DocPosition const&, int) (mergecatalog.cpp:53) ==10340== by 0x663C7A1: UnknownInlinedFun (qobjectdefs_impl.h:398) ==10340== by 0x663C7A1: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3925) ==10340== by 0x221507: UnknownInlinedFun (moc_catalog.cpp:714) ==10340== by 0x221507: Catalog::targetInsert(DocPosition const&, QString const&) (catalog.cpp:838) ==10340== by 0x217F12: LokalizeUnitCmd::redo() (cmd.cpp:41) ==10340== by 0x217F9C: LokalizeTargetCmd::redo() (cmd.cpp:68) ==10340== by 0x5881074: QUndoStack::push(QUndoCommand*) (qundostack.cpp:639) ==10340== by 0x1A1018: TranslationUnitTextEdit::contentsChanged(int, int, int) (xlifftextedit.cpp:493) ==10340== by 0x663C7A1: UnknownInlinedFun (qobjectdefs_impl.h:398) ==10340== by 0x663C7A1: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3925) ==10340== by 0x5D8D052: QTextDocument::contentsChange(int, int, int) (in /usr/lib64/libQt5Gui.so.5.15.10) ==10340== by 0x5DA483A: QTextDocumentPrivate::finishEdit() (in /usr/lib64/libQt5Gui.so.5.15.10) ==10340== by 0x5DDBFF7: QTextCursor::insertText(QString const&, QTextCharFormat const&) (in /usr/lib64/libQt5Gui.so.5.15.10) ==10340== Address 0x1ea10ce0 is 0 bytes after a block of size 32 alloc'd ==10340== at 0x4843794: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==10340== by 0x6425C21: QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) (qarraydata.cpp:218) ==10340== by 0x16DED5: UnknownInlinedFun (qarraydata.h:225) ==10340== by 0x16DED5: QVector<QString>::realloc(int, QFlags<QArrayData::AllocationOption>) (qvector.h:699) ==10340== by 0x2296F0: UnknownInlinedFun (qvector.h:414) ==10340== by 0x2296F0: UnknownInlinedFun (qcontainertools_impl.h:83) ==10340== by 0x2296F0: UnknownInlinedFun (qvector.h:571) ==10340== by 0x2296F0: QList<QString>::toVector() const (qlist.h:1132) ==10340== by 0x22EE48: UnknownInlinedFun (catalogitem.cpp:118) ==10340== by 0x22EE48: GettextCatalog::GettextImportPlugin::load(QIODevice*) (gettextimport.cpp:157) ==10340== by 0x228126: UnknownInlinedFun (importplugin.cpp:85) ==10340== by 0x228126: GettextCatalog::GettextStorage::load(QIODevice*) (gettextstorage.cpp:56) ==10340== by 0x21F645: Catalog::loadFromUrl(QString const&, QString const&, int*, bool) (catalog.cpp:563) ==10340== by 0x1C4F00: MergeCatalog::loadFromUrl(QString const&, QString const&) (mergecatalog.cpp:154) ==10340== by 0x1CCE06: MergeView::mergeOpen(QString) (mergeview.cpp:214) ==10340== by 0x19992E: UnknownInlinedFun (qobjectdefs_impl.h:152) ==10340== by 0x19992E: UnknownInlinedFun (qobjectdefs_impl.h:185) ==10340== by 0x19992E: QtPrivate::QSlotObject<void (MergeView::*)(QString), QtPrivate::List<QString const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (qobjectdefs_impl.h:418) ==10340== by 0x66302AF: QObject::event(QEvent*) (qobject.cpp:1347) ==10340== by 0x54E119D: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3640) ==10340== ==10340== Invalid read of size 4 ==10340== at 0x649CEEC: UnknownInlinedFun (atomic_base.h:505) ==10340== by 0x649CEEC: UnknownInlinedFun (qatomic_cxx11.h:239) ==10340== by 0x649CEEC: UnknownInlinedFun (qbasicatomic.h:107) ==10340== by 0x649CEEC: UnknownInlinedFun (qrefcount.h:66) ==10340== by 0x649CEEC: QString::operator=(QString const&) (qstring.cpp:2404) ==10340== by 0x1C0CE1: MergeCatalog::copyFromBaseCatalog(DocPosition const&, int) (mergecatalog.cpp:53) ==10340== by 0x663C7A1: UnknownInlinedFun (qobjectdefs_impl.h:398) ==10340== by 0x663C7A1: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3925) ==10340== by 0x221507: UnknownInlinedFun (moc_catalog.cpp:714) ==10340== by 0x221507: Catalog::targetInsert(DocPosition const&, QString const&) (catalog.cpp:838) ==10340== by 0x217F12: LokalizeUnitCmd::redo() (cmd.cpp:41) ==10340== by 0x217F9C: LokalizeTargetCmd::redo() (cmd.cpp:68) ==10340== by 0x5881074: QUndoStack::push(QUndoCommand*) (qundostack.cpp:639) ==10340== by 0x1A1018: TranslationUnitTextEdit::contentsChanged(int, int, int) (xlifftextedit.cpp:493) ==10340== by 0x663C7A1: UnknownInlinedFun (qobjectdefs_impl.h:398) ==10340== by 0x663C7A1: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3925) ==10340== by 0x5D8D052: QTextDocument::contentsChange(int, int, int) (in /usr/lib64/libQt5Gui.so.5.15.10) ==10340== by 0x5DA483A: QTextDocumentPrivate::finishEdit() (in /usr/lib64/libQt5Gui.so.5.15.10) ==10340== by 0x5DDBFF7: QTextCursor::insertText(QString const&, QTextCharFormat const&) (in /usr/lib64/libQt5Gui.so.5.15.10) ==10340== Address 0x0 is not stack'd, malloc'd or (recently) free'd Johnny, Frederik, would you be able to see if you can reproduce this crash or fix it from the valgrind trace? I cannot reproduce this with either master or v23.04.2 with the same versions of Qt and KF and kernel 6.3.11. After a quick tired glance at the valgrind output, I am wondering: - Why is xlifftextedit.cpp used when doing PO file stuff? - Is "Address 0x0 is not stack'd, malloc'd or (recently) free'd" a null pointer deref? At address 0x0? Will take a closer look the next few days if noone else steps up. (In reply to Freek de Kruijf from comment #9) > Created attachment 160119 [details] > output of valgrind --error-limit=no lokalize --project > vertalingen/KF5trunk.lokalize > output.txt 2>&1 3>&1 Can you please also give the output of: QT_LOGGING_RULES="org.kde.lokalize=true" lokalize? Maybe there are info that could help here too (In reply to Jazeix Johnny from comment #13) > (In reply to Freek de Kruijf from comment #9) > > Created attachment 160119 [details] > > output of valgrind --error-limit=no lokalize --project > > vertalingen/KF5trunk.lokalize > output.txt 2>&1 3>&1 > > Can you please also give the output of: > QT_LOGGING_RULES="org.kde.lokalize=true" lokalize? > Maybe there are info that could help here too See attachment. The element with the plural I tried to fix is 373. Should do a new scan on this file for the translation memory? Is this out of sync? Created attachment 160279 [details]
output of QT_LOGGING_RULES="org.kde.lokalize=true" lokalize --project vertalingen/KF5trunk.lokalize > output.txt 2>&1 3>&1
(In reply to Frederik Schwarzer from comment #12) > I cannot reproduce this with either master or v23.04.2 with the same > versions of Qt and KF and kernel 6.3.11. > > After a quick tired glance at the valgrind output, I am wondering: > - Why is xlifftextedit.cpp used when doing PO file stuff? the name of the file is "wrong", it's holding the TranslationUnitTextEdit class that is used for editing all the file formats as I understand > - Is "Address 0x0 is not stack'd, malloc'd or (recently) free'd" a null > pointer deref? At address 0x0? Yes, that usually means a null pointer access. > > Will take a closer look the next few days if noone else steps up. I can't reproduce it either :/. When saving on my side, I have "QFile::remove: Empty or null file name" (I can't find from which part of the code it comes too) In the logs, what could be a hint (or a total coincidence) is: "org.kde.lokalize: ignoring "/reserv/freek/vertalingen/messages/tokodon/tokodon.po" this time because 372 < 253" and the element with the plural you tried to fix is 373 (so maybe accessing an index in a vector that does not exist)... File ..../trunkkf5/nl/messages/tokodon/tokodon.po is no longer in trunk KF5. Reappeared in trunk KF6 in which the problem did not occur anymore. If you download the old file and open it in Lokalize, can you reproduce this with it?? (In reply to Frederik Schwarzer from comment #19) > If you download the old file and open it in Lokalize, can you reproduce this > with it?? With "svn merge" I could retrieve the problematic file and could translate it without any problem. (In reply to Albert Astals Cid from comment #7) > ha, valgrind got tired of reporting before you made it crash, please add > --error-limit=no to the command line, you can also remove --leak-check=full, > leaks are not something we're particularly interested for now. Try setting the environment variable QT_ENABLE_REGEXP_JIT to 0. That should solve the problem, assuming that you are using QRegExp based on pcre2. |