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 loading device preset when a File Sink exists #1427

Closed
srcejon opened this issue Sep 19, 2022 · 1 comment
Closed

Crash when loading device preset when a File Sink exists #1427

srcejon opened this issue Sep 19, 2022 · 1 comment
Assignees
Labels

Comments

@srcejon
Copy link
Collaborator

srcejon commented Sep 19, 2022

SDRangel can crash if there is a File Sink in the GUI, when loading a Device Set Preset. It looks like the FileSink object is deleted before the FileSinkGUI object, as the in the log, we can see the destructor called first:

2022-09-19 19:40:03.930 (D) FileSink::~FileSink
2022-09-19 19:40:03.931 (D) DSPDeviceSourceEngine::removeSink: FileSink
2022-09-19 19:40:03.931 (D) DSPDeviceSourceEngine::handleSynchronousMessages: DSPRemoveBasebandSampleSink
2022-09-19 19:40:03.931 (D) FileSink::stop:
2022-09-19 19:40:03.932 (D) FileSinkBaseband::~FileSinkBaseband
2022-09-19 19:40:03.932 (D) FileSinkBaseband::stopWork
2022-09-19 19:40:03.936 (D) FFTFactory::releaseEngine: engineSequence: 1 FFT fwd size: 1024

And the crash is in:

FileSinkGUI::~FileSinkGUI()
{
m_fileSink->setMessageQueueToGUI(nullptr);

With m_fileSink being invalid.

Stack trace on Windows.

image

But crashes on Linux too.

Seems to be as a result of the fix for the reverse case of the FileSinkGUI being deleted before the FileSink!

#1356

(I would imagine the GUI should be deleted first, as it was created last)

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