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.55k stars 813 forks source link

Stellarium crashes when telescope control is active and indi server shuts down #2864

Open ckuethe opened 1 year ago

ckuethe commented 1 year ago

Expected Behaviour

Stellarium should not crash when INDI server shuts down. A better approach would be to treat it like clicking "disconnect" in the telescope control panel.

Actual Behaviour

For as long as I can remember, Stellarium crashes with SIGSEGV if the connected INDI telescope shuts down. This has been happening since at least Stellarmate os 1.6.1 (dec 21/22) with INDI 1.6.3, all the way up to Stellarmate os 1.7.3 with INDI 1.9.7. Finally got around to a debug build so I can get you a backtrace.

Steps to reproduce

System

INDI on host

ii  indi-asi                                                    2.2+t202211101309~ubuntu22.04.1                                 amd64        INDI Driver for ZWO Optics ASI cameras
ii  indi-bin                                                    1.9.9+202211131750~ubuntu22.04.1                                amd64        INDI server, drivers and tools
ii  indi-celestronaux                                           1.2+t202211101311~ubuntu22.04.1                                 amd64        INDI driver for Celestron mounts in AUX mode.
ii  indi-duino                                                  1.17+t202211101436~ubuntu22.04.1                                amd64        INDI Arduino driver.
ii  indi-eqmod                                                  1.0+t202211132014~ubuntu22.04.1                                 amd64        INDI EQMod Driver.
ii  indi-gphoto                                                 3.2+t202211101309~ubuntu22.04.1                                 amd64        INDI GPhoto (DSLR) Camera Driver.
ii  indi-gpsd                                                   0.5+t202211101318~ubuntu22.04.1                                 amd64        INDI driver for gpsd gps daemon.
ii  indi-qhy                                                    2.7+stable+202211101309~ubuntu22.04.1                           amd64        INDI QHY Driver. This driver is compatible with any INDI client such as KStars or Xephem.
ii  indi-sv305                                                  1.3.2+t202209291719~ubuntu22.04.1                               amd64        INDI driver for the SVBONY SV305 Camera
ii  libindi-data                                                1.9.9+202211131750~ubuntu22.04.1                                all          Instrument-Neutral Device Interface library -- shared data
ii  libindi1:amd64                                              1.9.9+202211131750~ubuntu22.04.1                                amd64        Instrument-Neutral Device Interface library -- shared library

INDI on telescope server

ii  ekos-debugger                                 1.1-stable~202112310837          arm64        Debugger for KStars and INDI
ii  indi-aagcloudwatcher-ng                       1.7-stable~202210020722          arm64        INDI driver for the AAG Cloud Watcher (new api version and anemometer support)
ii  indi-aok                                      2.0-stable~202210020658          arm64        INDI AOK Skywalker Driver.
ii  indi-apogee                                   1.9-stable~202210020701          arm64        INDI driver for Apogee CCDs and Filter Wheels
ii  indi-asi                                      2.2-stable~202210020717          arm64        INDI Driver for ZWO Optics ASI cameras
ii  indi-asi-power                                0.95-stable~202210020654         arm64        INDI Driver for RaspberryPi GPIO
ii  indi-astromechfoc                             0.2-stable~202210020647          arm64        INDI Astromechanics Canon Lens Controller Driver
ii  indi-atik                                     3.0-stable~202210190742          arm64        INDI Driver for Atik cameras and filter wheels.
ii  indi-avalon                                   1.12-stable~202210020704         arm64        INDI Avalon Stargo Driver.
ii  indi-bin                                      1.9.8-stable~202209290927        arm64        INDI server, drivers and tools
ii  indi-bresserexos2                             1.0-stable~202210020635          arm64        INDI Exos II GoTo Telescope Mount Driver.
ii  indi-celestronaux                             1.2-stable~202210020639          arm64        INDI driver for Celestron mounts in AUX mode.
ii  indi-dreamfocuser                             2.1-stable~202210020723          arm64        INDI DreamFocuser Driver
ii  indi-dsi                                      0.4-stable~202210020630          arm64        INDI Meade DSI Pro I/II/III Driver
ii  indi-duino                                    1.17-stable~202210020705         arm64        INDI Arduino driver.
ii  indi-eqmod                                    1.0-stable~202211131740          arm64        INDI EQMod Driver.
ii  indi-ffmv                                     0.3-stable~202210020656          arm64        INDI Driver for Point Grey Firefly MV cameras.
ii  indi-fishcamp                                 1.1-stable~202210020649          arm64        INDI Fishcamp CCD Driver.
ii  indi-fli                                      1.5-stable~202210020702          arm64        INDI FLI CCD & Focuser Driver.
ii  indi-full                                     1.9.7-stable~202207291316        arm64        Instrument-Neutral Device Interface library - Full INDI
ii  indi-gphoto                                   3.2-stable~202210020711          arm64        INDI GPhoto (DSLR) Camera Driver.
ii  indi-gpsd                                     0.5-stable~202210020632          arm64        INDI driver for gpsd gps daemon.
ii  indi-gpsnmea                                  0.2-stable~202210020725          arm64        INDI driver for GPS NMEA streams.
ii  indi-maxdomeii                                1.3-stable~202210020634          arm64        INDI driver for MaxDome II automatic observatory dome control system.
ii  indi-mgen                                     0.1-stable~202210020657          arm64        INDI driver for Lacerta MGen Autoguider.
ii  indi-mi                                       1.8-stable~202210020650          arm64        INDI Moravian CCD Driver.
ii  indi-nexdome                                  1.5-stable~202210020655          arm64        INDI driver for NexDome.
ii  indi-nightscape                               1.0.6-stable~202210020641        arm64        INDI Driver for Celestron Nightscape 8300
ii  indi-orion-ssg3                               0.1-stable~202210020714          arm64        INDI Driver for Orion StarShoot G3 and G4 cameras
ii  indi-pentax                                   1.0-stable~202210020642          arm64        INDI Pentax driver.
ii  indi-playerone                                0.8-stable~202210020659          arm64        INDI Driver for Playerone based cameras
ii  indi-qhy                                      2.7-stable~202210190736          arm64        INDI QHY Driver. This driver is compatible with any INDI client such as KStars or Xephem.
ii  indi-qsi                                      0.9-stable~202210020646          arm64        INDI QSI CCD Driver.
ii  indi-rpi-gpio                                 0.4-stable~202210020651          arm64        INDI Driver for RaspberryPi GPIO
ii  indi-sbig                                     2.1-stable~202210020719          arm64        INDI SBIG Santa Barbra Instrument Group CCD Driver
ii  indi-shelyak                                  1.0-stable~202210020640          arm64        INDI Shelyak and Alpy Spectrograph Drivers.
ii  indi-starbook                                 0.8-stable~202210020724          arm64        INDI Starbook Driver.
ii  indi-starbook-ten                             0.1-stable~202210020636          arm64        INDI Starbook Ten Driver.
ii  indi-sv305                                    1.3.2-stable~202210020648        arm64        INDI driver for the SVBONY SV305 Camera
ii  indi-sx                                       1.16-stable~202210020716         arm64        INDI Starlight Xpress CCD and Filter Wheel driver.
ii  indi-talon6                                   2.0-stable~202210020703          arm64        INDI driver for Talon6 Roll Off Roof.
ii  indi-toupbase                                 0.9-stable~202210020707          arm64        INDI Driver for Touptek based cameras
ii  libindi-data                                  1.9.8-stable~202209290927        arm64        Instrument-Neutral Device Interface library -- shared data
ii  libindi-dev                                   1.9.8-stable~202209290927        arm64        Instrument-Neutral Device Interface library -- development files
ii  libindi1:arm64                                1.9.8-stable~202209290927        arm64        Instrument-Neutral Device Interface library -- shared library

Logfile

Here's the output from running under GDB

ckuethe@thorium:~/stellarium/build$ gdb ./src/stellarium
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./src/stellarium...
(gdb) r
Starting program: /home/ckuethe/stellarium/build/src/stellarium 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe1f76640 (LWP 642880)]
[New Thread 0x7fffe12f0640 (LWP 642881)]
[New Thread 0x7fffe0aef640 (LWP 642882)]
[New Thread 0x7fffd3bff640 (LWP 642883)]
[New Thread 0x7fffd33fe640 (LWP 642884)]
[New Thread 0x7fffd2bfd640 (LWP 642885)]
[New Thread 0x7fffd23fc640 (LWP 642886)]
[New Thread 0x7fffd1bfb640 (LWP 642887)]
[New Thread 0x7fffd13fa640 (LWP 642888)]
WARNING StelFileMgr::StelFileMgr: could not find install location: "/usr/local/share/stellarium"  (we checked for  "/usr/local/share/stellarium/data/ssystem_major.ini" ).
Maybe this is AppImage or something similar? Let's check relative path...
WARNING StelFileMgr::StelFileMgr: could not find install location: "/home/ckuethe/stellarium/build/src/../share/stellarium"  (we checked for  "/home/ckuethe/stellarium/build/src/../share/stellarium/data/ssystem_major.ini" ).
Maybe this is development environment? Let's check source directory path...
[New Thread 0x7fffd0b00640 (LWP 642889)]
[Detaching after fork from child process 642890]
QProcess: Destroyed while process ("lspci") is still running.
 ------------------------------------------------------------------------------
