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

Disable ASCOM on Qt6 #3887

Merged
merged 4 commits into from
Sep 7, 2024
Merged

Disable ASCOM on Qt6 #3887

merged 4 commits into from
Sep 7, 2024

Conversation

gzotti
Copy link
Member

@gzotti gzotti commented Sep 7, 2024

Description

We had a lot of complaints about unexpected crashes while running ASCOM-controlled telescopes.
It seems to be a conflict between ASCOM and Qt6 which we probably cannot solve.

This branch disables ASCOM builds on Qt6. The selector radio button is greyed out, and an explanation displayed..

Other people had 2 years to help. So, disable for now, if anybody still wants to help us, you are free to do so.

In a later phase, we may consider adding support for ASCOM Alpaca, a wrapper that avoids the COM-based stuff.

Fixes #2821, #2874,

Screenshots (if appropriate):

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update
  • Housekeeping

How Has This Been Tested?

Test Configuration:

  • Operating system: Windows 11
  • Graphics Card: (irrelevant)

Checklist:

  • My code follows the code style of this project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (header file)
  • I have updated the respective chapter in the Stellarium User Guide
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

- due to some incomprehensible error apparently out of our hands.
@gzotti gzotti added enhancement Improve existing functionality importance: medium A bit annoying, minor miscalculation, but no crash qt Issues, related to Qt framework labels Sep 7, 2024
@gzotti gzotti added this to the 24.3 milestone Sep 7, 2024
@gzotti gzotti self-assigned this Sep 7, 2024
@github-actions github-actions bot requested review from 10110111 and alex-w September 7, 2024 16:05
Copy link

github-actions bot commented Sep 7, 2024

Great PR! Please pay attention to the following items before merging:

Files matching guide/**:

  • Did you remember to update screenshots to match new updates?
  • Did you remember to grammar check in changed part of documentation?

This is an automatically generated QA checklist based on modified files.

@gzotti gzotti marked this pull request as ready for review September 7, 2024 16:08
@@ -921,7 +921,7 @@ \subsection{INDI}
\item IOptron GotoNova Upgrade Kit 8400
\end{itemize}

\subsection{ASCOM (Windows only)}
\subsection{ASCOM (Windows and Qt5-based builds only)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without "and" it will be less ambiguous.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a simple Boolean "and". I can live with a comma instead.

@@ -933,7 +933,10 @@ \subsection{ASCOM (Windows only)}
and most of the astronomy software and tools can communicate with
ASCOM compatible devices.

The ASCOM telescope support has been added to Stellarium's Telescope Control plugin by Gion Kunz in version 0.19.3.
The ASCOM telescope support has been added to Stellarium's Telescope Control plugin by Gion Kunz in version 0.19.3.\footnote{%
Unfortunately ASCOM seems to be incompatible with Qt6.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not ASCOM, but "COM ASCOM" or "ASCOM COM". This is the name their official website uses for this Windows-specific interface (the other being Alpaca).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. 20 years ago ASCOM was presented, the COM part of the name coming from Windows-specific COM. Maybe "traditional ASCOM". So far we do not mention Alpaca.

@@ -40,7 +40,11 @@ long long int GetNow(void)
qint64 t;
} tmp;
GetSystemTimeAsFileTime(&tmp.file_time);
t = (tmp.t/10) - 86400000000LL*(369*365+89); // TODO: Explain this magic please!
// convert from NT/NTFS time epoch (1601-01-01 0:00:00 UTC) in μs to UNIX epoch (1970-01-01 0:00:00 UTC) in μs. The difference is:
// 24 hour/day × 3600 s/hour × ((369×365+89) day).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This misses the 106μs/s factor that I edited into the comment a few minutes after posting it. Without it you get a million times smaller number.

@@ -155,7 +155,12 @@ void TelescopeConfigurationDialog::createDialogContent()
connect(ui->radioButtonTelescopeRTS2, SIGNAL(toggled(bool)), this, SLOT(toggleTypeRTS2(bool)));
connect(ui->radioButtonTelescopeINDI, SIGNAL(toggled(bool)), this, SLOT(toggleTypeINDI(bool)));
#ifdef Q_OS_WIN
connect(ui->radioButtonTelescopeASCOM, SIGNAL(toggled(bool)), this, SLOT(toggleTypeASCOM(bool)));
#if (QT_VERSION>=QT_VERSION_CHECK(6,0,0))
ui->radioButtonTelescopeASCOM->setToolTip(q_("Disabled due to apparent incompatibility. Please use Qt5-based build."));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Use Qt5-based build" is a very cryptic advice for people far from software development. At the very least it should be "Use the Qt5-based build of Stellarium". Maybe even "Use the Qt5 build of Stellarium (the one for Windows 7+)" or something like this.

Copy link
Member Author

@gzotti gzotti Sep 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How large shall tooltips get? Are hyperlinks to the download allowed?
OTOH I agree, the download button label should include qt5/qt6.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hyperlinks will not work in tooltips

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tooltips can have line breaks, which will reduce their horizontal size.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is always room for improvement...

@alex-w alex-w linked an issue Sep 7, 2024 that may be closed by this pull request
@gzotti gzotti merged commit 91efb8e into master Sep 7, 2024
26 of 27 checks passed
@gzotti gzotti deleted the fix/disableASCOMqt6 branch September 7, 2024 17:58
@alex-w alex-w added the state: published The fix has been published for testing in weekly binary package label Sep 8, 2024
Copy link

github-actions bot commented Sep 8, 2024

Hello @gzotti!

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 Sep 22, 2024
Copy link

Hello @gzotti!

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
enhancement Improve existing functionality importance: medium A bit annoying, minor miscalculation, but no crash qt Issues, related to Qt framework
Development

Successfully merging this pull request may close these issues.

Crashes of Stellarium 1.1 (1.22.4 based on Qt 6.4) stellarium-1.1.1-qt6-win64.exe quits when using SharpCap
3 participants