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

Crashes of Stellarium 1.1 (1.22.4 based on Qt 6.4) #2874

Open
smoinard18 opened this issue Nov 26, 2022 · 42 comments
Open

Crashes of Stellarium 1.1 (1.22.4 based on Qt 6.4) #2874

smoinard18 opened this issue Nov 26, 2022 · 42 comments
Labels
bug Something likely wrong in the code good first issue Get involved in development! help wanted We may not have the hardware or expertise

Comments

@smoinard18
Copy link

smoinard18 commented Nov 26, 2022

Hello,

Multiple craches while connected to a ASCOM telescope (real EQ6R-pro ASCOM, or simulated ASCOM). Works well few minutes and crashed randomly while capturing video on another software, no special action in Stellarium.

Hope the following informations will help... Returning to 0.22.1.

Note that the provided log has been generated with a simulated ASCOM telescope (same crashes with a real connected telescope).

Platform and operating system:

Windows 11 Pro 21H2 build 22000.181.0, 64bits up to date

What kind of graphics card do you have? Driver version?

Intel Iris Plus Graphics. Driver Intel 27.20.100.9365

Which version of Stellarium causes problems:

stellarium-1.1.1-qt6-win64.exe - Stellarium 1.1 (1.22.4 based on Qt 6.4)

The LOGFILE:
See joined file log.txt

Stef
log.txt

@github-actions
Copy link

Thanks for adding your first issue to Stellarium. If you have questions, please do not hesitate to contact us.

@gzotti
Copy link
Member

gzotti commented Nov 26, 2022

Duplicate of #2821. However, with note that an ASCOM simulator is enough to cause crashes.

@smoinard18
Copy link
Author

Please note that when the crash has been reproduced with an ASCOM simulator, I was not using Sharpcap.
However Sharpcap is installed on the same PC, and the crashes with my real telescope occured while using Sharpcap and Firecapture, but both were not connected to the mount.

@alex-w alex-w added this to Needs triage in Plugin: Telescope Control via automation Nov 27, 2022
@alex-w alex-w added this to Needs triage in OS: Windows via automation Nov 27, 2022
@alex-w alex-w added this to Needs triage in Interoperability of Stellarium via automation Nov 27, 2022
@alex-w alex-w added the bug Something likely wrong in the code label Dec 1, 2022
@gzotti gzotti added help wanted We may not have the hardware or expertise good first issue Get involved in development! labels Dec 2, 2022
@github-actions
Copy link

github-actions bot commented Dec 2, 2022

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

@smoinard18
Copy link
Author

What kind of participation do you want me to help ?

@gzotti
Copy link
Member

gzotti commented Dec 3, 2022

Somebody with an interest and motivation in removing INDI/ASCOM/SharpCap/DeviceHub-related problems must look into them. It probably requires some changes in the code, so building from source is a prerequisite, then checking the code of the ASCOM/INDI-related parts of the Telescope plugin. Knowledge about running a debugger may be advantageous.

@ouiouiblog
Copy link

ouiouiblog commented Dec 8, 2022

@smoinard18, I don't know if that may help. I had the same problem with 1.1.1-QT6-W64. Crashing with an Ascom telescope. Crashes may occur randomly or immediately if I used Alt-Tab.

Problem is gone since I use 1.1.1-QT5-W64. You could try by our own.

Platform and operating system:
Windows 10 Family 22H2 build 19045,2251 64bits up to date

What kind of graphics card do you have? Driver version?
AMD ATI HD4500. Driver Intel 27.20.100.9365

Which version of Stellarium causes problems:
stellarium-1.1.1-qt6-win64.exe - Stellarium 1.1 (1.22.4 based on Qt 6.4)

@Blanshan91
Copy link

I am having the same issue. Since updating to v1.1, Stellarium will crash after 1-2 minutes when running, especially after a sync. Are the previous version avaiable for download so I can further test?

@gzotti
Copy link
Member

gzotti commented Dec 10, 2022

Yes. All releases are available when following the "All releases" link on stellarium.org.
Can you try with Qt5-based release 1.1?

@Kev1909
Copy link

Kev1909 commented Dec 18, 2022

Hello,
Same problem also with v1.0.
I was going back to v0.22.2 and have no problems anymore with crashes.
I use Stellarium Scope to connect and control my EQ6-R.
The crashes comes only when I jump between different Windows (Sharpcap, NINA) and go back to the Stellarium Window.

@ouiouiblog
Copy link

@Kev1909 you should try 1.1.1-QT5-W64. it solved my problem

@gzotti
Copy link
Member

gzotti commented Dec 18, 2022

