Bug 348030 - crash on startup because of segmentation fault (SKGmainPanel::displayMessage)
Summary: crash on startup because of segmentation fault (SKGmainPanel::displayMessage)
Status: RESOLVED INTENTIONAL
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: 1.12
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Stephane MANKOWSKI
URL:
Keywords:
: 348116 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-05-20 22:07 UTC by Gilles Habran
Modified: 2016-02-15 14:40 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Complete log from KDE Crash Handler (3.83 KB, text/plain)
2015-05-20 22:08 UTC, Gilles Habran
Details
t.txt (skgtrace 10) (298 bytes, text/plain)
2015-05-21 21:08 UTC, Gilles Habran
Details
New crash information added by DrKonqi (7.04 KB, text/plain)
2016-02-15 12:50 UTC, Sebastian Audet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gilles Habran 2015-05-20 22:07:30 UTC
Qt: 4.8.6
KDE Development Platform: 4.14.8
Skrooge: 1.12.0
sqlite 3.8.10.1-1

When starting with the icon, the crash handler says :

Thread 1 (Thread 0x7f5370e21800 (LWP 5247)):
[KCrash Handler]
#6  0x00007f536ee44574 in QWidget::layout() const () from /usr/lib/libQtGui.so.4
#7  0x00007f5370a24c69 in SKGMainPanel::displayMessage(QString const&, SKGDocument::MessageType) () from /usr/lib/libskgbasegui.so.1
#8  0x00007f5370a24a90 in SKGMainPanel::displayErrorMessage(QString const&) () from /usr/lib/libskgbasegui.so.1
#9  0x00007f5370a25f6e in SKGMainPanel::displayErrorMessage(SKGError const&, QAction*) () from /usr/lib/libskgbasegui.so.1



When I start from a terminal, I get this :

##WARNING: QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
##WARNING: QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
KCrash: Application 'skrooge' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
KCrash: Connect sock_file=/home/gillouche/.kde4/socket-arch/kdeinit4__0
##CRITICAL: unnamed app(6713): Communication problem with  "skrooge" , it probably crashed. 
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Message did not receive a reply (timeout by message bus)" " 




I tried to compile Skrooge with the source from the git repo but I cannot run the software because of the following problem :
################################################
##STARTING TEST
##homePath=/home/gillouche
################################################
##Only failures will be displayed
filename1=./tests/input/filename1_e.skg
skgtestfile(5209): couldn't create slave: "Unable to create io-slave:
klauncher said: Unknown protocol ''.
" 



I tried to find how to fix that and found some help with "kbuildsycoca5" but here is the output (which seems to be what other people have) 

kbuildsycoca5         
Could not find drkonqi at /usr/lib/drkonqi
kbuildsycoca5 running...
kf5.kservice.sycoca: Trying to open ksycoca from "/home/gillouche/.cache/ksycoca5"
Reusing existing ksycoca
Recreating ksycoca file ("/home/gillouche/.cache/ksycoca5", version 300)
Still in the time dict (i.e. deleted files) ("apps")
Parse error in  "/home/gillouche/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu" , line  1 , col  1 :  "unexpected end of file"
Menu "applications-kmenuedit.menu" not found.
Saving
Emitting notifyDatabaseChanged ("apps")



Could it be a bad setup on my side ? Am I missing something ? I found the same kind of error (klauncher, io-slave) in the bug reports because of sqlite but they are from 2012 so I don't think it is related.




Reproducible: Always

Steps to Reproduce:
1. start Skrooge with icon
2. KDE Crash Handler appears with stacktrace
Comment 1 Gilles Habran 2015-05-20 22:08:54 UTC
Created attachment 92747 [details]
Complete log from KDE Crash Handler
Comment 2 Stephane MANKOWSKI 2015-05-21 20:47:05 UTC
Hi,

This crash is very strange.
I don't really understand why some libraries of Skrooge are built in debug mode (libskgbasegui.so) and some other not (skg_file.so).

This could help me if you are able to build all libraries in debug mode to have a better call stack.

Could you try to do that too?
export SKGTRACE=10
skrooge --nofork > t.txt 2>&1
And send me t.txt

Thank you.
Comment 3 Gilles Habran 2015-05-21 21:08:18 UTC
Created attachment 92773 [details]
t.txt (skgtrace 10)

Used to get the file :

export SKGTRACE=10
skrooge --nofork > t.txt 2>&1
Comment 4 Gilles Habran 2015-05-21 21:30:40 UTC
I just tried to compile skrooge (source from git) in debug mode with cmake and launch it and it works.
Should I try to compile the source from git in release mode and manually install it on my system ?

The one I download from the arch repository does not work.
I have the file t.txt from the debug binary that works.
Comment 5 Stephane MANKOWSKI 2015-05-22 06:18:01 UTC
I think the crash was due to unaligned libraries.
If you build skrooge in release mode and install it then this should work correctly.
Comment 6 Stephane MANKOWSKI 2015-05-22 06:18:33 UTC
I close this incident.
Reopen it if needed.
Comment 7 Stephane MANKOWSKI 2015-05-23 11:33:26 UTC
*** Bug 348116 has been marked as a duplicate of this bug. ***
Comment 8 Sebastian Audet 2016-02-15 12:50:05 UTC
Created attachment 97230 [details]
New crash information added by DrKonqi

skrooge (1.11.0) on KDE Platform 4.14.7 using Qt 4.8.6

- What I was doing when the application crashed:

startup from krunner

Would like to re-open the parent bug, reading through the logs it doesn't appear anything was fixed.

-- Backtrace (Reduced):
#6  QWidget::layout (this=0x100f602f6020300) at kernel/qwidget.cpp:9780
#7  0x00007f60ee343de9 in SKGMainPanel::displayMessage (this=0x2423b50, iMessage=..., iType=SKGDocument::Error) at /usr/src/debug/skrooge-1.11.0/skgbasegui/skgmainpanel.cpp:2212
#8  0x00007f60ee343c10 in SKGMainPanel::displayErrorMessage (this=this@entry=0x2423b50, iMessage=...) at /usr/src/debug/skrooge-1.11.0/skgbasegui/skgmainpanel.cpp:2243
#9  0x00007f60ee34515e in SKGMainPanel::displayErrorMessage (iError=..., iAction=iAction@entry=0x0) at /usr/src/debug/skrooge-1.11.0/skgbasegui/skgmainpanel.cpp:2254
#10 0x00007f607f9a94ee in SKGFilePlugin::onNew (this=this@entry=0x283e7f0) at /usr/src/debug/skrooge-1.11.0/plugins/generic/skg_file/skgfileplugin.cpp:300
Comment 9 Stephane MANKOWSKI 2016-02-15 14:40:57 UTC
Hi Sebastian,

This incident has not been fixed because it was due to a bad alignment of libraries.
Means, that skrooge has been built on a version of KDE/Qt and the user tried to run it on a new version of KDE/Qt.

To be sure, could you try rebuild Skrooge? 
I think you won't have the issue anymore.