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

Crash when opening Demod Analyzer #1183

Closed
srcejon opened this issue Mar 22, 2022 · 7 comments
Closed

Crash when opening Demod Analyzer #1183

srcejon opened this issue Mar 22, 2022 · 7 comments
Labels
Milestone

Comments

@srcejon
Copy link
Collaborator

srcejon commented Mar 22, 2022

Opening the Demod Analyzer Feature crashes SDRangel on both Windows and Linux for the latest code on master branch.

Thread 1 "sdrangel" received signal SIGSEGV, Segmentation fault.
0x00007ffff7ca1934 in GLScope::setYScale(ScaleEngine&, unsigned int) () from /opt/install/sdrangel/lib/sdrangel/libsdrgui.so
(gdb) info stack
#0 0x00007ffff7ca1934 in GLScope::setYScale(ScaleEngine&, unsigned int) () at /opt/install/sdrangel/lib/sdrangel/libsdrgui.so
#1 0x00007ffff7ca59a7 in GLScope::applyConfig() () at /opt/install/sdrangel/lib/sdrangel/libsdrgui.so
#2 0x00007ffff7ca6090 in GLScope::paintGL() () at /opt/install/sdrangel/lib/sdrangel/libsdrgui.so
#3 0x00007ffff6d6de05 in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4 0x00007ffff6d4b2b6 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5 0x00007ffff6d08a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#6 0x00007ffff6d120f0 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7 0x00007ffff62ee80a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007ffff6d43f4a in QWidgetPrivate::sendPaintEvent(QRegion const&) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9 0x00007ffff6d6dc2f in QOpenGLWidget::resizeEvent(QResizeEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff6d4b947 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff6d08a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff6d120f0 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff62ee80a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007ffff6d43e6e in QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff6d47bd7 in QWidgetPrivate::show_helper() () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff6d4ad6b in QWidgetPrivate::setVisible(bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff6d47b61 in QWidgetPrivate::showChildren(bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff6d47bf3 in QWidgetPrivate::show_helper() () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ffff6d4ad6b in QWidgetPrivate::setVisible(bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007ffff6d47b61 in QWidgetPrivate::showChildren(bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007ffff6d47bf3 in QWidgetPrivate::show_helper() () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff6d4ad6b in QWidgetPrivate::setVisible(bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ffff6ebc59e in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007fffab0b1392 in DemodAnalyzerGUI::DemodAnalyzerGUI(PluginAPI*, FeatureUISet*, Feature*, QWidget*) ()
at /opt/install/sdrangel/lib/sdrangel/plugins/libfeaturedemodanalyzer.so
#25 0x00007fffab0b1629 in DemodAnalyzerGUI::create(PluginAPI*, FeatureUISet*, Feature*) ()
at /opt/install/sdrangel/lib/sdrangel/plugins/libfeaturedemodanalyzer.so
#26 0x00007ffff7cde0b3 in MainWindow::featureAddClicked(int) () at /opt/install/sdrangel/lib/sdrangel/libsdrgui.so
#27 0x00007ffff631a1d0 in QMetaObject::activate(QObject*, int, int, void**) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007ffff7cf31a2 in FeaturesDock::addFeature(int) () at /opt/install/sdrangel/lib/sdrangel/libsdrgui.so
#29 0x00007ffff631a328 in QMetaObject::activate(QObject*, int, int, void**) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00007ffff7cf3202 in FeatureAddDialog::addFeature(int) () at /opt/install/sdrangel/lib/sdrangel/libsdrgui.so
#31 0x00007ffff631a1d0 in QMetaObject::activate(QObject*, int, int, void**) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007ffff6ea4333 in QDialogButtonBox::clicked(QAbstractButton*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007ffff6ea4af9 in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007ffff631a1d0 in QMetaObject::activate(QObject*, int, int, void**) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007ffff6dfd806 in QAbstractButton::clicked(bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007ffff6dfda2e in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#37 0x00007ffff6dfee73 in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#38 0x00007ffff6dff035 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007ffff6d4b2b6 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#40 0x00007ffff6d08a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#41 0x00007ffff6d12343 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#42 0x00007ffff62ee80a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x00007ffff6d11457 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool, bool) ()
at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#44 0x00007ffff6d6735d in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#45 0x00007ffff6d6a1ec in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#46 0x00007ffff6d08a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#47 0x00007ffff6d120f0 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#48 0x00007ffff62ee80a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#49 0x00007ffff66d97d3 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#50 0x00007ffff66db10b in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#51 0x00007ffff66b535b in QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#52 0x00007ffff143032e in () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#53 0x00007ffff49b817d in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#54 0x00007ffff49b8400 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#55 0x00007ffff49b84a3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#56 0x00007ffff6346435 in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#57 0x00007ffff62ed3ab in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#58 0x00007ffff6f0cc6d in QDialog::exec() () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#59 0x00007ffff631a328 in QMetaObject::activate(QObject*, int, int, void**) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#60 0x00007ffff6dfd806 in QAbstractButton::clicked(bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#61 0x00007ffff6dfda2e in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#62 0x00007ffff6dfee73 in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#63 0x00007ffff6dff035 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#64 0x00007ffff6d4b2b6 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#65 0x00007ffff6d08a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#66 0x00007ffff6d12343 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#67 0x00007ffff62ee80a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#68 0x00007ffff6d11457 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool, bool) ()
--Type for more, q to quit, c to continue without paging--
at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#69 0x00007ffff6d6735d in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#70 0x00007ffff6d6a1ec in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#71 0x00007ffff6d08a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#72 0x00007ffff6d120f0 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#73 0x00007ffff62ee80a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#74 0x00007ffff66d97d3 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#75 0x00007ffff66db10b in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#76 0x00007ffff66b535b in QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#77 0x00007ffff143032e in () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#78 0x00007ffff49b817d in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#79 0x00007ffff49b8400 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#80 0x00007ffff49b84a3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#81 0x00007ffff6346435 in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#82 0x00007ffff62ed3ab in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#83 0x00007ffff62f5116 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#84 0x0000555555557099 in runQtApplication(int, char**, qtwebapp::LoggerWithFile*) ()
#85 0x00005555555566ed in main ()