[ This is Stellarium 1.1+ (v0.22.4-a6e233e [master]) - https://stellarium.org/ ]
[ Copyright (C) 2000-2022 Stellarium Developers                                ]
 ------------------------------------------------------------------------------
Writing log file to: "/home/ckuethe/.stellarium/log.txt"
File search paths:
  0 .  "/home/ckuethe/.stellarium"
  1 .  "/home/ckuethe/stellarium"
Config file is:  "/home/ckuethe/.stellarium/config.ini"
Default surface format:  QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
OpenGL module type: 0
Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing.
Couldn't load translations for language  "en_US" in section "stellarium"
Empty translation file for language  "en_US" in section "stellarium"
Default surface format:  QSurfaceFormat(version 3.3, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CoreProfile)
OpenGL module type: 0
StelGLWidget constructor
StelGraphicsScene constructor
[New Thread 0x7fffabfff640 (LWP 642894)]
initializeGL(windowWidth = 1024, windowHeight = 768)
OpenGL supported version:  "4.6 (Core Profile) Mesa 22.2.0"
Current Format:  QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencilBufferSize 0, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CoreProfile)
StelMainView::init
Luminance textures are not supported
Detected: OpenGL "4.6"
Driver version string: "4.6 (Core Profile) Mesa 22.2.0"
GL vendor is "Intel"
GL renderer is "Mesa Intel(R) Xe Graphics (TGL GT2)"
GL Shading Language version is "4.60"
MESA Version Number detected:  22.2
Mesa version is fine, we should not see a graphics problem.
GLSL Version Number detected:  4.6
GLSL version is fine, we should not see a graphics problem.
stel.OpenGLArray: Vertex Array Objects are supported
Couldn't load translations for language  "en_US" in section "stellarium-skycultures"
Empty translation file for language  "en_US" in section "stellarium-skycultures"
Sky language is  "en_US"
Couldn't load translations for language  "en_US" in section "stellarium-planetary-features"
Empty translation file for language  "en_US" in section "stellarium-planetary-features"
Planetary features language is  "en_US"
Couldn't load translations for language  "en_US" in section "stellarium"
Empty translation file for language  "en_US" in section "stellarium"
Application language is  "en_US"
Couldn't load translations for language  "en_US" in section "stellarium-scripts"
Empty translation file for language  "en_US" in section "stellarium-scripts"
Scripts language is  "en_US"
[New Thread 0x7fffab5fe640 (LWP 642895)]
Cache directory is:  "/home/ckuethe/.cache/stellarium/stellarium"
Loaded 252 countries
Loaded 193 regions
StelLocation::createFromLine(): TimeZone name for  "Somewhere Over Nevada"  not found. Translating "system_default"  to  "system_default"
Loading Solar System data (1: planets and moons) ...
Loading from : "/home/ckuethe/stellarium/data/ssystem_major.ini"
[New Thread 0x7fffaadfd640 (LWP 642896)]
[New Thread 0x7fffaa5fc640 (LWP 642897)]
[New Thread 0x7fffa9dfb640 (LWP 642898)]
[New Thread 0x7fffa93fa640 (LWP 642899)]
[New Thread 0x7fffa89f9640 (LWP 642900)]
[New Thread 0x7fff93fff640 (LWP 642901)]
[New Thread 0x7fff937fe640 (LWP 642902)]
[New Thread 0x7fff92ffd640 (LWP 642903)]
[New Thread 0x7fff927fc640 (LWP 642904)]
[New Thread 0x7fff91ffb640 (LWP 642905)]
[New Thread 0x7fff917fa640 (LWP 642906)]
[New Thread 0x7fff90ff9640 (LWP 642907)]
SolarSystem has  83 entries.
Loaded 83 Solar System bodies
Loading Solar System data (2: minor bodies)...
Loading from : "/home/ckuethe/.stellarium/data/ssystem_minor.ini"
SolarSystem has  185 entries.
Loaded 102 Solar System bodies
File ssystem_minor.ini is loaded successfully...
Loading nomenclature for Solar system bodies ...
qt.gui.icc: Unsupported ICC profile class 70727472
QPngHandler: Failed to parse ICC profile
Loaded 15784 / 15835 items of planetary surface nomenclature
WARNING - These planets to assign nomenclature items were not found: "Bennu, Dactyl, Ryugu"
Loading star data ...
"Loading /home/ckuethe/stellarium/stars/default/stars_0_0v0_8.cat: 0_0v0_8; 4979"
"Loading /home/ckuethe/stellarium/stars/default/stars_1_0v0_8.cat: 1_0v0_8; 21806"
"Loading /home/ckuethe/stellarium/stars/default/stars_2_0v0_8.cat: 2_0v0_8; 150826"
"Loading /home/ckuethe/stellarium/stars/default/stars_3_1v0_4.cat: 3_1v0_4; 425807"
"Loading /home/ckuethe/.stellarium/stars/default/stars_4_1v0_2.cat: 4_1v0_4; 1692779"
"Loading /home/ckuethe/.stellarium/stars/default/stars_5_2v0_1.cat: 5_2v0_1; 7083058"
"Loading /home/ckuethe/.stellarium/stars/default/stars_6_2v0_1.cat: 6_2v0_1; 24670782"
"Loading /home/ckuethe/.stellarium/stars/default/stars_7_2v0_1.cat: 7_2v0_1; 50733321"
"Loading /home/ckuethe/.stellarium/stars/default/stars_8_2v0_1.cat: 8_2v0_1; 92304337"
Finished loading star catalogue data, max_geodesic_level:  8
Loading scientific star names from /home/ckuethe/stellarium/stars/default/name.fab
Loaded 4942 / 4942 scientific star names
Loading scientific star extra names from /home/ckuethe/stellarium/stars/default/extra_name.fab
Loaded 26200 / 26200 scientific star extra names
Loading variable stars from /home/ckuethe/stellarium/stars/default/gcvs_hip_part.dat
Loaded 6862 / 6862 variable stars
Loading double stars from /home/ckuethe/stellarium/stars/default/wds_hip_part.dat
Loaded 22992 / 22992 double stars
Loading cross-identification data from /home/ckuethe/stellarium/stars/default/cross-id.dat
Loaded 108378 / 108378 cross-identification data records for stars
Loading parallax errors data from /home/ckuethe/stellarium/stars/default/hip_plx_err.dat
Loaded 117703 / 117703 parallax error data records for stars
Loading proper motion data from /home/ckuethe/stellarium/stars/default/hip_pm.dat
Loaded 117955 / 117955 proper motion data records for stars
navigation/preset_sky_time is a double - treating as jday: "2459903.28699"
qt.gui.icc: Unsupported ICC profile class 70727472
QPngHandler: Failed to parse ICC profile
qt.gui.icc: Unsupported ICC profile class 70727472
QPngHandler: Failed to parse ICC profile
qt.gui.icc: Unsupported ICC profile class 70727472
QPngHandler: Failed to parse ICC profile
qt.gui.icc: Unsupported ICC profile class 70727472
QPngHandler: Failed to parse ICC profile
qt.gui.icc: Unsupported ICC profile class 70727472
QPngHandler: Failed to parse ICC profile
qt.gui.icc: Unsupported ICC profile class 70727472
QPngHandler: Failed to parse ICC profile
qt.gui.icc: Unsupported ICC profile class 70727472
QPngHandler: Failed to parse ICC profile
Loading DSO data ...
[...] Stellarium DSO Catalog, version 3.18 (standard edition)
Loaded 94661 DSO records
Loading DSO outline data ...
Loaded 98 DSO outline records successfully
LandscapeMgr: initialized Cache for 100 MB.
Loading star names from /home/ckuethe/stellarium/skycultures/modern/star_names.fab
Loaded 1103 / 1103 common star names
Loading DSO name data ...
Loaded 1316 / 1342 DSO name records successfully
WARNING - No position data for 26 objects: NGC 1276, NGC 4173, PGC 2798, PGC 2907, PGC 23521, PGC 28759, PGC 29167, PGC 34658, PGC 42102, PGC 44750, PGC 54559, PGC 59117, PGC 59858, PGC 59953, PGC 69018, PGC 69877, PGC 73957, PGC 95597, PGC 100170, PGC 100170, PGC 119230, PGC 1000714, PGC 1694462, PGC 2822840, PGC 2826829, PGC 3098124
Loaded 88 / 88 constellation records successfully for culture "modern"
Loaded 85 / 85 constellation art records successfully for culture "modern"
Loaded 88 / 88 constellation names
Loading constellation boundary data ... 
Loaded 782 constellation boundary segments
Loaded 84 / 84 asterism records successfully for culture "modern"
Loaded 74 / 74 asterism names
[New Thread 0x7fff21b3d640 (LWP 642911)]
Initializing basic GL shaders... 
Creating GUI ...
Loading Style file ":/graphicGui/normalStyle.css"
Loaded plugin "NavStars"
Loaded plugin "Novae"
[Novae] version of the catalog: 1
[Novae] loading catalog file: "/home/ckuethe/.stellarium/modules/Novae/novae.json"
Loaded plugin "Observability"
Loaded plugin "Oculars"
Oculars::validateAndLoadIniFile() ocular.ini exists at:  "/home/ckuethe/.stellarium/modules/Oculars/ocular.ini" . Checking version...
Oculars::validateAndLoadIniFile() found existing ini file version  3.1
Loaded plugin "OnlineQueries"
Loaded plugin "PointerCoordinates"
Loaded plugin "Satellites"
[Satellites] loading catalogue file: "/home/ckuethe/.stellarium/modules/Satellites/satellites.json"
Loaded plugin "TelescopeControl"
[TelescopeControl] Only embedded telescope servers are available.
[TelescopeControl] Adding device model: "Meade AutoStar compatible" "Any telescope or telescope mount compatible with Meade's AutoStar controller." "TelescopeServerLx200" 500000
[TelescopeControl] Adding device model: "Meade LX200 (compatible)" "Any telescope or telescope mount compatible with Meade LX200." "TelescopeServerLx200" 500000
[TelescopeControl] Adding device model: "Meade ETX70 (#494 Autostar, #506 CCS)" "Meade's ETX70 with the #494 Autostar controller and the #506 Connector Cable Set." "TelescopeServerLx200" 1500000
[TelescopeControl] Adding device model: "Losmandy G-11" "Losmandy's G-11 telescope mount." "TelescopeServerLx200" 500000
[TelescopeControl] Adding device model: "Wildcard Innovations Argo Navis (Meade mode)" "Wildcard Innovations' Argo Navis DTC in Meade LX200 emulation mode." "TelescopeServerLx200" 500000
[TelescopeControl] Adding device model: "Celestron NexStar (compatible)" "Any telescope or telescope mount compatible with Celestron NexStar." "TelescopeServerNexStar" 500000
[TelescopeControl] Adding device model: "Sky-Watcher SynScan (version 3 or later)" "Any Sky-Watcher mount that uses version 3 or later of the SynScan hand controller." "TelescopeServerNexStar" 500000
[TelescopeControl] Adding device model: "Sky-Watcher SynScan AZ GOTO" "The Sky-Watcher SynScan AZ GOTO mount used in a number of telescope models." "TelescopeServerNexStar" 500000
connectionType: TelescopeControl::ConnectionINDI  initString: "Stellarmate:INDI:J2000:stellarmate:7624:EQMod Mount"
Creating telescope "Stellarmate:INDI:J2000:stellarmate:7624:EQMod Mount" ; name/type/equinox/params: "Stellarmate" "INDI" J2000 "stellarmate:7624:EQMod Mount"
TelescopeClientINDI::TelescopeClientINDI
[New Thread 0x7ffe9cd3b640 (LWP 642912)]
[TelescopeControl] Loaded successfully 2 telescopes.
INDIConnection::newDevice| New Device...  "EQMod Mount"
INDIConnection::newProperty|  "CONNECTION"
INDIConnection::newProperty|  "DRIVER_INFO"
INDIConnection::newProperty|  "POLLING_PERIOD"
INDIConnection::newProperty|  "ALIGNMENT_POINT_MANDATORY_NUMBERS"
INDIConnection::newProperty|  "ALIGNMENT_POINT_OPTIONAL_BINARY_BLOB"
INDIConnection::newProperty|  "ALIGNMENT_POINTSET_SIZE"
INDIConnection::newProperty|  "ALIGNMENT_POINTSET_CURRENT_ENTRY"
INDIConnection::newProperty|  "ALIGNMENT_POINTSET_ACTION"
INDIConnection::newProperty|  "ALIGNMENT_POINTSET_COMMIT"
INDIConnection::newProperty|  "ALIGNMENT_SUBSYSTEM_MATH_PLUGINS"
INDIConnection::newProperty|  "ALIGNMENT_SUBSYSTEM_MATH_PLUGIN_INITIALISE"
INDIConnection::newProperty|  "ALIGNMENT_SUBSYSTEM_ACTIVE"
INDIConnection::newProperty|  "DEBUG"
INDIConnection::newProperty|  "SIMULATION"
INDIConnection::newProperty|  "CONFIG_PROCESS"
INDIConnection::newProperty|  "DEBUG_LEVEL"
INDIConnection::newProperty|  "LOGGING_LEVEL"
INDIConnection::newProperty|  "LOG_OUTPUT"
INDIConnection::newProperty|  "CONNECTION_MODE"
INDIConnection::newProperty|  "SYSTEM_PORTS"
INDIConnection::newProperty|  "DEVICE_PORT"
INDIConnection::newProperty|  "DEVICE_BAUD_RATE"
INDIConnection::newProperty|  "DEVICE_AUTO_SEARCH"
INDIConnection::newProperty|  "DEVICE_PORT_SCAN"
INDIConnection::newProperty|  "ACTIVE_DEVICES"
INDIConnection::newProperty|  "DOME_POLICY"
INDIConnection::newProperty|  "TELESCOPE_INFO"
INDIConnection::newProperty|  "SCOPE_CONFIG_NAME"
INDIConnection::newProperty|  "ON_COORD_SET"
INDIConnection::newProperty|  "EQUATORIAL_EOD_COORD"
INDIConnection::newProperty|  "TELESCOPE_ABORT_MOTION"
INDIConnection::newProperty|  "TELESCOPE_TRACK_MODE"
INDIConnection::newProperty|  "TELESCOPE_TRACK_STATE"
INDIConnection::newProperty|  "TELESCOPE_TRACK_RATE"
INDIConnection::newProperty|  "TELESCOPE_MOTION_NS"
INDIConnection::newProperty|  "TELESCOPE_MOTION_WE"
INDIConnection::newProperty|  "TELESCOPE_REVERSE_MOTION"
INDIConnection::newProperty|  "TELESCOPE_SLEW_RATE"
INDIConnection::newProperty|  "TARGET_EOD_COORD"
INDIConnection::newProperty|  "TIME_UTC"
INDIConnection::newProperty|  "GEOGRAPHIC_COORD"
INDIConnection::newProperty|  "TELESCOPE_PARK"
INDIConnection::newProperty|  "TELESCOPE_PARK_POSITION"
INDIConnection::newProperty|  "TELESCOPE_PARK_OPTION"
INDIConnection::newProperty|  "TELESCOPE_PIER_SIDE"
INDIConnection::newProperty|  "APPLY_SCOPE_CONFIG"
INDIConnection::newProperty|  "USEJOYSTICK"
INDIConnection::newProperty|  "SNOOP_JOYSTICK"
INDIConnection::newProperty|  "TELESCOPE_TIMED_GUIDE_NS"
INDIConnection::newProperty|  "TELESCOPE_TIMED_GUIDE_WE"
INDIConnection::newProperty|  "ALIGN_METHOD"
INDIConnection::newProperty|  "SLEWSPEEDS"
INDIConnection::newProperty|  "GUIDE_RATE"
INDIConnection::newProperty|  "PULSE_LIMITS"
INDIConnection::newProperty|  "MOUNTINFORMATION"
INDIConnection::newProperty|  "STEPPERS"
INDIConnection::newProperty|  "CURRENTSTEPPERS"
INDIConnection::newProperty|  "PERIODS"
INDIConnection::newProperty|  "JULIAN"
INDIConnection::newProperty|  "TIME_LST"
INDIConnection::newProperty|  "RASTATUS"
INDIConnection::newProperty|  "DESTATUS"
INDIConnection::newProperty|  "HEMISPHERE"
INDIConnection::newProperty|  "HORIZONTAL_COORD"
INDIConnection::newProperty|  "REVERSEDEC"
INDIConnection::newProperty|  "TARGETPIERSIDE"
INDIConnection::newProperty|  "STANDARDSYNC"
INDIConnection::newProperty|  "STANDARDSYNCPOINT"
INDIConnection::newProperty|  "SYNCPOLARALIGN"
INDIConnection::newProperty|  "SYNCMANAGE"
INDIConnection::newProperty|  "BACKLASH"
INDIConnection::newProperty|  "USEBACKLASH"
INDIConnection::newProperty|  "TELESCOPE_TRACK_DEFAULT"
INDIConnection::newProperty|  "ST4_GUIDE_RATE_NS"
INDIConnection::newProperty|  "ST4_GUIDE_RATE_WE"
INDIConnection::newProperty|  "ALIGNSYNCMODE"
INDIConnection::newProperty|  "AUXENCODER"
INDIConnection::newProperty|  "AUXENCODERVALUES"
INDIConnection::newProperty|  "SNAPPORT1"
INDIConnection::newProperty|  "ALIGNDATAFILE"
INDIConnection::newProperty|  "ALIGNDATA"
INDIConnection::newProperty|  "ALIGNPOINT"
INDIConnection::newProperty|  "ALIGNLIST"
INDIConnection::newProperty|  "ALIGNTELESCOPECOORDS"
INDIConnection::newProperty|  "ALIGNCOUNT"
INDIConnection::newProperty|  "ALIGNMODE"
INDIConnection::newProperty|  "HORIZONLIMITSDATAFILE"
INDIConnection::newProperty|  "HORIZONLIMITSDATAFITS"
INDIConnection::newProperty|  "HORIZONLIMITSPOINT"
INDIConnection::newProperty|  "HORIZONLIMITSTRAVERSE"
INDIConnection::newProperty|  "HORIZONLIMITSMANAGE"
INDIConnection::newProperty|  "HORIZONLIMITSFILEOPERATION"
INDIConnection::newProperty|  "HORIZONLIMITSONLIMIT"
INDIConnection::newProperty|  "HORIZONLIMITSLIMITGOTO"
[New Thread 0x7ffe95896640 (LWP 642913)]
[New Thread 0x7ffe95095640 (LWP 642914)]
libpng warning: iCCP: known incorrect sRGB profile

