Summary: | KBibTeX crashes when opening .bib file | ||
---|---|---|---|
Product: | [Applications] KBibTeX | Reporter: | Nicolas Fella <nicolas.fella> |
Component: | Loading/saving files | Assignee: | Thomas Fischer <fischer> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | 847240, a.m.p.boelens, ant7desros, kde, lateinlehrer, torge.rosendahl |
Priority: | NOR | Keywords: | drkonqi |
Version: | git (master) | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
bib file
console output New crash information added by DrKonqi New crash information added by DrKonqi |
Description
Nicolas Fella
2021-02-17 16:06:42 UTC
Created attachment 135770 [details]
bib file
Some questions as I cannot reproduce the crash. Does it happen only for this file or for other files, too? You are using quite recent Qt and KDE libraries. Did the crash happen a few days/weeks earlier befor you upgrade? Can you please launch KBibTeX on the command line and submit everything that is printed to stdout and stderr? It seems to happen for all files I've tried. I haven't tried using kbibtex before so I can't tell if it broke only recently Created attachment 136026 [details]
console output
Hm, I still cannot reproduce the problem or deduce what the problem is. Can you please test the lastest version using the following approach: 1. Get the script 'run-kbibtex.sh' as described here: https://userbase.kde.org/KBibTeX/Development#Quick_Start_to_Run_KBibTeX_from_Git 2. Simply run bash run-kbibtex.sh This will download, compile, and run the lastest KBibTeX commit from Git, but everything will be done in /tmp, so it will neither touch your regular installation nor your current configuration. If no crash occurs here, the problem you observed is most likely with your regular installation. Otherwise, I'll have to dig deeper ... 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 mark the bug 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! 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! *** Bug 435514 has been marked as a duplicate of this bug. *** This is caused by Qt commit https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.15&id=4796296ed6d7b05e2ba94e5a8a28c48350a3c492 (In reply to Antonio Rojas from comment #9) > This is caused by Qt commit > https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5. > 15&id=4796296ed6d7b05e2ba94e5a8a28c48350a3c492 I am not sure about what this comment means. Is there a problem on KBibTeX which someone (I?) need to fix or is it an issue in Qt which I can do little about until it is resolved somehow in Qt upstream? It is already fixed in Qt (+KDE patches) Created attachment 148913 [details]
New crash information added by DrKonqi
kbibtex (0.9.90) using Qt 5.15.3
- What I was doing when the application crashed:
opening a '.bib' - file from the dolphin context menu or opening a '.bib' - file from the downloads-list in firefox and then choosing KBibTeX to handle the file.
opening a '.bib' - file from inside KBibTex.
Happens with different '.bib'-files.
-- Backtrace (Reduced):
#4 0x00007fc12a182d40 in FileModel::element (this=0x0, row=0) at ./src/data/models/filemodel.cpp:388
#5 0x00007fc12a4ae6e4 in SortFilterFileModel::filterAcceptsRow (this=0x55fd81ef2d50, source_row=<optimized out>, source_parent=...) at ./src/gui/file/sortfilterfilemodel.cpp:147
#6 0x00007fc1287dfc1e in QSortFilterProxyModelPrivate::create_mapping (this=this@entry=0x55fd81ef3e20, source_parent=...) at itemmodels/qsortfilterproxymodel.cpp:504
#7 0x00007fc1287e986d in QSortFilterProxyModel::setSourceModel (this=0x55fd81ef2d50, sourceModel=<optimized out>) at itemmodels/qsortfilterproxymodel.cpp:2149
#8 0x00007fc12a4afac5 in SortFilterFileModel::setSourceModel (this=this@entry=0x55fd81ef2d50, model=0x55fd81ef3c20) at ./src/gui/file/sortfilterfilemodel.cpp:39
I have the same issue. I installed KBibTeX on my new computer May 18 and at my first attempt to open a ".bib" file, the program crashed. I made several attempts with different ".bib" files and every time, there was a crash. I can create a new file and save it, but when I try to reopen it, the app crashes. info KBibTeX version 0.9.90 (Kubuntu package) Operating System: Kubuntu 22.04 KDE Plasma Version: 5.24.4 KDE Frameworks Version: 5.92.0 Qt Version: 5.15.3 Kernel Version: 5.15.0-30-generic (64-bit) Graphics Platform: X11 Processors: 4 × AMD Ryzen 3 2200G with Radeon Vega Graphics Memory: 13.6 Gio of RAM Graphics Processor: AMD Radeon Vega 8 Graphics I made further tests and I found this: if I create a ".bib" file without any entry in it and save it, I can reopen it without problem. But if I add some information in the file, save, close and try to reopen it, then KBibTeX crashes. Also, I upgraded my old laptop to Kubuntu 22.04 LTS this week and KBibTeX, which was working fine before with Kubuntu 21.10, now crashes the same way when I try to open a non-empty ".bib" file. I suspect there is a link between this bug and bug 453455. This is a Qt bug that was fixed a year ago in the KDE patch collection. You should ask your distro to switch their Qt packages to the patch collection or at least backport the fix for this. (In reply to Antonio Rojas from comment #15) If the bug was fixed last year, how come I never had problem with KBibTeX until I upgraded to Kubuntu 22.04 last month? (In reply to Antoine D. from comment #16) > (In reply to Antonio Rojas from comment #15) > If the bug was fixed last year, how come I never had problem with KBibTeX > until I upgraded to Kubuntu 22.04 last month? For the same reason you're having the bug *now*: because your distro is shipping an old version of Qt. This bug was introduced upstream in Qt 5.15.3. (In reply to Antonio Rojas from comment #17) Thank you for your help and explanations. I now use the Flatpak version of KBibTeX. It is not perfect but at least I can open a file and do something in KBibTeX. Asking and waiting for Ubuntu to add the patch collection doesn't seem to be an option: https://www.kubuntuforums.net/forum/newbie-support/help-the-new-guy/663425-how-can-i-get-the-qt5-patch-collection-to-solve-my-crashing-kbibtex-problem *** Bug 458668 has been marked as a duplicate of this bug. *** Created attachment 154680 [details]
New crash information added by DrKonqi
kbibtex (0.9.90) using Qt 5.15.3
- What I was doing when the application crashed:
Click on the kbibtex-Icon in the Application-Start-Menue.
- Unusual behavior I noticed:
Frame of kbibtex appears very briefly (about .5 seconds) on the screen but crashes immediately.
- Custom settings of the application:
None. All standard.
-- Backtrace (Reduced):
#4 0x00007fefa9b7bd40 in FileModel::element(int) const () from /lib/x86_64-linux-gnu/libkbibtexdata.so.0
#5 0x00007fefa9ea76e4 in SortFilterFileModel::filterAcceptsRow(int, QModelIndex const&) const () from /lib/x86_64-linux-gnu/libkbibtexgui.so.0
[...]
#7 0x00007fefa81e286d in QSortFilterProxyModel::setSourceModel(QAbstractItemModel*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007fefa9ea8ac5 in SortFilterFileModel::setSourceModel(QAbstractItemModel*) () from /lib/x86_64-linux-gnu/libkbibtexgui.so.0
[...]
#12 0x00007fefa9aeeba7 in KParts::ReadOnlyPart::openUrl(QUrl const&) () from /lib/x86_64-linux-gnu/libKF5Parts.so.5
This bug and bug 453455 may be related. Please check the patch in comment 9 if it solves your problem, too. https://bugs.kde.org/show_bug.cgi?id=453455#c9 https://bugs.kde.org/attachment.cgi?id=154903 Git commit 4aea6ed35b1629b3dba65a441db7567eece5eab0 by Thomas Fischer. Committed on 01/01/2023 at 22:04. Pushed by thomasfischer into branch 'kbibtex/0.10'. Fixing crash when opening .bib file In certain situations, also depending on Linux distributions (varying Qt and KDE Frameworks versions), opening a bibliography file can cause crashes (segmentation faults) due to an invalid model or its underlying data. This commit changes the order of two instructions. Now first an internal variable is properly set. Only then an update on the model is applied. The largest part of this commit is a new test that reproducibly crashes without the changed order of two instructions, but passes after the fix has been applied. Related: bug 453455 M +1 -1 src/gui/file/sortfilterfilemodel.cpp M +36 -0 src/test/CMakeLists.txt A +66 -0 src/test/kbibtexguitest.cpp [License: GPL (v2+)] https://invent.kde.org/office/kbibtex/commit/4aea6ed35b1629b3dba65a441db7567eece5eab0 Git commit ee125af91d7d4e8dfc8927cad85694b55de27a84 by Thomas Fischer. Committed on 04/01/2023 at 22:00. Pushed by thomasfischer into branch 'master'. Fixing crash when opening .bib file In certain situations, also depending on Linux distributions (varying Qt and KDE Frameworks versions), opening a bibliography file can cause crashes (segmentation faults) due to an invalid model or its underlying data. This commit changes the order of two instructions. Now first an internal variable is properly set. Only then an update on the model is applied. The largest part of this commit is a new test that reproducibly crashes without the changed order of two instructions, but passes after the fix has been applied. This commit is a forward-port of commit 4aea6ed35b1629b3dba65a44 from branch 'kbibtex/0.10'. Related: bug 453455 M +36 -0 src/test/CMakeLists.txt A +66 -0 src/test/kbibtexguitest.cpp [License: GPL (v2+)] https://invent.kde.org/office/kbibtex/commit/ee125af91d7d4e8dfc8927cad85694b55de27a84 It is a little bit unclear, but does this problem still exist? Have you tested the latest code either from branch 'master' or 'kbibtex/0.10'? I can verify that kbibtex 0.10.0-1build1 (from Ubuntu noble) no longer crashes on my usecase. Closing issue. |