@srcejon
Copy link
Collaborator Author

srcejon commented Mar 23, 2022

Not sure if it's related, but occasionally seeing a crash on windows when starting SDRangel on Windows with a debug build that looks related to the new FlowLayout:

image

@srcejon
Copy link
Collaborator Author

srcejon commented Mar 23, 2022

Also less occasionally see a crash when adding a new Source Device Set

image

@srcejon
Copy link
Collaborator Author

srcejon commented Mar 23, 2022

In the log, I see:

QWidget::setLayout: Attempting to set QLayout "" on GLSpectrumGUI "GLSpectrumGUI", which already has a layout

@f4exb
Copy link
Owner

f4exb commented Mar 23, 2022

That's maybe a Qt Creator woe... There is the possibility to have no layout specified for the top element maybe this should be done so.

@f4exb f4exb added the bug label Mar 24, 2022
@f4exb
Copy link
Owner

f4exb commented Mar 24, 2022

QWidget::setLayout: Attempting to set QLayout "" on GLSpectrumGUI "GLSpectrumGUI", which already has a layout
is fixed by changing: https://github.com/f4exb/sdrangel/blob/master/sdrgui/gui/glspectrumgui.cpp#L54 to:

 FlowLayout *flowLayout = new FlowLayout(nullptr, 1, 1, 1);

...but this is not related.

@f4exb
Copy link
Owner

f4exb commented Mar 25, 2022

I don't know exactly why yet but the problem is in this if block: https://github.com/f4exb/sdrangel/blob/master/sdrgui/gui/featurewindow.cpp#L41

This is the only difference between FeatureWindow::addRollupWidget and ChannelWindow::addRollupWidget which is used in the case of the Channel Analyzer that works. Indeed when commenting out the top block thus making both the same the Demod Analyzer displays properly.

A possibility is that GLScope::paintGL is called too early maybe because the repaint method is called in one case and not the other.

@f4exb
Copy link
Owner

f4exb commented Mar 25, 2022

A possible fix is to move m_featureUISet->addRollupWidget(this); after the timer is connected which is supposed to activate the update method as expected..

@f4exb f4exb closed this as completed in dde85ee Mar 25, 2022
@f4exb f4exb added this to the v6.20.2 milestone Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants