Skip to content

Assertion failure in debug mode (star rendering) #4249

Closed

Description

@gzotti

Expected Behaviour

(normal operation)

Actual Behaviour

On zooming in, apparently an assumption about RCMAG_TABLE_SIZE does not hold. This triggers a crash in debug mode, and likely some hidden issue in release mode.

Steps to reproduce

Run a debug build, zoom in to less than 1/2°.

Image

System

  • Stellarium version: master (f28b44d, 25.1+, 27.3.2025)
  • Operating system: Win11
  • Graphics Card: irrelevant

Logfile

If possible, attach the logfile log.txt from your user data directory. Look into the Guide for its location.

"[ 93.761 fatal] stellarium default unknown - ASSERT: "cutoffMagStep<RCMAG_TABLE_SIZE" in file D:\StelDEV\stellarium\src\core\modules\ZoneArray.cpp, line 445"
"[ 93.808 fatal] stellarium default StelPainter::StelPainter - There can be only 1 instance of StelPainter at a given time"

Activity

  1. added this to the 25.2 milestone on Mar 27, 2025
  2. added theissue type on Mar 27, 2025
  3. alex-w commented on Mar 27, 2025

    @alex-w
    Member

    @gzotti how many catalogs are loaded?

  4. alex-w commented on Mar 27, 2025

    @alex-w
    Member

    Oops... I can confirm the crash in debug mode

  5. henrysky commented on Mar 27, 2025

    @henrysky
    Contributor

    The ASSERT: "cutoffMagStep<RCMAG_TABLE_SIZE" is written before Gaia DR3 catalog upgrade and I think the assert is not needed anymore, RCMAG_TABLE_SIZE is the size for table rcmag_table via rcmag_table[magIndex] and it is impossible for magIndex to be greater than 512. For stars in the 0th level catalog (which is for stars -2.<vmag<6.) to have magIndex greater than 512, the vmag of 0th catalog star need to be >16.6, while >24.6 for stars in the 1th level catalog.

    And adding

    if (magIndex > RCMAG_TABLE_SIZE)
    {
    	qDebug() << "ERROR: SpecialZoneArray::draw: invalid magnitude index:" << magIndex;
    }
    

    right before

    const RCMag* tmpRcmag = &rcmag_table[magIndex];
    

    to sanity check never get printed.

  6. gzotti commented on Mar 28, 2025

    @gzotti
    MemberAuthor

    I was afraid the rcmag table could be too small for stars after applying extinction (we had that around 2012...), but probably it's really just a 1-off.

  7. added a commit that references this issue on Mar 28, 2025
    bcf3742
  8. added
    state: publishedThe fix has been published for testing in weekly binary package
    on Mar 30, 2025
  9. github-actions commented on Mar 30, 2025

    @github-actions

    Hello @gzotti!

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

  10. removed
    state: publishedThe fix has been published for testing in weekly binary package
    on Jun 22, 2025
  11. github-actions commented on Jun 22, 2025

    @github-actions

    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

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions