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

Satellite tracker crash on MacOs #1648

Open
loewal opened this issue Apr 1, 2023 · 28 comments
Open

Satellite tracker crash on MacOs #1648

loewal opened this issue Apr 1, 2023 · 28 comments
Assignees

Comments

@loewal
Copy link

loewal commented Apr 1, 2023

Compiled v.7.12 on MacOs Ventura.

Started with an empty workspace and added Satellite tracker
Crash with only: segmentation fault.

Did I start wrong...?

@srcejon srcejon self-assigned this Apr 3, 2023
@srcejon
Copy link
Collaborator

srcejon commented Apr 12, 2023

Adding Mac back trace posted in mailing list:

lldb) thread backtrace

* thread #22, name = 'QThread', stop reason = EXC_BAD_ACCESS (code=1, address=0x33fa8d30)
  * frame #0: 0x0000000100faf5e9 libsdrbase.dylib`ObjectPipesRegistrations::getPipes(QObject const*, QString const&, QList<ObjectPipe*>&) + 89
    frame #1: 0x00000001838c3610 libfeaturesatellitetracker.dylib`SatelliteTrackerWorker::update() + 3584
    frame #2: 0x0000000102ff78ef QtCore`___lldb_unnamed_symbol9624 + 159
    frame #3: 0x0000000102fe62e1 QtCore`QObject::event(QEvent*) + 113
    frame #4: 0x000000010282d886 QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 262
    frame #5: 0x000000010282ec0d QtWidgets`QApplication::notify(QObject*, QEvent*) + 477
    frame #6: 0x0000000102fbcd67 QtCore`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 167
    frame #7: 0x000000010301e2b5 QtCore`QTimerInfoList::activateTimers() + 1029
    frame #8: 0x000000010301c964 QtCore`QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 932
    frame #9: 0x0000000102fb9336 QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 502
    frame #10: 0x0000000102df406c QtCore`QThread::exec() + 140
    frame #11: 0x0000000102df4f60 QtCore`___lldb_unnamed_symbol7195 + 320
    frame #12: 0x00007ff80328a1d3 libsystem_pthread.dylib`_pthread_start + 125
    frame #13: 0x00007ff803285bd3 libsystem_pthread.dylib`thread_start + 15

And similar on ubuntu:

image

Both crashes appear to be in getPipes, rather than the Satellite Tracker. I've been unable to reproduce this on Windows, Linux or Mac. Do other plugins such as the AIS Feature crash?

Does the problem occur with the release .dmg as well as your own build?

@srcejon
Copy link
Collaborator

srcejon commented Apr 12, 2023

If just your own build, make sure you do a:

make clean

first, to ensure everything is rebuilt.

@loewal
Copy link
Author

loewal commented Apr 12, 2023 via email

@loewal
Copy link
Author

loewal commented Apr 12, 2023 via email

@loewal
Copy link
Author

loewal commented Apr 12, 2023 via email

@srcejon
Copy link
Collaborator

srcejon commented Apr 12, 2023

I always start with a clean start and then git pull etc. So…make clean, is that useful then?

If you start from an empty directory, then no need for make clean.

@srcejon
Copy link
Collaborator

srcejon commented Apr 12, 2023

Is it possible plugins from different builds are being mixed together?

Maybe do:

ls -l /opt/install/sdrangel/lib/sdrangel/plugins (or whereever you installed to)

And check the dates on the plugins match

@loewal
Copy link
Author

loewal commented Apr 12, 2023 via email

@srcejon
Copy link
Collaborator

srcejon commented Apr 13, 2023

Hmm. Built using your above script, and it works OK. What version of gcc are you using?

gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

@srcejon
Copy link
Collaborator

srcejon commented Apr 13, 2023

Can you also confirm exactly when it crashes and the exact steps you use.

  • Press Add feature
  • Press start in Satellite Tracker... then crashes or before?
  • Do you change any settings first?

@loewal
Copy link
Author

loewal commented Apr 13, 2023 via email

@srcejon
Copy link
Collaborator

srcejon commented Apr 13, 2023

This is the Ubuntu-version: gcc (Ubuntu 12.2.0-3ubuntu1)

Is it possible you built sgp4 library using gcc 11? If so, try rebuilding that.

@loewal
Copy link
Author

loewal commented Apr 13, 2023 via email

@srcejon
Copy link
Collaborator

srcejon commented Apr 13, 2023

Hmm. Running out of ideas.

What version of Qt is reported in SDRangel status bar? What version of Ubuntu?

Just tried Gcc 12 here and no problem.

@loewal
Copy link
Author

loewal commented Apr 13, 2023 via email

@srcejon
Copy link
Collaborator

srcejon commented Apr 13, 2023

Just rebuilt on Ubuntu 22.10 with gcc 12 and Qt 5.15.6 and still can't see the problem.

All I can really suggest is trying a debug build with cmake -DCMAKE_BUILD_TYPE=Debug ... then rerunning in the debugger, which should give the exact line the program is crashing on.

@srcejon
Copy link
Collaborator

srcejon commented Apr 13, 2023

Try the debug build on ubuntu, instead. As I can more easily reproduce that. Thanks

@loewal
Copy link
Author

loewal commented Apr 13, 2023 via email

@srcejon
Copy link
Collaborator

srcejon commented Apr 13, 2023

It's just an issue when optimisation is disabled. I'll take a look tomorrow, but for now, you can skip it with cmake -DENABLE_CHANNELRX_LOCALSINK=OFF

@loewal
Copy link
Author

loewal commented Apr 14, 2023 via email

@loewal
Copy link
Author

loewal commented Apr 14, 2023 via email

@loewal
Copy link
Author

loewal commented Apr 14, 2023 via email

@srcejon
Copy link
Collaborator

srcejon commented Apr 14, 2023

It gets (for me) even stranger.. The compilation on my Mac mini (Ubuntu) went fine. I will continue testing with the debugger. However, why do I see this error only on my iMac.

Probably because it's a different compiler (clang vs gcc) and has compiled that bit of code slightly differently.

@loewal
Copy link
Author

loewal commented Apr 14, 2023 via email

@loewal
Copy link
Author

loewal commented Apr 14, 2023 via email

@srcejon
Copy link
Collaborator

srcejon commented Apr 14, 2023

It's because of the -DCMAKE_BUILD_TYPE=Debug option. That tells the compiler to compile slightly differently, which results in the error.

If you use -DCMAKE_BUILD_TYPE=Release you wont see the problem. Note that not specifying -DCMAKE_BUILD_TYPE defaults to Release.

@loewal
Copy link
Author

loewal commented Apr 14, 2023 via email

@loewal
Copy link
Author

loewal commented Apr 14, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants