Bug 389687 - kmymoney: sigsev since 2d3c8b6e981b135be8a0a206b998539fbacdb689
Summary: kmymoney: sigsev since 2d3c8b6e981b135be8a0a206b998539fbacdb689
Status: RESOLVED NOT A BUG
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-31 13:02 UTC by José Pekkarinen
Modified: 2018-01-31 19:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
strace of execution. (917.66 KB, text/plain)
2018-01-31 13:02 UTC, José Pekkarinen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description José Pekkarinen 2018-01-31 13:02:07 UTC
Created attachment 110259 [details]
strace of execution.

Hi,

I hit a crash during initialization since the following commit:

commit 2d3c8b6e981b135be8a0a206b998539fbacdb689
Author: Thomas Baumgart <thb@net-bembel.de>
Date:   Tue Jan 23 08:12:02 2018 +0100

    Force usage of global settings in plugins
    
    Since the plugins are shared objects also, we need to inject the global
    settings object in the same way as has been implemented with commit
    5a1b6235c8ed0775f9f7ade3f274678c1ddfa268
    
    BUG: 388963

Dropping the buggy patch from history makes kmymoney works again. I'm sitting
on top of a97a23ac97786718c99a850a62f84a369f27055d on 5.0 branch right now.
The terminal outputs the following:

$ ./kmymoney
QPainter::begin: Paint device returned engine == 0, type: 2
Using Wayland-EGL
WebConnect: Try to connect to WebConnect server
WebConnect: Connect to server failed
WebConnect: Running in server mode
QFSFileEngine::open: No file name specified
Plugins: printcheck loaded
Segmentation fault

Any input needed can be offered on demand.

Thanks!

José.
Comment 1 Thomas Baumgart 2018-01-31 13:21:04 UTC
The problem is some leftover module from a previous compile/install:

/usr/lib64/qt5/plugins/kmymoney/printcheck.so

The checkprinting plugin has been renamed from printcheck to checkprinting and it appears you did not 'uninstall' the previous version. The old printcheck.so does not work with the updated interface anymore. Please fix manually.

I found the following instances in your attached strace:

/etc/xdg/printcheckpluginrc
/home/pekkari/.config/printcheckpluginrc
/home/pekkari/.local/share/kxmlgui5/printcheck/printcheck.rc
/home/pekkari/.local/share/printcheck/check_template.html
/home/pekkari/.local/share/printcheck/printcheck.rc
/home/pekkari/.local/share/printcheck.rc
Plugins: printcheck loaded\n
/usr/lib64/qt5/plugins/kmymoney/printcheck.so
/usr/local/share/kxmlgui5/printcheck/printcheck.rc
/usr/local/share/printcheck/check_template.html
/usr/local/share/printcheck/printcheck.rc
/usr/local/share/printcheck.rc
/usr/share/kmm_printcheck/check_template.html
/usr/share/kxmlgui5/printcheck/printcheck.rc
/usr/share/printcheck/check_template.html
/usr/share/printcheck/printcheck.rc
/usr/share/printcheck.rc

Please report back or close the bug as fixed.
Comment 2 José Pekkarinen 2018-01-31 14:30:12 UTC
Yes, it's an out of the path build, it should ignore the former names and go along I believe.
Comment 3 José Pekkarinen 2018-01-31 15:08:14 UTC
well, something else has to be around:

localhost /usr/share # ls /usr/lib64/qt5/plugins/kmymoney/printcheck.so
ls: cannot access '/usr/lib64/qt5/plugins/kmymoney/printcheck.so': No such file or directory
localhost /usr/share # ls /etc/xdg/printcheckpluginrc
ls: cannot access '/etc/xdg/printcheckpluginrc': No such file or directory
localhost /usr/share # ls /home/pekkari/.config/printcheckpluginrc
/home/pekkari/.config/printcheckpluginrc
localhost /usr/share # mv /home/pekkari/.config/printcheckpluginrc /home/pekkari/.config/kmy4.printcheckpluginrc
localhost /usr/share # ls /home/pekkari/.config/printcheckpluginrc
ls: cannot access '/home/pekkari/.config/printcheckpluginrc': No such file or directory
localhost /usr/share # ls /home/pekkari/.local/share/kxmlgui5/printcheck/printcheck.rc
ls: cannot access '/home/pekkari/.local/share/kxmlgui5/printcheck/printcheck.rc': No such file or directory
localhost /usr/share # ls /home/pekkari/.local/share/printcheck/check_template.html
ls: cannot access '/home/pekkari/.local/share/printcheck/check_template.html': No such file or directory
localhost /usr/share # ls /home/pekkari/.local/share/printcheck/printcheck.rc
ls: cannot access '/home/pekkari/.local/share/printcheck/printcheck.rc': No such file or directory
localhost /usr/share # ls /home/pekkari/.local/share/printcheck.rc
ls: cannot access '/home/pekkari/.local/share/printcheck.rc': No such file or directory
localhost /usr/share # ls /usr/lib64/qt5/plugins/kmymoney/printcheck.so
ls: cannot access '/usr/lib64/qt5/plugins/kmymoney/printcheck.so': No such file or directory
localhost /usr/share # ls /usr/local/share/kxmlgui5/printcheck/printcheck.rc
ls: cannot access '/usr/local/share/kxmlgui5/printcheck/printcheck.rc': No such file or directory
localhost /usr/share # ls /usr/local/share/printcheck/check_template.html
ls: cannot access '/usr/local/share/printcheck/check_template.html': No such file or directory
localhost /usr/share # ls /usr/local/share/printcheck/printcheck.rc
ls: cannot access '/usr/local/share/printcheck/printcheck.rc': No such file or directory
localhost /usr/share # ls /usr/local/share/printcheck.rc
ls: cannot access '/usr/local/share/printcheck.rc': No such file or directory
localhost /usr/share # ls /usr/share/kmm_printcheck/check_template.html
ls: cannot access '/usr/share/kmm_printcheck/check_template.html': No such file or directory
localhost /usr/share # ls /usr/share/kxmlgui5/printcheck/printcheck.rc
ls: cannot access '/usr/share/kxmlgui5/printcheck/printcheck.rc': No such file or directory
localhost /usr/share # ls /usr/share/printcheck/check_template.html
ls: cannot access '/usr/share/printcheck/check_template.html': No such file or directory
localhost /usr/share # ls /usr/share/printcheck/printcheck.rc
ls: cannot access '/usr/share/printcheck/printcheck.rc': No such file or directory
localhost /usr/share # ls /usr/share/printcheck.rc
ls: cannot access '/usr/share/printcheck.rc': No such file or directory

...

$ kmymoney
Using Wayland-EGL
WebConnect: Try to connect to WebConnect server
WebConnect: Connect to server failed
WebConnect: Starting server failed. Try to remove stale socket.
WebConnect: Running in server mode
Plugins: checkprinting loaded
QIODevice::read (QFile, "/usr/share/kmm_printcheck/check_template.html"): device not open
Plugins: csvexporter loaded
Plugins: csvimporter loaded
Plugins: gncimporter loaded
Plugins: icalendarexporter loaded
cannot find .rc file "printcheck.rc" for component "printcheck"
Plugins: printcheck loaded
QFSFileEngine::open: No file name specified
QIODevice::read (QFile, ""): device not open
Segmentation fault
Comment 4 Thomas Baumgart 2018-01-31 15:35:33 UTC
As long as you see the line

Plugins: printcheck loaded

it finds and loads the old plugin. You may consult the strace output again to check where that comes from. For me it looks as follows (I have all available plugins installed):

WebConnect: Try to connect to WebConnect server
WebConnect: Connect to server failed
WebConnect: Running in server mode
Plugins: checkprinting loaded
Plugins: csvexporter loaded
Plugins: csvimporter loaded
Plugins: gncimporter loaded
Plugins: icalendarexporter loaded
Plugins: kbanking loaded
Plugins: kbanking pluged
Plugins: ofximporter loaded
Plugins: qifexporter loaded
Plugins: qifimporter loaded
Plugins: reconciliation report loaded
Plugins: weboob loaded

You can resolve the message

QIODevice::read (QFile, "/usr/share/kmm_printcheck/check_template.html"): device not open

once the application is running in the settings of the checkprinting plugin by entering the correct name (should be /usr/share/checkprinting/check_template.html)
Comment 5 José Pekkarinen 2018-01-31 17:11:49 UTC
Well, I hope it would be that easy:

