Bug 287053 - Krita crashes on exit in ~KoID
Summary: Krita crashes on exit in ~KoID
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-20 10:12 UTC by Dmitry Kazakov
Modified: 2012-05-08 08:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch that makes the colormodel and depth koid's no longer static (126.31 KB, patch)
2012-02-11 12:19 UTC, Halla Rempt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Kazakov 2011-11-20 10:12:39 UTC
Even unittests crash on exit on my machine.

Backtrace of krita: http://paste.kde.org/148220/
Memcheck of a unittest: http://paste.kde.org/148214/

Happens on openSUSE 11.4 machine, works fine on openSUSE 11.3 laptop. The latter one has lcms1.
Comment 1 Dmitry Kazakov 2011-11-20 10:21:00 UTC
Desktop (crash):
Qt Version: 4.7.1
KDE Version: 4.6.00 (4.6.0) "release 6"

Laptop (no crash):
Qt: 4.6.3
KDE: 4.4.4 "release 2"
Comment 2 Halla Rempt 2012-02-11 10:52:16 UTC
Can you add a destructor to KoID, like

    ~KoID() {
        qDebug() << m_id << m_name;
    }

so we can see which id's are dying?
Comment 3 Halla Rempt 2012-02-11 11:19:54 UTC
I think this is caused by the fix for https://bugs.kde.org/show_bug.cgi?id=251606 (Can't launch any koffice application in locale!=en_US with kdelibs >rev 1175322)
Comment 4 Halla Rempt 2012-02-11 12:19:34 UTC
Created attachment 68699 [details]
patch that makes the colormodel and depth koid's no longer static

please test.
Comment 5 Halla Rempt 2012-02-12 09:55:50 UTC
Okay, that didn't work either... Fortunately, this only happens in the unittests and only on Dmitry's system...
Comment 6 Dmitry Kazakov 2012-02-12 11:15:39 UTC
Well, it happens on both untittests and Krita executable, but only on exit and only on my machine ;)
Comment 7 Halla Rempt 2012-05-08 08:27:49 UTC
Git commit 87c5ee4cdcf09cd9d95b7b20ff902bef5a3f3007 by Boudewijn Rempt.
Committed on 07/05/2012 at 15:01.
Pushed by rempt into branch 'master'.

Do not delete some static stuff on exit

Depending on the order of deletion and other variables, these delete
calls might cause a crash on exit or not. And there's actually no
memory leak, since this is all static stuff that's present for the
lifetime of the application.

In this case, it's better to just quit, than explicitly free all memory.
The bytes are gone with the process, and there isn't stuff that needs
to be written on quit here.
Related: bug 298613

M  +3    -1    libs/flake/KoInputDeviceHandlerRegistry.cpp
M  +3    -1    libs/pigment/lut.h

http://commits.kde.org/calligra/87c5ee4cdcf09cd9d95b7b20ff902bef5a3f3007