##### And here is where I shut down my INDI server ...#####

Thread 27 "stellarium" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffe9cd3b640 (LWP 642912)]
0x00005555560acac4 in INDI::BaseClient::delPropertyCmd (this=0x555566f49678, root=<optimized out>, errmsg=0x7ffe9cd2d920 "") at /home/ckuethe/stellarium/build/_deps/indiclient-src/libs/indibase/baseclient.cpp:619
619             if (blobModes[0]->blobMode == B_ONLY)
(gdb) bt full
#0  0x00005555560acac4 in INDI::BaseClient::delPropertyCmd(xml_ele_*, char*)
    (this=0x555566f49678, root=<optimized out>, errmsg=0x7ffe9cd2d920 "")
    at /home/ckuethe/stellarium/build/_deps/indiclient-src/libs/indibase/baseclient.cpp:619
        rProp = 0x0
        ap = 0x7ffe9801deb0
        dp = 0x7ffe98001ab0
#1  0x00005555560af0ce in INDI::BaseClient::listenINDI() (this=0x555566f49678)
    at /home/ckuethe/stellarium/build/_deps/indiclient-src/libs/indibase/baseclient.cpp:505
        n = <optimized out>
        buffer = " Mount\" name=\"ST4_GUIDE_RATE_NS\" timestamp=\"2022-11-20T22:43:33\"/>\n<delProperty device=\"EQMod Mount\" name=\"ST4_GUIDE_RATE_WE\" timestamp=\"2022-11-20T22:43:33\"/>\n<delProperty device=\"EQMod Mount\" name=\""...
        msg = "\000evice EQMod Mount not found", '\000' <repeats 2019 times>
        err_code = <optimized out>
        maxfd = 21
        rs = {fds_bits = {524288, 0 <repeats 15 times>}}
        nodes = 0x7ffe98023630
        root = 0x7ffe98014d00
        inode = 2
        locale = {<AutoLocale> = {m_category = 1, m_orig = 0x0}, <No data fields>}