$ kmymoney
Using Wayland-EGL
WebConnect: Try to connect to WebConnect server
WebConnect: Connect to server failed
WebConnect: Starting server failed. Try to remove stale socket.
WebConnect: Running in server mode
Plugins: checkprinting loaded
QIODevice::read (QFile, "/usr/share/kmm_printcheck/check_template.html"): device not open
Plugins: csvexporter loaded
Plugins: csvimporter loaded
Plugins: gncimporter loaded
Plugins: icalendarexporter loaded
Plugins: qifexporter loaded
Plugins: qifimporter loaded
Plugins: reconciliation report loaded
Plugins: weboob loaded
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted

No more printcheck, but no kmymoney either...

Thread 1 "kmymoney" received signal SIGSEGV, Segmentation fault.
QList<QString>::node_copy (this=<optimized out>, src=0x5554f36c33c0, to=0x7fffc5143798, from=<optimized out>) at /usr/include/qt5/QtCore/qlist.h:471
471                     new (current) T(*reinterpret_cast<T*>(src));

#0  QList<QString>::node_copy (this=<optimized out>, src=0x5554f36c33c0, to=0x7fffc5143798, from=<optimized out>) at /usr/include/qt5/QtCore/qlist.h:471
#1  QList<QString>::detach_helper_grow (this=this@entry=0x555555e3c280, i=<optimized out>, i@entry=2147483647, c=c@entry=1) at /usr/include/qt5/QtCore/qlist.h:754
#2  0x00007fffd44858b1 in QList<QString>::append (this=this@entry=0x555555e3c280, t=...) at /usr/include/qt5/QtCore/qlist.h:578
#3  0x00007fffd44820cc in QStringList::operator<< (str=..., this=0x555555e3c280) at /usr/include/qt5/QtCore/qstringlist.h:126
#4  Weboob::protocols (this=<optimized out>, protocolList=...) at /home/pekkari/kde/kmymoney/kmymoney/plugins/weboob/weboob.cpp:72
#5  0x000055555564a81c in ?? ()
#6  0x0000555555640938 in ?? ()
#7  0x0000555555621b0f in ?? ()
#8  0x00007ffff0cb6541 in __libc_start_main () from /lib64/libc.so.6
#9  0x0000555555623c3a in _start ()
Comment 6 Thomas Baumgart 2018-01-31 18:39:35 UTC
Looks like your weboob plugin is also outdated. Did you build it afresh? You can check with

  grep weboob install_manifest.txt 

in your build directory. I see three lines. If you don't see them, remove the following files manually:

/usr/share/weboob/weboob.py
/usr/share/kxmlgui5/weboob/weboob.rc
/usr/lib64/qt5/plugins/kmymoney/weboob.so
Comment 7 José Pekkarinen 2018-01-31 19:38:15 UTC
Bingo!

$ ls -la /usr/lib64/qt5/plugins/kmymoney/weboob.so                                                                                                                                                                             
-rwxr-xr-x 1 root root 3156968 Jan  5 13:03 /usr/lib64/qt5/plugins/kmymoney/weboob.so

# rm /usr/lib64/qt5/plugins/kmymoney/weboob.so

$ kmymoney
Using Wayland-EGL                                                                                                                                                                                                                                                              
WebConnect: Try to connect to WebConnect server                                                                                                                                                                                                                                
WebConnect: Connect to server failed                                                                                                                                                                                                                                           
WebConnect: Starting server failed. Try to remove stale socket.                                                                                                                                                                                                                
WebConnect: Running in server mode                                                                                                                                                                                                                                             
Plugins: checkprinting loaded                                                                                                                                                                                                                                                  
QIODevice::read (QFile, "/usr/share/kmm_printcheck/check_template.html"): device not open                                                                                                                                                                                      
Plugins: csvexporter loaded                                                                                                                                                                                                                                                    
Plugins: csvimporter loaded                                                                                                                                                                                                                                                    
Plugins: gncimporter loaded
Plugins: icalendarexporter loaded
Plugins: qifexporter loaded
Plugins: qifimporter loaded
Plugins: reconciliation report loaded
Cost center model created with items 0
Payees model created with items 0
reading file
start parsing file
startDocument
reading securities
endDocument
Plugins: checkprinting unloaded
Plugins: csvexporter unloaded
Plugins: csvimporter unloaded
Plugins: gncimporter unloaded
Plugins: icalendarexporter unloaded
Plugins: qifexporter unloaded
Plugins: qifimporter unloaded
Plugins: reconciliation report unloaded

Thanks!

Closing.