Review Request 122232: KConfig: fix using KSharedConfig in global object destructor.

David Faure faure at kde.org
Sun Feb 22 19:07:40 UTC 2015



> On Feb. 21, 2015, 8:19 p.m., Matthew Dawson wrote:
> > Everything looked good, but when I tried to rerun the tests to make sure everything is ok the kconfig_in_global_object test I'm getting an abort with the same error message.  Backtrace:
> > ```
> > #5  0x00007ffff791b630 in qAppName () at kernel/qcoreapplication.cpp:541
> > #6  0x00007ffff78a9c76 in QLockFilePrivate::tryLock_sys (this=this at entry=0x608ec0) at io/qlockfile_unix.cpp:140
> > #7  0x00007ffff783c1ec in QLockFile::tryLock (this=<optimized out>, timeout=-1) at io/qlockfile.cpp:208
> > #8  0x00007ffff7ba17db in KConfigIniBackend::lock (this=0x608fe0) at /home/matthew/kde/kconfig/src/core/kconfigini.cpp:634
> > #9  0x00007ffff7b84ce0 in KConfigPrivate::lockLocal (this=0x608b40) at /home/matthew/kde/kconfig/src/core/kconfig.cpp:104
> > #10 0x00007ffff7b86aa9 in KConfig::sync (this=0x606ae0) at /home/matthew/kde/kconfig/src/core/kconfig.cpp:415
> > #11 0x00007ffff7b85c28 in KConfig::~KConfig (this=0x606ae0, __in_chrg=<optimized out>) at /home/matthew/kde/kconfig/src/core/kconfig.cpp:267
> > #12 0x00007ffff7b85c82 in KConfig::~KConfig (this=0x606ae0, __in_chrg=<optimized out>) at /home/matthew/kde/kconfig/src/core/kconfig.cpp:270
> > #13 0x0000000000401844 in Tester::~Tester (this=0x6030e8 <(anonymous namespace)::Q_QGS_globalTestObject::innerFunction()::holder>, __in_chrg=<optimized out>)
> >     at /home/matthew/kde/kconfig/autotests/kconfig_in_global_object.cpp:56
> > ```
> > Which seems to be second issue we found.  I'm not sure how to solve this issue yet, but I'd be happy to just document the issue and strike this test.
> > 
> > I only get this when the configuration file does not exist before the program executes, which may be why we missed it from the earlier patches.
> 
> David Faure wrote:
>     Indeed. Good catch.
>     
>     Fixed in Qt. https://codereview.qt-project.org/106953.

Ah, and https://codereview.qt-project.org/106954


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122232/#review76407
-----------------------------------------------------------


On Feb. 21, 2015, 7:58 p.m., David Faure wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122232/
> -----------------------------------------------------------
> 
> (Updated Feb. 21, 2015, 7:58 p.m.)
> 
> 
> Review request for KDE Frameworks and Matthew Dawson.
> 
> 
> Repository: kconfig
> 
> 
> Description
> -------
> 
> kconfig_in_global_object.cpp comes from kdelibs4support
> (after porting to Q_GLOBAL_STATIC)
> 
> ksharedconfig_in_global_object.cpp is now in kdelibs4 too
> (where it works) and reproduces Albert's KgDifficulty testcase.
> 
> 
> Diffs
> -----
> 
>   autotests/CMakeLists.txt b91f754b705fc87bb8b729bea72fbb5f7d427ace 
>   autotests/kconfig_in_global_object.cpp PRE-CREATION 
>   autotests/ksharedconfig_in_global_object.cpp PRE-CREATION 
>   src/core/kconfig.cpp 1da816faea5548d2f529755d6538a142a2193720 
>   src/core/ksharedconfig.h d0791e461804d421010bc5f82873371a4d3bc992 
> 
> Diff: https://git.reviewboard.kde.org/r/122232/diff/
> 
> 
> Testing
> -------
> 
> Both tests pass and the QCoreApplication::arguments warning (because called after qApp is destroyed) is gone.
> 
> 
> Thanks,
> 
> David Faure
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150222/797b7d3a/attachment.html>


More information about the Kde-frameworks-devel mailing list