@Kev1909 the same request to you: can you try Qt5-based version 1.1 (https://github.com/Stellarium/stellarium/releases/download/v1.1/stellarium-1.1.1-qt5-win64.exe) ? We have several reports regarding Qt6-based builds when changing between Stellarium and NINA/SharpCap etc, and we tend to believe them. OK, error registered. However, probably no developer currently seems to have enough spare time to ever go observing. My own demands were always fulfilled with my old little drive, LX200 protocol (no chance to experience ASCOM or INDI issues), external autoguider (no chance to see NINA/SharpCap issues), and my DSLR's auto timer.

Going back to a previous version is one option for users, but no step towards solving the problem. (Probably Stellarium 0.14 or 0.16 was good enough for driving telescopes in the 2020s.) Knowing that the problem lies in the actual Qt5/Qt6 transition would be a little but valuable piece of information for the community.

@gzotti
Copy link
Member

gzotti commented Dec 18, 2022

@ouiouiblog thank you for this confirmation!

@Kev1909
Copy link

Kev1909 commented Dec 18, 2022

Ok I will try it and give u feedback. Thank you both!

@Kev1909
Copy link

Kev1909 commented Dec 21, 2022

@gzotti You are right! Qt5 runs without any crashes and works well! Thank You.

FYI: The crashes in Qt6 happens only when I connected to to Telescope and jump between diffenrent windows.

Kind regards
Kevin

@gzotti
Copy link
Member

gzotti commented Dec 21, 2022

OK. So, telescope users with problems should use Qt5-based builds. And one of them should feel invited to fix this.

@fl0wm0ti0n
Copy link

I have this issue too... recent version of ASCOM EQMOD and Stellarium with EQ5 Mount Goto

it seems crashing when switch open windows.

@ouiouiblog
Copy link

ouiouiblog commented Feb 5, 2023

you should try 1.1.1-QT5-W64. it solved my problem

@fl0wm0ti0n
Copy link

you should try 1.1.1-QT5-W64. it solved my problem

thanks! this version works in this case, but i have a different problem... idk if it is the same related issue...

if i make slew and sync with the eqmod aligment tool, after the second "sync" button press SynScan geors back to non PC direct mode and Stellarium freezes, or nearly freezes cause it seems to be ultra slow with the time refreshing only every few minutes.

so first "Sync" works, second not

@whiochon
Copy link

whiochon commented Apr 10, 2023

I want to help with this issue.
I have run the latest stable Stellarium with the debugger in Qt Creator, and found where it crashes.
Confirmed that it occurs with all versions of QT6, including the latest 6.5, but not QT5.

First, it is easy to reproduce, without specific equipment.
An ASCOM driver with simulated telescope is sufficient. I used the latest ASCOM and Green Swamp Server.

  1. Configure Stellarium with a simulated ASCOM telescope to connect at startup
  2. Move the telescope somewhere in Stellarium
  3. Change windows context (I put Chrome maximised over the top of Stellarium)
  4. Wait 60 seconds
  5. Switch back to Stellarium

Crash:
C:\Users\qt\work\qt\qtbase\src\opengl\qopenglpaintengine.cpp:2619: error: Debugger encountered an exception: Exception at 0x7ff8f0dd8fd6, code: 0xc0000005: read access violation at: 0x1c0, flags=0x0 (first chance)

The error occurs when an OpenGL state is being refreshed, or re-created?

I added some debug with timestamps to ASCOMDevice.cpp, and found that right before the crash, ASCOMDevice::isDeviceConnected() looks like it is called twice, concurrently.
ie, a second call is made before the 1st is finished.
Does QT6 do something that requires plugins to be thread safe?

@whiochon
Copy link

Adding to hints of duplicated objects, when building in "Debug" mode, the following exception is triggered, instead of the error above:

There can be only 1 instance of StelPainter at a given time
Debug Error!

Program: C:\Code\Qt\6.4.0\msvc2019_64\bin\Qt6Cored.dll
Module: 6.4.0
File: C:\Code\stellarium\src\core\StelPainter.cpp
Line: 143

This error only occurs if an ASCOM simulated telescope is active.
If using the Stellarium simulated telescope, it does not occur.

Code from StelPainter.cpp::
`#ifndef NDEBUG
Q_ASSERT(globalMutex);

GLenum er = glGetError();
if (er!=GL_NO_ERROR)
{
	if (er==GL_INVALID_OPERATION)
		qFatal("Invalid openGL operation. It is likely that you used openGL calls without having a valid instance of StelPainter");
}

// Lock the global mutex ensuring that no other instances of StelPainter are currently being used
if (globalMutex->tryLock()==false)
{
	qFatal("There can be only 1 instance of StelPainter at a given time");
}

#endif`

@alex-w
Copy link
Member

alex-w commented Jul 5, 2023

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

@whiochon
Copy link

Hi @alex-w ,
I did a clean install of snapshot stellarium-23.2-a69d242-qt6-win64.exe but unfortunately, was still able to reproduce the same problem with the steps as above.

@10110111
Copy link
Contributor

Please post the log for this new version.

Interoperability of Stellarium automation moved this from Needs triage to Done Sep 20, 2023
OS: Windows automation moved this from Needs triage to Done Sep 20, 2023
Plugin: Telescope Control automation moved this from Needs triage to Done Sep 20, 2023
@alex-w alex-w added the state: published The fix has been published for testing in weekly binary package label Sep 21, 2023
@github-actions
Copy link

Hello @smoinard18!

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

@StarFlea
Copy link

Hello!

I ckecked the new RC4-Version (stellarium-23.2-13f21ff-qt6-win64.exe)...
The program crashed again on the first attempt with the telescope control!
The problem doesn't seem to have been solved yet...

Here is the Windows-Error-Log:

Faulting application name: stellarium.exe, version: 23.2.264.0, time stamp: 0x650bf3c0
Faulting module name: Qt6OpenGL.dll, version: 6.5.2.0, time stamp: 0x64a70f0b
Exception code: 0xc0000005
Fault offset: 0x0000000000018ef6
Faulting process Id: 0x1fc8
Faulting application start time: 0x01d9ecbcee22559a
Faulting application path: C:\Program Files\Stellarium\stellarium.exe
Faulting module path: C:\Program Files\Stellarium\Qt6OpenGL.dll
Report Id: 6ffe7d83-3d25-4e8f-bd3f-3e63818a0fc8
Faulting package full name:
Faulting package-relative application ID:

@gzotti
Copy link
Member

gzotti commented Sep 21, 2023

So then...
@StarFlea you are fresh in this thread. Is this a problem while using SharpCap (I only now read what this is), or is it a problem when ONLY using Stellarium with TelescopeControl plugin?
Maybe this is a problem of "SharpCap killing Stellarium", to be reported to their developers?

@gzotti gzotti reopened this Sep 21, 2023
Interoperability of Stellarium automation moved this from Done to In progress Sep 21, 2023
OS: Windows automation moved this from Done to In progress Sep 21, 2023
Plugin: Telescope Control automation moved this from Done to In progress Sep 21, 2023
@StarFlea
Copy link

Hi! No, the problem only occurs with Stellarium with QT6. SharpCap was not in use.
The telescope control ran via the Green Swamp server. Here I had several similar Stellarium-crashes after a short time.

Once I started using Stellarium with QT5, I had no more problems.

Best regards!
StarFlea

@gzotti gzotti modified the milestones: 23.3, 23.4 Sep 23, 2023
@StarFlea
Copy link

StarFlea commented Sep 26, 2023

So, I have now tested the new version 23.3 (Qt 6.5.2) again under Windows 10...

As soon as I use the telescope plugin, Stellarium crashes after a short time (sometimes shortly after connecting to the telescope, sometimes only after I have performed several SYNCs): But every time it is only a matter of time!

Windows-Log:

_Problem
No longer functional

Date
‎09/26/2023 1:29 p.m

status
The report has been sent.

Description
Faulting application path: C:\Program Files\Stellarium\stellarium.exe

Problem signature
Problem Event Name: APPCRASH
Application Name: stellarium.exe
Application Version: 23.3.0.0
Application Timestamp: 6511941d
Faulting Module Name: Qt6OpenGL.dll
Faulting Module Version: 6.5.2.0
Faulting Module Timestamp: 64a70f0b
Exception code: c0000005
Fault offset: 0000000000018ef6
OS Version: 10.0.19045.2.0.0.256.48
Locale ID: 1031
Additional Information 1: cc27
Additional Information 2: cc27a2c1a6f83b5aa8978bb56b3ac09b
Additional Information 3: fea3
Additional Information 4: fea3fe93f3b8e9f45e981bb221c5b774

Extra information about the problem
Bucket ID: 66e61f13bf2942da580426cd7727b6b7 (1730550820726355639)_

I've attached the Stellarium log, but it doesn't document the actual crash...

I hope it's of some help. No other programs were involved in the process (except GS Server). With the Qt5 version I couldn't provoke any crashes!

Greetings!
Star Flea
log.txt

@gzotti gzotti removed the state: published The fix has been published for testing in weekly binary package label Sep 26, 2023
@github-actions
Copy link

Hello @smoinard18!

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

@StarFlea
Copy link

Hmm, I'm pondering right now and when I look at problem #2821, my experience tells me that there could be a connection between the two problems:

So maybe the problem is more general and occurs when you switch back and forth between different windows or (sub)frames!?

@gzotti
Copy link
Member

gzotti commented Nov 28, 2023

I cannot reproduce a crash with 23.3/Qt6, ASCOM 6.6SP2 and just the ASCOM telescope simulator. @StarFlea , @whiochon you both are using Green Swamp server. I have only read the name, what does Green Swamp server do?

@StarFlea
Copy link

Hi Georg!

The GSS is an alternative driver to EQMOD, with which you can control the telescope via ASCOM, especially for Skywatcher mounts.
But I don't think that's where the problem lies, because I recently switched from EQMOD to GSS (in the hope of better software stability) and I already had numerous Stellarium crashes before that.

All I can say is that since I started using the Qt5 version, I hardly have any problems anymore.
Crashes always only occurred when I switched from Stellarium to another program window and back again. I usually set up a connection to GSS via the Stellarium telescope control and at the same time a connection from another program (e.g. SharpCap) to GSS.

But as I said: The problem already existed with EQMOD...

@gzotti
Copy link
Member

gzotti commented Nov 28, 2023

OK. We can be sure "Qt6" and "ASCOM" are involved. But I cannot trigger a crash with the ASCOM telescope simulator.

@StarFlea
Copy link

Maybe it is necessary for another program to have a connection to the mount in addition to Stellarium?
In the past it was always enough to briefly switch to this program window (without clicking on any controls) and then switch back to the Stellarium window, to crash it.

@gzotti
Copy link
Member

gzotti commented Nov 30, 2023

I cannot test equipment which I don't have. Of course I switched between Stellarium and other software, had it in the background for hours, occasionally switched back, never had a crash. Someone else, someone with observing needs, programming skills, a fitting telescope, and enough spare time should feel invited to hunt this down.

@StarFlea
Copy link

Correction! In addition to the ASCOM driver (e.g. GSS or EQMOD), no other program is necessary!

I can now reliably reproduce the crash of the Qt6 version, but I don't really know the reason yet. No mount is connected! Its only a simulation!

I have just installed the latest Ot6 version...

  1. Then I start the GSS in simulator mode.
  2. After that I start Stellarium and go to the "Slew telescope to" button, then the "Configure telescopes" button.
  3. I connect with the running ASCOM driver (GSS).

After that, a few clicks in any other program window (GSS, browser, ...) are enough to cause Stellarium to crash (even in the background).

Maybe it's due to the settings in the Stellarium telescope control? Here are my settings:

Telescopes - Options:
Check "Show telescope labels", "Show telescope reticles", "Show field of view indicators", "Log telescope driver messages to files"

Configure Telescope:
Telescope controlled by: ASCOM
Name: C8-AZEQ5
Connection delay: 0.10s
Coordinate system: J2000 (default)
Selected Device: ASCOM.GS.Sky.Telescope
Source for coordinate system: Let ASCOM device decide

That's all! Maybe you can reproduce it using the settings?

@StarFlea
Copy link

Interesting! As long as I don't establish a connection to the ASCOM driver, Stellarium runs without any problems!

Here are the last entries in the log file before the crash:

connectionType: TelescopeControl::ConnectionASCOM initString: "C8-AZEQ5:ASCOM:J2000:ASCOM.GS.Sky.Telescope:true"
Creating telescope "C8-AZEQ5:ASCOM:J2000:ASCOM.GS.Sky.Telescope:true" ; name/type/equinox/params: "C8-AZEQ5" "ASCOM" J2000 "ASCOM.GS.Sky.Telescope:true"
TelescopeClientASCOM::TelescopeClientASCOM with telescope name "C8-AZEQ5" and ascomDeviceId "ASCOM.GS.Sky.Telescope"

@StarFlea
Copy link

Further insight: Stellarium also crashes when connected to the ASCOM telescope simulator "ScopeSim.Telescope" or the "ASCOM.Simulator.Telescope", even if the GSS is not running!

This narrows down the search a bit!

I also unchecked all the checkboxes in the telescope options as a test, with no result!
I keep testing...

@StarFlea
Copy link

StarFlea commented Nov 30, 2023

The following settings also have no influence on crash behavior:

Connection delay
Coordinate system
Source for coordinate system

So the problem must be somewhere in an incompatibility of Qt6 with some ASCOM configuration!

And as long as you don't briefly switch to another program window after connecting to ASCOM, there will be no crash!

@gzotti
Copy link
Member

gzotti commented Dec 1, 2023

OK, I have meanwhile seen a silent exit once, but could not reproduce it later. The debugger pointed me to a system library source file I have never even heard of. (So it's nothing simple in our sources.) I have no time these weeks for further experiments, though.

You have two options:

  • fix it and earn thanks from all affected observers
  • Use Qt5-based 23.3

@alex-w alex-w removed this from the 23.4 milestone Dec 16, 2023
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 good first issue Get involved in development! help wanted We may not have the hardware or expertise
Projects
OS: Windows
  
In progress
Development

No branches or pull requests

10 participants