#2  0x00005555560af18d in INDI::BaseClient::listenHelper(void*) (context=<optimized out>)
    at /home/ckuethe/stellarium/build/_deps/indiclient-src/libs/indibase/baseclient.cpp:374
#3  0x00007ffff5edc2b3 in  () at /lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff5a94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>

                      unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737488340432, -6415675021941844024, 140731529541184, 115, 140737314900048, 140737488340784, 6416442170014652360, 6415688683748153288}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#5  0x00007ffff5b26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb) c
Continuing.
[Thread 0x7fff937fe640 (LWP 642902) exited]
[Thread 0x7fffa89f9640 (LWP 642900) exited]
[Thread 0x7fff93fff640 (LWP 642901) exited]
[Thread 0x7fffa93fa640 (LWP 642899) exited]
[Thread 0x7fffaa5fc640 (LWP 642897) exited]
[Thread 0x7ffe95095640 (LWP 642914) exited]
[Thread 0x7ffe95896640 (LWP 642913) exited]
[Thread 0x7ffe9cd3b640 (LWP 642912) exited]
[Thread 0x7fff21b3d640 (LWP 642911) exited]
[Thread 0x7fff90ff9640 (LWP 642907) exited]
[Thread 0x7fff917fa640 (LWP 642906) exited]
[Thread 0x7fff91ffb640 (LWP 642905) exited]
[Thread 0x7fff927fc640 (LWP 642904) exited]
[Thread 0x7fff92ffd640 (LWP 642903) exited]
[Thread 0x7fffa9dfb640 (LWP 642898) exited]
[Thread 0x7fffaadfd640 (LWP 642896) exited]
[Thread 0x7fffab5fe640 (LWP 642895) exited]
[Thread 0x7fffabfff640 (LWP 642894) exited]
[Thread 0x7fffd0b00640 (LWP 642889) exited]
[Thread 0x7fffd13fa640 (LWP 642888) exited]
[Thread 0x7fffd1bfb640 (LWP 642887) exited]
[Thread 0x7fffd23fc640 (LWP 642886) exited]
[Thread 0x7fffd33fe640 (LWP 642884) exited]
[Thread 0x7fffd3bff640 (LWP 642883) exited]
[Thread 0x7fffe0aef640 (LWP 642882) exited]
[Thread 0x7fffe12f0640 (LWP 642881) exited]
[Thread 0x7fffe1f76640 (LWP 642880) exited]
[Thread 0x7fffe281e400 (LWP 642877) exited]
[Thread 0x7fffd2bfd640 (LWP 642885) exited]
[New process 642877]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
alex-w commented 1 year ago

