Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault of Qt5 on Linux #789

Closed
mfridge opened this issue Jan 2, 2019 · 5 comments

Comments

Projects
None yet
4 participants
@mfridge
Copy link

commented Jan 2, 2019

Describe the issue

I compiled PIVX on my linux machine. The following issue applies to both, version 3.1.1 and the latest master. PIVX is compiled against Qt5 version 5.10.1.

pivxd runs without any issues. When running pivx-qt however, the initial splash-screen showing "loading block index" etc. is correctly shown, but afterwards, as soon as the wallet interface should be drawn, pivx-qt crashes with a segmentation fault.

Any extra information that might be useful in the debugging process.

Backtrace of gdb:

Thread 1 "pivx-qt" received signal SIGSEGV, Segmentation fault.
0x00007ffff669d96e in ?? () from /usr/lib64/libQt5Widgets.so.5
(gdb) bt
#0  0x00007ffff669d96e in ?? () from /usr/lib64/libQt5Widgets.so.5
#1  0x00007ffff669da98 in ?? () from /usr/lib64/libQt5Widgets.so.5
#2  0x00007ffff662a577 in QWidgetPrivate::inheritStyle() ()
   from /usr/lib64/libQt5Widgets.so.5
#3  0x00007ffff662a3e8 in QWidgetPrivate::setStyle_helper(QStyle*, bool, bool) ()
   from /usr/lib64/libQt5Widgets.so.5
#4  0x00007ffff662a6cb in QWidgetPrivate::inheritStyle() ()
   from /usr/lib64/libQt5Widgets.so.5
#5  0x00007ffff663aebe in QWidget::setParent(QWidget*, QFlags<Qt::WindowType>) ()
   from /usr/lib64/libQt5Widgets.so.5
#6  0x00007ffff661795e in QLayout::addChildWidget(QWidget*) ()
   from /usr/lib64/libQt5Widgets.so.5
#7  0x00007ffff661d96d in QStackedLayout::insertWidget(int, QWidget*) ()
   from /usr/lib64/libQt5Widgets.so.5
#8  0x000055555566343b in WalletFrame::addWallet (this=0x5555566b8a70, name=..., 
    walletModel=0x555556b42810) at qt/walletframe.cpp:53
#9  0x00005555555e4b86 in BitcoinApplication::initializeResult (
    this=0x7fffffffd9f0, retval=<optimized out>) at qt/pivx.cpp:438
#10 0x00005555555e52cb in BitcoinApplication::qt_static_metacall (
    _o=0x7fffffffd9f0, _c=<optimized out>, _id=<optimized out>, 
    _a=<optimized out>) at qt/pivx.moc:271
#11 0x00007ffff5974e9a in QObject::event(QEvent*) ()
   from /usr/lib64/libQt5Core.so.5
#12 0x00007ffff660096f in QApplication::event(QEvent*) ()
   from /usr/lib64/libQt5Widgets.so.5
#13 0x00007ffff65fae0c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib64/libQt5Widgets.so.5
#14 0x00007ffff66023cf in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib64/libQt5Widgets.so.5
#15 0x00007ffff594ac57 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /usr/lib64/libQt5Core.so.5
#16 0x00007ffff594dab1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5
#17 0x00007ffff599dce3 in ?? () from /usr/lib64/libQt5Core.so.5
#18 0x00007ffff0d75e27 in g_main_context_dispatch ()
   from /usr/lib64/libglib-2.0.so.0
#19 0x00007ffff0d76060 in ?? () from /usr/lib64/libglib-2.0.so.0
#20 0x00007ffff0d760ec in g_main_context_iteration ()
   from /usr/lib64/libglib-2.0.so.0
#21 0x00007ffff599dacf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#22 0x00007fffeb663fc1 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#23 0x00007ffff5949a4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
    () from /usr/lib64/libQt5Core.so.5
#24 0x00007ffff5952430 in QCoreApplication::exec() ()
   from /usr/lib64/libQt5Core.so.5
#25 0x00005555555c9e1b in main (argc=<optimized out>, argv=<optimized out>)
    at qt/pivx.cpp:635
@Warrows

This comment has been minimized.

Copy link
Collaborator

commented Jan 2, 2019

Current master is using QT 5.9.6. Your problem is probably related to using QT 5.10. Try installing QT 5.9.6 or using depends compilation.

@mfridge

This comment has been minimized.

Copy link
Author

commented Jan 3, 2019

Thanks for pointing me towards the depends compilation. It works with this contained Qt version.

@mfridge mfridge closed this Jan 3, 2019

@jpfleury

This comment has been minimized.

Copy link

commented May 14, 2019

I think I face the same issue. May it be possible to get the steps to solve it by using depends compilation? Thanks.

@Warrows

This comment has been minimized.

@meyer9

This comment has been minimized.

Copy link

commented May 15, 2019

In addWallet, the code initializing WalletView should parent to walletStack, not this:

    WalletView* walletView = new WalletView(walletStack);

Fixed in #900.

meyer9 added a commit to meyer9/Phore that referenced this issue May 15, 2019

Fix PIVX-Project#789
The walletView element should be parented to walletStack instead of the WalletFrame.

meyer9 added a commit to meyer9/Phore that referenced this issue May 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.