Bug 365734 - Digikam crashes when clicking on the Table button, new installation
Summary: Digikam crashes when clicking on the Table button, new installation
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Mysql (show other bugs)
Version: 5.0.0
Platform: macOS (DMG) macOS
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-16 09:14 UTC by bcr
Modified: 2016-07-16 19:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bcr 2016-07-16 09:14:05 UTC
First install of the 5.0.0 release onto my OSX machine, referenced an external MariaDB for data.
Get some warnings about some missing tables for thumbs or faces.
Picked a small local dir with a few images
Clicked on the Table button
digiKam crashes immediately

Reproducible: Always

Steps to Reproduce:
1. Install digiKam on OSX, external MariaDB database
2. Chose a small local folder with few images to start with
3. Click on the Table button on the top menu row (not sure what it does)
4. digiKam crashes immediately

Actual Results:  
digiKam crashed, brought up an error window with stack trace info


Process:               digikam [72372]
Path:                  /opt/digikam/*/digikam.app/Contents/MacOS/digikam
Identifier:            digikam
Version:               5.0.0 (5.0.0)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           digikam [72372]
User ID:               387642867

Date/Time:             2016-07-16 02:03:05.648 -0700
OS Version:            Mac OS X 10.10.5 (14F1808)
Report Version:        11
Anonymous UUID:        56C2D1C9-ACA1-3B77-6BF6-7B5D63D57C85

Sleep/Wake UUID:       46AD3D50-8236-4257-9553-6DB13335ECCB

Time Awake Since Boot: 580000 seconds
Time Since Wake:       62000 seconds

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff86f96286 __pthread_kill + 10
1   libsystem_c.dylib             	0x00007fff8cbe39ab abort + 129
2   org.qt-project.QtCore         	0x000000010e14f039 qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) + 9
3   org.qt-project.QtCore         	0x000000010e150a07 QMessageLogger::fatal(char const*, ...) const + 231
4   org.qt-project.QtCore         	0x000000010e14b692 qt_assert_x(char const*, char const*, char const*, int) + 82
5   libdigikamgui.5.0.0.dylib     	0x000000010767bd3d QList<Digikam::TableViewColumn*>::at(int) const + 93
6   libdigikamgui.5.0.0.dylib     	0x0000000107677367 Digikam::TableViewModel::getColumnObject(int) + 39
7   libdigikamgui.5.0.0.dylib     	0x0000000107674bb7 Digikam::TableViewItemDelegate::sizeHint(QStyleOptionViewItem const&, QModelIndex const&) const + 359
8   org.qt-project.QtWidgets      	0x000000010d767a08 QTreeViewPrivate::paintAlternatingRowColors(QPainter*, QStyleOptionViewItem*, int, int) const + 168
9   org.qt-project.QtWidgets      	0x000000010d7676e9 QTreeView::drawTree(QPainter*, QRegion const&) const + 1737
10  org.qt-project.QtWidgets      	0x000000010d766f55 QTreeView::paintEvent(QPaintEvent*) + 325
11  org.qt-project.QtWidgets      	0x000000010d4f0976 QWidget::event(QEvent*) + 2038
12  org.qt-project.QtWidgets      	0x000000010d5e867d QFrame::event(QEvent*) + 45
13  org.qt-project.QtWidgets      	0x000000010d67a097 QAbstractScrollArea::viewportEvent(QEvent*) + 135
14  org.qt-project.QtWidgets      	0x000000010d7228e5 QAbstractItemView::viewportEvent(QEvent*) + 1397
15  org.qt-project.QtWidgets      	0x000000010d766ce5 QTreeView::viewportEvent(QEvent*) + 517
16  org.qt-project.QtWidgets      	0x000000010d67ad34 QAbstractScrollAreaFilter::eventFilter(QObject*, QEvent*) + 36
17  org.qt-project.QtCore         	0x000000010e32b4ab QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 203
18  org.qt-project.QtWidgets      	0x000000010d4af081 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 273
19  org.qt-project.QtWidgets      	0x000000010d4b05f8 QApplication::notify(QObject*, QEvent*) + 504
20  org.qt-project.QtCore         	0x000000010e32b214 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 164
21  org.qt-project.QtWidgets      	0x000000010d4ea3e4 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 3316
22  org.qt-project.QtWidgets      	0x000000010d4bd227 QWidgetBackingStore::doSync() + 5447
23  org.qt-project.QtWidgets      	0x000000010d4f0c02 QWidget::event(QEvent*) + 2690
24  org.qt-project.QtWidgets      	0x000000010d60019a QMainWindow::event(QEvent*) + 1546
25  libKF5XmlGui.5.dylib          	0x000000010bf454eb KMainWindow::event(QEvent*) + 1003
26  libKF5XmlGui.5.dylib          	0x000000010bf8e5aa KXmlGuiWindow::event(QEvent*) + 42
27  org.qt-project.QtWidgets      	0x000000010d4af096 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 294
28  org.qt-project.QtWidgets      	0x000000010d4b05f8 QApplication::notify(QObject*, QEvent*) + 504
29  org.qt-project.QtCore         	0x000000010e32b214 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 164
30  org.qt-project.QtWidgets      	0x000000010d4b8e20 QWidgetBackingStore::sendUpdateRequest(QWidget*, QWidgetBackingStore::UpdateTime) + 320
31  org.qt-project.QtWidgets      	0x000000010d4b955d QWidgetBackingStore::markDirty(QRect const&, QWidget*, QWidgetBackingStore::UpdateTime, QWidgetBackingStore::BufferState) + 141
32  org.qt-project.QtWidgets      	0x000000010d4f42e3 QWidget::repaint(QRect const&) + 211
33  org.qt-project.QtWidgets      	0x000000010d4f4204 QWidget::repaint() + 52
34  org.qt-project.QtWidgets      	0x000000010d59c913 QAbstractButtonPrivate::click() + 179
35  org.qt-project.QtWidgets      	0x000000010d59d990 QAbstractButton::mouseReleaseEvent(QMouseEvent*) + 272
36  org.qt-project.QtWidgets      	0x000000010d6766ff QToolButton::mouseReleaseEvent(QMouseEvent*) + 15
37  org.qt-project.QtWidgets      	0x000000010d4f077f QWidget::event(QEvent*) + 1535
38  org.qt-project.QtWidgets      	0x000000010d59d6e0 QAbstractButton::event(QEvent*) + 160
39  org.qt-project.QtWidgets      	0x000000010d676d25 QToolButton::event(QEvent*) + 325
40  org.qt-project.QtWidgets      	0x000000010d4af096 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 294
41  org.qt-project.QtWidgets      	0x000000010d4b2493 QApplication::notify(QObject*, QEvent*) + 8339
42  org.qt-project.QtCore         	0x000000010e32b214 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 164
43  org.qt-project.QtWidgets      	0x000000010d4afa4a QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) + 970
44  org.qt-project.QtWidgets      	0x000000010d512492 QWidgetWindow::handleMouseEvent(QMouseEvent*) + 1458
45  org.qt-project.QtWidgets      	0x000000010d51146e QWidgetWindow::event(QEvent*) + 238
46  org.qt-project.QtWidgets      	0x000000010d4af096 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 294
47  org.qt-project.QtWidgets      	0x000000010d4b05f8 QApplication::notify(QObject*, QEvent*) + 504
48  org.qt-project.QtCore         	0x000000010e32b214 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 164
49  org.qt-project.QtGui          	0x000000010dbb9c7d QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) + 2877
50  org.qt-project.QtGui          	0x000000010dba1eeb QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 203
51  libqcocoa.dylib               	0x0000000116c0e441 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 33
52  com.apple.CoreFoundation      	0x00007fff8b642a01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
53  com.apple.CoreFoundation      	0x00007fff8b634b8d __CFRunLoopDoSources0 + 269
54  com.apple.CoreFoundation      	0x00007fff8b6341bf __CFRunLoopRun + 927
55  com.apple.CoreFoundation      	0x00007fff8b633bd8 CFRunLoopRunSpecific + 296
56  com.apple.HIToolbox           	0x00007fff87a7056f RunCurrentEventLoopInMode + 235
57  com.apple.HIToolbox           	0x00007fff87a701ee ReceiveNextEventCommon + 179
58  com.apple.HIToolbox           	0x00007fff87a7012b _BlockUntilNextEventMatchingListInModeWithFilter + 71
59  com.apple.AppKit              	0x00007fff885378ab _DPSNextEvent + 978
60  com.apple.AppKit              	0x00007fff88536e58 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
61  com.apple.AppKit              	0x00007fff8852caf3 -[NSApplication run] + 594
62  libqcocoa.dylib               	0x0000000116c0d34f QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2191
63  org.qt-project.QtCore         	0x000000010e3273d1 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 417
64  org.qt-project.QtCore         	0x000000010e32b885 QCoreApplication::exec() + 341
65  digikam                       	0x000000010752a1dc main + 9084
66  libdyld.dylib                 	0x00007fff85b625c9 start + 1
Comment 1 caulier.gilles 2016-07-16 09:22:19 UTC
How do you setup your external DB ?
Which DB settings do you use exactly ?

Here i use an external MariaDB server running under Linux with an OSX client, and crash is not reproducible...

Gilles Caulier
Comment 2 bcr 2016-07-16 09:31:43 UTC
I get this warning when I start up:

   Error message: Error opening database backend.
   Unknown database 'digikam_thumbs' QMYSQL: Unable to connect

I didn't specify any options in the configuration dialog except for the names of the three databases requested: 'digikam', 'digikam_thumbs', and 'digikam_faces'.

Username chosen was 'digikam', not 'root' as shown in the requirements tab
Comment 3 bcr 2016-07-16 09:42:02 UTC
In the DB I gave the digikam user every possible privilege, pretty much admin level rights.
Comment 4 caulier.gilles 2016-07-16 09:46:31 UTC
Well, your DK is not connected to Mysql server.

Did you follow instruction in DK.setup/DB pages to init the remove digiKam DB ? This is what i used to test and it work fine.

You can use different DB names without problem.

Gilles Caulier
Comment 5 bcr 2016-07-16 09:50:39 UTC
Well, its partially connected. 

I can see a populated 'digikam' table full of data that got created on my few images. I just don't see the other two tables mentioned.  Not sure what could have prevented their creation.
Comment 6 bcr 2016-07-16 09:55:59 UTC
correction: its a digikam database with about 20 tables and one view in it.  Just no sign of the other databases.
Comment 7 bcr 2016-07-16 10:07:16 UTC
This is a first-time digiKam installation on both OSX and the remote MariaDB
Comment 8 caulier.gilles 2016-07-16 11:40:56 UTC
I recommend to re-init Mysql database and re-create it using the procedure given in DB setup panel. Look 'Requirements" tab for details.

Gilles Caulier
Comment 9 caulier.gilles 2016-07-16 12:21:28 UTC
My setup for ex :
digikam version 5.0.0
Images: 
JPG: 11501
PGF: 1
PNG: 237
PPM: 5
RAW-ARW: 212
RAW-CR2: 63
RAW-CRW: 10
RAW-DCR: 3
RAW-DNG: 81
RAW-HDR: 1
RAW-MRW: 36
RAW-NEF: 39
RAW-ORF: 4
RAW-PEF: 10
RAW-RAF: 153
RAW-RAW: 4
RAW-RW2: 1
RAW-RWL: 1
RAW-X3F: 4
TIFF: 39
XCF: 3
total: 12408
: 
Videos: 
3GP: 1
AVI: 2
MKV: 1
MOV: 4
MP4: 3
MPEG: 1
total: 12
: 
Total Items: 12420
Albums: 5921
Tags: 178
: 
Database backend: QMYSQL
Host Name: 192.168.1.20
Host Port: 3306
User account: digikamuser
Connect options: 
Core Db name: digikamOSX
Thumbs Db name: digikamOSX
Face Db name: digikamOSX

To init the database on server :

CREATE USER 'digikamuser'@'%' IDENTIFIED BY 'password';
GRANT ALL ON *.* TO 'digikamuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE digikamOSX;
GRANT ALL PRIVILEGES ON digikamOSX.* TO 'digikamuser'@'%';
FLUSH PRIVILEGES;

Gilles Caulier
Comment 10 caulier.gilles 2016-07-16 12:25:50 UTC
Screenshot of DK 5.0.0 in action under OSX with a remote MAriaDB database running under Linux server :

https://www.flickr.com/photos/digikam/28263744781

Gilles Caulier
Comment 11 bcr 2016-07-16 19:40:58 UTC
Ah, ok.  I guess I’m playing the part of the clueless user, I didn’t fully read the requirements tab and know that I had to execute a script.

Its odd that digiKam would create the first database but not the others though.  Being unable to reach a db should not cause digiKam to crash however, network issues could cause the same problem.

I’ll put some UI suggestions in another post.

Thanks for looking into it.