This is good candidate to mark as "Won't fix", because segmentation fault happened within INDI client, because you causes emergency stopping for INDI server when INDI client is connected. You will get similar behaviour with KStars, when it configured to connect to the external INDI server and this server will stopped.

gzotti commented 1 year ago

Does the INDI server broadcast a message "Closing now" to all clients? This should be expected and handled accordingly. If on the other hand INDI is killed by a crash, other programs "may" crash as well. Or whoever is familiar with the INDI code can add some protection code. (some try/catch handling?)

alex-w commented 1 year ago

Does the INDI server broadcast a message "Closing now" to all clients?

No, as far as I know

This should be expected and handled accordingly. If on the other hand INDI is killed by a crash, other programs "may" crash as well. Or whoever is familiar with the INDI code can add some protection code. (some try/catch handling?)

We re-use official INDI-client and this client (reference implementation!) doesn’t have a “protection code”. Maybe latest versions of INDI something have, but I didn’t checked it.

gzotti commented 1 year ago

I mean, try/catch can be added into Stellarium's INDI-related code by somebody familiar with its operations.

ckuethe commented 1 year ago

KStars does not crash when the remote INDI server goes away.

  1. I VNC'd into my remote telescope (Stellarmate).
  2. Started KStars as if I were imaging. This started INDI to communicate with the actual hardware.
  3. Connected with Stellarium, and it shows my mount is parked (yep, it is.)
  4. Connected to INDI running on stellarmate from KStars on my PC. Its INDI control panel shows exactly the same thing as INDI control panel on stellarmate.
  5. Shut down INDI on Stellarmate over VNC
  6. KStars on Stellarmate does not crash.
  7. KStars on my PC does not crash, though it popped up a dialog box indicating that the server had disconnected
  8. Stellarium crashed.
github-actions[bot] commented 1 year ago

This is a good task for the community to participate in the contribution into Stellarium. Who wants to help us?

ckuethe commented 1 year ago

Started looking into this some more.

INDI is up to v1.9.9 while external/CMakeLists.txt imports 1.8.5. After installing libindi-dev 1.9.9 and compiling against that, Stellarium no longer crashes when the remote server shuts down.

Now I just need to figure out how to update the CMake recipe because a lot has changed in the last two and a half years.

luzpaz commented 1 year ago

Any progress here ?

Edit: good PR to track is #3269