Bug 433084 - KBibTeX crashes when opening .bib file
Summary: KBibTeX crashes when opening .bib file
Status: RESOLVED FIXED
Alias: None
Product: KBibTeX
Classification: Applications
Component: Loading/saving files (show other bugs)
Version: git (master)
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Thomas Fischer
URL:
Keywords: drkonqi
: 435514 458668 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-17 16:06 UTC by Nicolas Fella
Modified: 2024-01-25 14:41 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
bib file (569 bytes, text/x-bibtex)
2021-02-17 16:07 UTC, Nicolas Fella
Details
console output (2.38 KB, text/plain)
2021-02-21 23:37 UTC, Nicolas Fella
Details
New crash information added by DrKonqi (4.60 KB, text/plain)
2022-05-17 12:16 UTC, 847240
Details
New crash information added by DrKonqi (3.63 KB, text/plain)
2022-12-18 19:29 UTC, Philipp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Fella 2021-02-17 16:06:42 UTC
Application: kbibtex (e66bf803 (master, 3418 commits in history), near 0.10.50)
 (Compiled from sources)
Qt Version: 5.15.3
Frameworks Version: 5.80.0
Operating System: Linux 5.10.13-2-MANJARO x86_64
Windowing System: X11
Drkonqi Version: 5.21.80
Distribution: Manjaro Linux

-- Information about the crash:
Click 'Open' in toolbar
Select existing .bib file (see attachment)
KBibTeX crashes

The crash can be reproduced every time.

