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 on startup (clean installation) #3550

Closed
alex-w opened this issue Dec 12, 2023 · 16 comments
Closed

Crash on startup (clean installation) #3550

alex-w opened this issue Dec 12, 2023 · 16 comments
Assignees
Labels
bug Something likely wrong in the code importance: critical Real showstopper, program fails here state: confirmed A developer can reproduce the issue
Milestone

Comments

@alex-w
Copy link
Member

alex-w commented Dec 12, 2023

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

  • Stellarium version: master (23.3.346)
  • Operating system: macOS 11.7.10 / Ubuntu Linux 22.04.3
@alex-w alex-w added bug Something likely wrong in the code importance: critical Real showstopper, program fails here labels Dec 12, 2023
@alex-w alex-w added this to the 23.4 milestone Dec 12, 2023
@alex-w alex-w changed the title Crash at startup (clean installation) Crash on startup (clean installation) Dec 12, 2023
@10110111
Copy link
Contributor

10110111 commented Dec 12, 2023

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

@alex-w
Copy link
Member Author

alex-w commented Dec 12, 2023

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

@alex-w alex-w added the qt Issues, related to Qt framework label Dec 12, 2023
@10110111
Copy link
Contributor

I'm using Qt6 here.

@alex-w alex-w removed the qt Issues, related to Qt framework label Dec 12, 2023
@alex-w
Copy link
Member Author

alex-w commented Dec 12, 2023

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
Copy link
Member Author

alex-w commented Dec 12, 2023

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

@alex-w
Copy link
Member Author

alex-w commented Dec 12, 2023

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
Copy link
Contributor

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

Try backtrace command to see where this call comes from.

@alex-w
Copy link
Member Author

alex-w commented Dec 12, 2023

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
Copy link
Member

gzotti commented Dec 12, 2023

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.

@alex-w alex-w added the state: confirmed A developer can reproduce the issue label Dec 13, 2023
Copy link

Hello @alex-w!

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

@gzotti gzotti self-assigned this Dec 13, 2023
@gzotti gzotti closed this as completed in 4a328a8 Dec 13, 2023
@gzotti
Copy link
Member

gzotti commented Dec 13, 2023

@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
Copy link
Member Author

alex-w commented Dec 13, 2023

@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
Copy link
Member

gzotti commented Dec 13, 2023

grafik

@alex-w
Copy link
Member Author

alex-w commented Dec 13, 2023

Done.

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

@alex-w alex-w added the state: published The fix has been published for testing in weekly binary package label Dec 16, 2023
Copy link

Hello @alex-w!

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

@alex-w alex-w removed the state: published The fix has been published for testing in weekly binary package label Dec 23, 2023
Copy link

Hello @alex-w!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something likely wrong in the code importance: critical Real showstopper, program fails here state: confirmed A developer can reproduce the issue
Development

No branches or pull requests

3 participants