Bug 381961 - [Palette docker] Adding color swatch to empty new palette hangs Krita and uses cpu (git master)
Summary: [Palette docker] Adding color swatch to empty new palette hangs Krita and use...
Status: RESOLVED DUPLICATE of bug 381927
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-03 16:28 UTC by Raghavendra kamath
Modified: 2017-07-03 16:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raghavendra kamath 2017-07-03 16:28:06 UTC
In the recent git master with the new palette system, adding color swatch to an empty palette makes Krita consume high cpu and makes it unresponsive.

To reproduce

1) Open krita built from git master and open a new document
2) Create an empty (new) color palette
3) choose a color for foreground color from the toolbar color icons
4) Click on the plus button in the palette docker, a dialog box will open press 'ok'

Expected result:
Krita should work as normal and the color should be added to the palette.

Actual Result:
Krita becomes unresponsive and color is not added to the palette

Here is a backtrace from gdb:
Thread 14 (Thread 0x7fff9abad700 (LWP 22272)):
#0  0x00007fffebfbd0bf in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007fffedb7365b in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib64/libQt5Core.so.5
#2  0x00007fffeee65211 in  () at /usr/lib64/libQt5Widgets.so.5
#3  0x00007fffedb729e9 in  () at /usr/lib64/libQt5Core.so.5
#4  0x00007fffebfb8744 in start_thread () at /lib64/libpthread.so.0
#5  0x00007fffecf6caad in clone () at /lib64/libc.so.6

Thread 13 (Thread 0x7fff9a3ac700 (LWP 22271)):
#0  0x00007fffebfbd0bf in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007fffedb7365b in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib64/libQt5Core.so.5
#2  0x00007fffedb6cf96 in QSemaphore::tryAcquire(int, int) () at /usr/lib64/libQt5Core.so.5
#3  0x00007ffff64387e3 in KisTileDataSwapper::waitForWork() (this=<optimized out>) at /run/media/raghu/Data/krita-build/src/krita/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#4  0x00007ffff64389aa in KisTileDataSwapper::run() (this=0x7ffff68dea20 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+64>)
    at /run/media/raghu/Data/krita-build/src/krita/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#5  0x00007fffedb729e9 in  () at /usr/lib64/libQt5Core.so.5
#6  0x00007fffebfb8744 in start_thread () at /lib64/libpthread.so.0
#7  0x00007fffecf6caad in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7fffd6b3b700 (LWP 22255)):
#0  0x00007fffecf6420d in poll () at /lib64/libc.so.6
#1  0x00007fffea0b5314 in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007fffea0b542c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#3  0x00007fffedd8531c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#4  0x00007fffedd32feb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#5  0x00007fffedb6df1a in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#6  0x00007ffff0f17295 in  () at /usr/lib64/libQt5DBus.so.5
#7  0x00007fffedb729e9 in  () at /usr/lib64/libQt5Core.so.5
#8  0x00007fffebfb8744 in start_thread () at /lib64/libpthread.so.0
#9  0x00007fffecf6caad in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7fffdfeeb700 (LWP 22254)):
#0  0x00007fffecf6420d in poll () at /lib64/libc.so.6
#1  0x00007ffff0adb3e2 in  () at /usr/lib64/libxcb.so.1
#2  0x00007ffff0adcfcf in xcb_wait_for_event () at /usr/lib64/libxcb.so.1
#3  0x00007fffe2437839 in  () at /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007fffedb729e9 in  () at /usr/lib64/libQt5Core.so.5
#5  0x00007fffebfb8744 in start_thread () at /lib64/libpthread.so.0
#6  0x00007fffecf6caad in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7ffff7f96900 (LWP 22250)):
#0  0x00007ffff7611e27 in QList<QString>::~QList() (this=0x7fffffffc2a0, __in_chrg=<optimized out>) at /usr/include/qt5/QtCore/qlist.h:814
#1  0x00007ffff793f112 in KisPaletteModel::index(int, int, QModelIndex const&) const (this=0x7fffffffc2a0, __in_chrg=<optimized out>) at /usr/include/qt5/QtCore/qstringlist.h:93
#2  0x00007ffff793f112 in KisPaletteModel::index(int, int, QModelIndex const&) const (this=0x7fffffffc2a0, __in_chrg=<optimized out>) at /usr/include/qt5/QtCore/qglobal.h:919
#3  0x00007ffff793f112 in KisPaletteModel::index(int, int, QModelIndex const&) const (this=0x126d2e50, row=-133201447, column=8, parent=...) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisPaletteModel.cpp:248
#4  0x00007ffff793c6b7 in KisPaletteModel::getLastEntryIndex() (this=this@entry=0x126d2e50) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisPaletteModel.cpp:71
#5  0x00007ffff793c823 in KisPaletteModel::addColorSetEntry(KoColorSetEntry, QString) (this=0x126d2e50, entry=..., groupName=...) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisPaletteModel.cpp:325
#6  0x00007ffff7943166 in KisPaletteView::addEntryWithDialog(KoColor) (this=0x126bf420, color=...) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/kis_palette_view.cpp:118
#7  0x00007fff9b817d8d in PaletteDockerDock::addColorForeground() (this=0x126bbc30) at /run/media/raghu/Data/krita-build/src/krita/plugins/dockers/palettedocker/palettedocker_dock.cpp:191
#8  0x00007fff9b81dda5 in PaletteDockerDock::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x126bbc30, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
    at /run/media/raghu/Data/krita-build/build/plugins/dockers/palettedocker/moc_palettedocker_dock.cpp:98
#9  0x00007fffedd5ebc1 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib64/libQt5Core.so.5
#10 0x00007fffeed36702 in QAbstractButton::clicked(bool) () at /usr/lib64/libQt5Widgets.so.5
#11 0x00007fffeed368fa in  () at /usr/lib64/libQt5Widgets.so.5
#12 0x00007fffeed37928 in  () at /usr/lib64/libQt5Widgets.so.5
#13 0x00007fffeed37aa4 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/libQt5Widgets.so.5
#14 0x00007fffeedfba3a in QToolButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/libQt5Widgets.so.5
#15 0x00007fffeec81c9a in QWidget::event(QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#16 0x00007fffeedfbb19 in QToolButton::event(QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#17 0x00007fffeec3fe3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#18 0x00007fffeec44d14 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#19 0x00007ffff78af497 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x126cff20, event=0x7fffffffcd60) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisApplication.cpp:558
#20 0x00007fffedd34fd5 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#21 0x00007fffeec43a10 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /usr/lib64/libQt5Widgets.so.5
#22 0x00007fffeec9a911 in  () at /usr/lib64/libQt5Widgets.so.5
#23 0x00007fffeec9ceb3 in  () at /usr/lib64/libQt5Widgets.so.5
#24 0x00007fffeec3fe3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#25 0x00007fffeec4449a in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
---Type <return> to continue, or q <return> to quit---
#26 0x00007ffff78af497 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x1288eb20, event=0x7fffffffd230) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisApplication.cpp:558
#27 0x00007fffedd34fd5 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#28 0x00007fffee28868b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib64/libQt5Gui.so.5
#29 0x00007fffee289e05 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /usr/lib64/libQt5Gui.so.5
#30 0x00007fffee26beeb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Gui.so.5
#31 0x00007fffe2464bc0 in  () at /usr/lib64/libQt5XcbQpa.so.5
#32 0x00007fffea0b5134 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#33 0x00007fffea0b5388 in  () at /usr/lib64/libglib-2.0.so.0
#34 0x00007fffea0b542c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#35 0x00007fffedd8531c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#36 0x00007fffedd32feb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#37 0x00007fffedd3aed6 in QCoreApplication::exec() () at /usr/lib64/libQt5Core.so.5
#38 0x000000000040591b in main(int, char**) (argc=1, argv=<optimized out>) at /run/media/raghu/Data/krita-build/src/krita/krita/main.cc:269
Comment 1 Raghavendra kamath 2017-07-03 16:29:48 UTC
Aah didn't see the bug report by wolthera, marking this as duplicate.

*** This bug has been marked as a duplicate of bug 381927 ***