[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    Re: QString -> QStringLiteral conversions might make applications =?iso-8859-1?Q?crash_on_exit?=
From:       Jan_Kundrát <jkt () kde ! org>
Date:       2016-02-26 12:25:18
Message-ID: 6a75ecc5-50ca-4da1-ba89-bbb7eb3da508 () kde ! org
[Download RAW message or body]

On Friday, 26 February 2016 01:37:57 CET, Frank Reininghaus wrote:
> This becomes a problem if the read-only data that the QString refers
> to are not there any more, which can happen if the QString was stored
> in a global static object from one library, and the QStringLiteral is
> from another library, which might have been unloaded before the global
> static object was destroyed.

Are you 100% sure that this is not "just" due to icon loaders which are 
implemented as plugins [1]?

Upstream says [2] that they do not want to support unloading of plugins 
which "leak" Qt data. There's a patch [3] which implements this for all 
plugins (including the icon loaders). Apparently, it's been so ever since 
Qt 5.0.

For an example on how an application can workaround this thing, see my 
patch to Trojitá [4].

Cheers,
Jan

[1] https://bugreports.qt.io/browse/QTBUG-50829
[2] 
https://bugreports.qt.io/browse/QTBUG-49061?focusedCommentId=297937&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-297937
 [3] https://codereview.qt-project.org/140750
[4] 
https://gerrit.vesnicky.cesnet.cz/r/#/c/595/5/src/UiUtils/IconLoader.cpp

-- 
Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic