Bug 378497 - kbibtex crashes when closing settings dialog
Summary: kbibtex crashes when closing settings dialog
Status: RESOLVED FIXED
Alias: None
Product: KBibTeX
Classification: Applications
Component: General (other bugs)
Version First Reported In: git (master)
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Thomas Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-06 10:30 UTC by Andrius Štikonas
Modified: 2017-04-07 19:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 0.8
Sentry Crash Report:


Attachments
backtrace (8.06 KB, text/plain)
2017-04-06 10:30 UTC, Andrius Štikonas
Details
Remove 'static' property from instances of FileImporterBibTeX (2.14 KB, patch)
2017-04-07 18:49 UTC, Thomas Fischer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrius Štikonas 2017-04-06 10:30:36 UTC
Created attachment 104905 [details]
backtrace

When closing Settings dialog (either by clicking OK, or Cancel), KBibtex crashes.
Comment 1 Thomas Fischer 2017-04-07 18:49:43 UTC
Created attachment 104917 [details]
Remove 'static' property from instances of FileImporterBibTeX

Please check if this patch fixes the crash for you.
Comment 2 Andrius Štikonas 2017-04-07 18:56:05 UTC
Works now!

P.S. I'll leave this bug open since the fix is not yet committed.
Comment 3 Thomas Fischer 2017-04-07 19:36:26 UTC
Git commit b89b498f719361c6026bede4893a5456dc3c34fe by Thomas Fischer.
Committed on 07/04/2017 at 19:26.
Pushed by thomasfischer into branch 'master'.

Remove 'static' from QObject-derived objects

Objects of classes that are derived from QObject are supposed to be in a
clear parent-children relation: at object creation, a QObject-derived
parent is passed to the QObject constructor.
QObject's destructor will take care that all child objects will be
destroyed as well.
This conflicts with QObject-derived objects that are declared 'static',
as this may imply a different life span than the object's parent.
This may lead to double-destroy situations crashing KBibTeX.

This commit will avoid having the 'static' keyword at variable
declarations of QObject-derived objects.
FIXED-IN: 0.8

M  +1    -1    src/gui/preferences/settingsidsuggestionswidget.cpp
M  +0    -4    src/io/fileimporterbibtex.cpp
M  +0    -1    src/io/fileimporterbibtex.h
M  +1    -1    src/networking/zotero/items.cpp

https://commits.kde.org/kbibtex/b89b498f719361c6026bede4893a5456dc3c34fe
Comment 4 Thomas Fischer 2017-04-07 19:37:24 UTC
(In reply to Andrius Štikonas from comment #2)
> Works now!
Ok, thanks for the quick reply

> P.S. I'll leave this bug open since the fix is not yet committed.
Indeed, I can do that by adding a special keyword in the commit message:
https://community.kde.org/Policies/Commit_Policy#Special_keywords_in_GIT_and_SVN_log_messages