Stellarium / stellarium

Stellarium is a free GPL software which renders realistic skies in real time with OpenGL. It is available for Linux/Unix, Windows and macOS. With Stellarium, you really see what you can see with your eyes, binoculars or a small telescope.
https://stellarium.org
GNU General Public License v2.0
7.56k stars 815 forks source link

Crash on startup (clean installation) #3550

Closed alex-w closed 9 months ago

alex-w commented 9 months ago

Expected Behaviour

Create a default environment on startup of Stellarium and run planetarium

Actual Behaviour

Crash on startup after getting location from IP address

Steps to reproduce

  1. Make a clean installation of Stellarium (or rename existing directory with settings)
  2. Run Stellarium

System

10110111 commented 9 months ago

I don't reproduce the crash on Ubuntu 20.04 after renaming ~/.stellarium.

alex-w commented 9 months ago

Probably the crash reproducible for Qt6-based packages only (I got crash on both machines with Qt6)

10110111 commented 9 months ago

I'm using Qt6 here.

alex-w commented 9 months ago

under gdb:

Got location "Barnaul, Altai Krai, Russia (53.3597, 83.758; Asia/Barnaul)" for IP "176.212.122.222"
Unable to find module called "LandscapeMgr"

Thread 1 "stellarium" received signal SIGSEGV, Segmentation fault.
0x0000555556385830 in LandscapeMgr::getFlagLandscapeAutoSelection (this=0x0) at /home/aw/devel/stellarium/src/core/modules/LandscapeMgr.cpp:1318
1318            return flagLandscapeAutoSelection;
alex-w commented 9 months ago

See StelLocationMgr.cpp:1176 - why LandscapeMgr called before loading?

alex-w commented 9 months ago

Possible solution (see StelLocationMgr::changeLocationFromNetworkLookup()):

LandscapeMgr *lMgr=GETSTELMODULE(LandscapeMgr);
QString landscapeAutoName;
if (lMgr && lMgr->getFlagLandscapeAutoSelection())
{
    QColor color=getColorForCoordinates(loc.getLongitude(), loc.getLatitude());
    landscapeAutoName=QString("ZeroColor(%1)").arg(Vec3f(color).toStr());
}

But this solution will break logic for coloring the "fake landscape"

10110111 commented 9 months ago

See StelLocationMgr.cpp:1176 - why LandscapeMgr called before loading?

Try backtrace command to see where this call comes from.

alex-w commented 9 months ago
Got location "Barnaul, Altai Krai, Russia (53.3597, 83.758; Asia/Barnaul)" for IP "176.212.122.222"
Unable to find module called "LandscapeMgr"

Thread 1 "stellarium" received signal SIGSEGV, Segmentation fault.
0x0000555556385830 in LandscapeMgr::getFlagLandscapeAutoSelection (this=0x0) at /home/aw/devel/stellarium/src/core/modules/LandscapeMgr.cpp:1318
1318            return flagLandscapeAutoSelection;
(gdb) backtrace
#0  0x0000555556385830 in LandscapeMgr::getFlagLandscapeAutoSelection() const (this=0x0) at /home/aw/devel/stellarium/src/core/modules/LandscapeMgr.cpp:1318
#1  0x00005555561ac39b in StelLocationMgr::changeLocationFromNetworkLookup() (this=0x5555583a0670)
    at /home/aw/devel/stellarium/src/core/StelLocationMgr.cpp:1176
#2  0x00005555560d42ee in StelLocationMgr::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
    (_o=0x5555583a0670, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0x7fffffffc8a8)
    at /home/aw/devel/stellarium/builds/gcc/src/stelMain_autogen/TAC5DWH4SE/moc_StelLocationMgr.cpp:146
#3  0x00007ffff59ac273 in  () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#4  0x00007ffff673d73e in  () at /lib/x86_64-linux-gnu/libQt6Network.so.6
#5  0x00007ffff59a072f in QObject::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#6  0x00007ffff6f7fd36 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#7  0x00007ffff5953a58 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#8  0x00007ffff595736a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#9  0x00007ffff5b7c637 in  () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#10 0x00007ffff571bd3b in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007ffff5771258 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007ffff57193e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007ffff5b7bf0c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#14 0x0000555555e407e9 in SplashScreen::showMessage(QString const&) (message=...) at /home/aw/devel/stellarium/src/StelSplashScreen.cpp:44
#15 0x0000555556208224 in StelApp::init(QSettings*) (this=0x5555582fca00, conf=0x5555585d26e0) at /home/aw/devel/stellarium/src/core/StelApp.cpp:541
#16 0x0000555555e29d7a in StelMainView::init() (this=0x7fffffffd9d0) at /home/aw/devel/stellarium/src/StelMainView.cpp:929
#17 0x0000555555e3705d in StelGLWidget::initializeGL() (this=0x5555583c6260) at /home/aw/devel/stellarium/src/StelMainView.cpp:139
#18 0x00007ffff7bdedff in QOpenGLWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt6OpenGLWidgets.so.6
#19 0x00007ffff6f7fd36 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#20 0x00007ffff5953a58 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#21 0x00007ffff6fd5b17 in QWidgetPrivate::show_helper() () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#22 0x00007ffff6fd8cab in QWidgetPrivate::setVisible(bool) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#23 0x00007ffff6fd5a38 in QWidgetPrivate::showChildren(bool) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#24 0x00007ffff6fd5af3 in QWidgetPrivate::show_helper() () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#25 0x00007ffff6fd8cab in QWidgetPrivate::setVisible(bool) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#26 0x00007ffff6fd57b4 in QWidget::showFullScreen() () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#27 0x0000555555e3095e in StelMainView::setFullScreen(bool) (this=0x7fffffffd9d0, b=true) at /home/aw/devel/stellarium/src/StelMainView.cpp:1462
#28 0x0000555555dff346 in main(int, char**) (argc=1, argv=0x7fffffffdd58) at /home/aw/devel/stellarium/src/main.cpp:449
gzotti commented 9 months ago

Yes, I have run into the same problem today testing build on a super-old Core2Duo. Struggled with that with broken GPU, and now suffering from lost Geforce drivers on fresh Ubuntu 22 update. Nouveau has broken graphics on a 9600GT. Sorry, it has to do with my latest fixes around auto-landscape from GPS/network.

github-actions[bot] commented 9 months ago

Hello @alex-w!

OK, developers can reproduce the issue. Thanks for the report!

gzotti commented 9 months ago

@alex-w Something has broken a few weeks ago with the macOS CI build (errors during tool installation and "brew"ing some dependencies). And there is a deprecation warning for the Linux build as well. Can you look into these things please?

alex-w commented 9 months ago

@alex-w Something has broken a few weeks ago with the macOS CI build (errors during tool installation and "brew"ing some dependencies).

Damn... The results is weird - the unit tests looks like he depends from flags of compilers

And there is a deprecation warning for the Linux build as well. Can you look into these things please?

Where is a deprecation warnings?

gzotti commented 9 months ago

grafik

alex-w commented 9 months ago

Done.

So, linux (qt5/qt6) and macOS (qt5/qt6) in the box now

github-actions[bot] commented 9 months ago

Hello @alex-w!

Please check the fresh version (development snapshot) of Stellarium: https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot

github-actions[bot] commented 9 months ago

Hello @alex-w!

Please check the latest stable version of Stellarium: https://github.com/Stellarium/stellarium/releases/latest