-- Backtrace:
Application: KBibTeX (kbibtex), signal: Segmentation fault
Content of s_kcrashErrorMessage: [Current thread is 1 (LWP 333268)]
[KCrash Handler]
#5  0x00007ff111d8a66d in FileModel::element (this=0x0, row=0) at /home/nico/kde/src/kbibtex/src/data/models/filemodel.cpp:393
#6  0x00007ff11b4de75b in SortFilterFileModel::filterAcceptsRow (this=0x55abd2d096e0, source_row=0, source_parent=...) at /home/nico/kde/src/kbibtex/src/gui/file/sortfilterfilemodel.cpp:149
#7  0x00007ff10f66a07b in QSortFilterProxyModelPrivate::create_mapping (this=this@entry=0x55abd2b72120, source_parent=...) at itemmodels/qsortfilterproxymodel.cpp:504
#8  0x00007ff10f673e68 in QSortFilterProxyModel::setSourceModel (this=0x55abd2d096e0, sourceModel=0x7ffde4ea91f0) at itemmodels/qsortfilterproxymodel.cpp:2149
#9  0x00007ff11b4dd6af in SortFilterFileModel::setSourceModel (this=0x55abd2d096e0, model=0x55abd2b39570) at /home/nico/kde/src/kbibtex/src/gui/file/sortfilterfilemodel.cpp:41
#10 0x00007ff0ec28cdb4 in KBibTeXPart::KBibTeXPartPrivate::openFile (this=0x55abd2ccf000, url=..., localFilePath=...) at /home/nico/kde/src/kbibtex/src/parts/part.cpp:397
#11 0x00007ff0ec2854e9 in KBibTeXPart::openFile (this=0x55abd2bf9290) at /home/nico/kde/src/kbibtex/src/parts/part.cpp:1023
#12 0x00007ff111c77816 in KParts::ReadOnlyPartPrivate::openLocalFile (this=0x55abd12de290) at /home/nico/kde/src/kparts/src/readonlypart.cpp:178
#13 0x00007ff111c77450 in KParts::ReadOnlyPart::openUrl (this=0x55abd2bf9290, url=...) at /home/nico/kde/src/kparts/src/readonlypart.cpp:141
#14 0x000055abcf049d20 in OpenFileInfo::OpenFileInfoPrivate::createPart (this=0x55abd2c33f50, newWidgetParent=0x55abd11d78f0, newServicePtr=...) at /home/nico/kde/src/kbibtex/src/program/openfileinfo.cpp:140
#15 0x000055abcf045fde in OpenFileInfo::part (this=0x55abd2c17a70, parent=0x55abd11d78f0, servicePtr=...) at /home/nico/kde/src/kbibtex/src/program/openfileinfo.cpp:264
#16 0x000055abcf011ced in MDIWidget::setFile (this=0x55abd11d78f0, openFileInfo=0x55abd2c17a70, servicePtr=...) at /home/nico/kde/src/kbibtex/src/program/mdiwidget.cpp:257
#17 0x000055abcf00a4a9 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<OpenFileInfo*, QExplicitlySharedDataPointer<KService> >, void, void (MDIWidget::*)(OpenFileInfo*, QExplicitlySharedDataPointer<KService>)>::call (f=(void (MDIWidget::*)(MDIWidget * const, OpenFileInfo *, QExplicitlySharedDataPointer<KService>)) 0x55abcf011c6e <MDIWidget::setFile(OpenFileInfo*, QExplicitlySharedDataPointer<KService>)>, o=0x55abd11d78f0, arg=0x7ffde4ea9820) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:152
#18 0x000055abcf009a44 in QtPrivate::FunctionPointer<void (MDIWidget::*)(OpenFileInfo*, QExplicitlySharedDataPointer<KService>)>::call<QtPrivate::List<OpenFileInfo*, QExplicitlySharedDataPointer<KService> >, void> (f=(void (MDIWidget::*)(MDIWidget * const, OpenFileInfo *, QExplicitlySharedDataPointer<KService>)) 0x55abcf011c6e <MDIWidget::setFile(OpenFileInfo*, QExplicitlySharedDataPointer<KService>)>, o=0x55abd11d78f0, arg=0x7ffde4ea9820) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:185
#19 0x000055abcf008a38 in QtPrivate::QSlotObject<void (MDIWidget::*)(OpenFileInfo*, QExplicitlySharedDataPointer<KService>), QtPrivate::List<OpenFileInfo*, QExplicitlySharedDataPointer<KService> >, void>::impl (which=1, this_=0x55abd244a8f0, r=0x55abd11d78f0, a=0x7ffde4ea9820, ret=0x0) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:418
#20 0x00007ff10f6d27f6 in QtPrivate::QSlotObjectBase::call (a=0x7ffde4ea9820, r=0x55abd11d78f0, this=0x55abd244a8f0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#21 doActivate<false> (sender=0x55abd127ec50, signal_index=3, argv=0x7ffde4ea9820) at kernel/qobject.cpp:3886
#22 0x000055abceffca84 in OpenFileInfoManager::currentChanged (this=0x55abd127ec50, _t1=0x55abd2c17a70, _t2=...) at src/program/kbibtex_autogen/EWIEGA46WW/moc_openfileinfo.cpp:280
#23 0x000055abcf0483f0 in OpenFileInfoManager::setCurrentFile (this=0x55abd127ec50, openFileInfo=0x55abd2c17a70, servicePtr=...) at /home/nico/kde/src/kbibtex/src/program/openfileinfo.cpp:713
#24 0x000055abcf00105e in KBibTeXMainWindow::openDocument (this=0x55abd120d2f0, url=...) at /home/nico/kde/src/kbibtex/src/program/mainwindow.cpp:339
#25 0x000055abcf000f95 in KBibTeXMainWindow::openDocumentDialog (this=0x55abd120d2f0) at /home/nico/kde/src/kbibtex/src/program/mainwindow.cpp:333
#26 0x000055abcf00a0a7 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KBibTeXMainWindow::*)()>::call(void (KBibTeXMainWindow::*)(), KBibTeXMainWindow*, void**) (f=(void (KBibTeXMainWindow::*)(KBibTeXMainWindow * const)) 0x55abcf000aa8 <KBibTeXMainWindow::openDocumentDialog()>, o=0x55abd120d2f0, arg=0x7ffde4ea9b70) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:152
#27 0x000055abcf0097ba in QtPrivate::FunctionPointer<void (KBibTeXMainWindow::*)()>::call<QtPrivate::List<>, void>(void (KBibTeXMainWindow::*)(), KBibTeXMainWindow*, void**) (f=(void (KBibTeXMainWindow::*)(KBibTeXMainWindow * const)) 0x55abcf000aa8 <KBibTeXMainWindow::openDocumentDialog()>, o=0x55abd120d2f0, arg=0x7ffde4ea9b70) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:185
#28 0x000055abcf008532 in QtPrivate::QSlotObject<void (KBibTeXMainWindow::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x55abd24482c0, r=0x55abd120d2f0, a=0x7ffde4ea9b70, ret=0x0) at /home/nico/kde/usr/include/QtCore/qobjectdefs_impl.h:418
#29 0x00007ff10f6d27f6 in QtPrivate::QSlotObjectBase::call (a=0x7ffde4ea9b70, r=0x55abd120d2f0, this=0x55abd24482c0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#30 doActivate<false> (sender=0x55abd24480e0, signal_index=4, argv=argv@entry=0x7ffde4ea9b70) at kernel/qobject.cpp:3886
#31 0x00007ff10f6cbb50 in QMetaObject::activate (sender=sender@entry=0x55abd24480e0, m=m@entry=0x7ff110dd3c20 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffde4ea9b70) at kernel/qobject.cpp:3946
#32 0x00007ff1108d9b52 in QAction::triggered (this=this@entry=0x55abd24480e0, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#33 0x00007ff1108dc391 in QAction::activate (this=0x55abd24480e0, event=<optimized out>) at kernel/qaction.cpp:1161
#34 0x00007ff1109ce6a2 in QAbstractButtonPrivate::click (this=this@entry=0x55abd24771f0) at widgets/qabstractbutton.cpp:398
#35 0x00007ff1109ce7c1 in QAbstractButton::mouseReleaseEvent (this=0x55abd24784f0, e=0x7ffde4eaa150) at widgets/qabstractbutton.cpp:1044
#36 0x00007ff110abc6ea in QToolButton::mouseReleaseEvent (this=<optimized out>, e=<optimized out>) at widgets/qtoolbutton.cpp:622
#37 0x00007ff11091fdae in QWidget::event (this=0x55abd24784f0, event=0x7ffde4eaa150) at kernel/qwidget.cpp:9020
#38 0x00007ff1108e014f in QApplicationPrivate::notify_helper (this=this@entry=0x55abd0e71af0, receiver=receiver@entry=0x55abd24784f0, e=e@entry=0x7ffde4eaa150) at kernel/qapplication.cpp:3632
#39 0x00007ff1108e70fb in QApplication::notify (this=0x7ffde4ea9e50, receiver=0x55abd24784f0, e=0x7ffde4eaa150) at kernel/qapplication.cpp:3076
#40 0x00007ff10f69c24a in QCoreApplication::notifyInternal2 (receiver=0x55abd24784f0, event=0x7ffde4eaa150) at kernel/qcoreapplication.cpp:1064
#41 0x00007ff1108e6126 in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x55abd24784f0, event=event@entry=0x7ffde4eaa150, alienWidget=alienWidget@entry=0x55abd24784f0, nativeWidget=0x55abd120d2f0, buttonDown=buttonDown@entry=0x7ff110e02a10 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2614
#42 0x00007ff110937df1 in QWidgetWindow::handleMouseEvent (this=0x55abd175f2f0, event=0x7ffde4eaa410) at kernel/qwidgetwindow.cpp:683
#43 0x00007ff11093b11e in QWidgetWindow::event (this=0x55abd175f2f0, event=0x7ffde4eaa410) at kernel/qwidgetwindow.cpp:300
#44 0x00007ff1108e014f in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55abd175f2f0, e=0x7ffde4eaa410) at kernel/qapplication.cpp:3632
#45 0x00007ff10f69c24a in QCoreApplication::notifyInternal2 (receiver=0x55abd175f2f0, event=0x7ffde4eaa410) at kernel/qcoreapplication.cpp:1064
#46 0x00007ff10faaaf83 in QGuiApplicationPrivate::processMouseEvent (e=0x55abd2579ff0) at kernel/qguiapplication.cpp:2282
#47 0x00007ff10fa80f4c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#48 0x00007ff104b0fe9a in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#49 0x00007ff108b13b54 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#50 0x00007ff108b67bf1 in ?? () from /usr/lib/libglib-2.0.so.0
#51 0x00007ff108b12381 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#52 0x00007ff10f6f35ff in QEventDispatcherGlib::processEvents (this=0x55abd0f421b0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#53 0x00007ff10f69abfb in QEventLoop::exec (this=this@entry=0x7ffde4eaa790, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#54 0x00007ff10f6a2e80 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#55 0x000055abceffea53 in main (argc=1, argv=0x7ffde4eaa9b8) at /home/nico/kde/src/kbibtex/src/program/program.cpp:126
[Inferior 1 (process 333268) detached]

Possible duplicates by query: bug 292489, bug 286360.

Reported using DrKonqi
Comment 1 Nicolas Fella 2021-02-17 16:07:15 UTC
Created attachment 135770 [details]
bib file
Comment 2 Thomas Fischer 2021-02-21 22:50:36 UTC
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?
Comment 3 Nicolas Fella 2021-02-21 23:36:57 UTC
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
Comment 4 Nicolas Fella 2021-02-21 23:37:18 UTC
Created attachment 136026 [details]
console output
Comment 5 Thomas Fischer 2021-02-27 18:45:03 UTC
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 ...
Comment 6 Bug Janitor Service 2021-03-14 04:33:34 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
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!
Comment 7 Bug Janitor Service 2021-03-29 04:33:37 UTC
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!
Comment 8 Antonio Rojas 2021-04-08 18:02:58 UTC
*** Bug 435514 has been marked as a duplicate of this bug. ***
Comment 10 Thomas Fischer 2021-12-11 13:57:03 UTC
(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?
Comment 11 Antonio Rojas 2021-12-11 18:11:55 UTC
It is already fixed in Qt (+KDE patches)
Comment 12 847240 2022-05-17 12:16:34 UTC
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
Comment 13 Antoine D. 2022-05-20 22:34:53 UTC
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
Comment 14 Antoine D. 2022-06-03 22:05:09 UTC
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.
Comment 15 Antonio Rojas 2022-06-04 07:52:33 UTC
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.
Comment 16 Antoine D. 2022-06-04 19:18:05 UTC
(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?
Comment 17 Antonio Rojas 2022-06-04 20:50:07 UTC
(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.
Comment 18 Antoine D. 2022-06-07 04:25:33 UTC
(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
Comment 19 Antonio Rojas 2022-09-03 22:12:58 UTC
*** Bug 458668 has been marked as a duplicate of this bug. ***
Comment 20 Philipp 2022-12-18 19:29:14 UTC
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
Comment 21 Thomas Fischer 2022-12-30 11:33:51 UTC
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
Comment 22 Thomas Fischer 2023-01-03 22:06:56 UTC
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
Comment 23 Thomas Fischer 2023-01-04 22:01:47 UTC
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
Comment 24 Thomas Fischer 2023-12-16 15:02:07 UTC
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'?
Comment 25 kde@kalvdans.no-ip.org 2024-01-25 14:41:31 UTC
I can verify that kbibtex 0.10.0-1build1 (from Ubuntu noble) no longer crashes on my usecase. Closing issue.