Skip to content

Fixed graphics bug for Graphics test - #170

Open
connorclancydev wants to merge 1 commit into
thoth-tech:mainfrom
connorclancydev:BugFix/GraphicsError
Open

connorclancydev wants to merge 1 commit into
thoth-tech:mainfrom
connorclancydev:BugFix/GraphicsError

Conversation

@connorclancydev

@connorclancydev connorclancydev commented Aug 9, 2026 •

Copy link
Copy Markdown

Fixed an error where the text font cache wouldn't be cleared when windows were destroyed causing graphical issues when other windows would open

Description

Msys2 has been having issues with the graphics test whilst WSL has been fine, this change is to fix that it is done by clearing out the global font data when a window is shut so its settings wont cause issues when a new window is opened up. Note to test if you are using Msys2 you may need to implement this PR(#132) to be able to test it as there have been issues, this info is also on the ticket.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

To test this I opened opened up the sktests and tested the graphics about thirty times, thirty might be excessive but it is important to not that I found this error that was fixed almost never appeared on the first run and would often not appear on the second so it is important to test it at least a few times. Additionally I ran the skunit_tests to make sure nothing in there got broken with this fix.

Testing Checklist

  • Tested with sktest
  • Tested with skunit_tests

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Fixed an error where when the text font cache wouldn't be cleared when windows were destroyed
causing issues when other windows would open

@rory-cd rory-cd left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great work - nice simple solution. I tested this by running the test beforehand to confirm the issue occurred, and then after the update 10 times. The post-update tests all ran with no errors.

General Information

Type of Change:

  • Bug fix

Code Quality

  • Repository: Is this Pull Request is made to the correct repository? (Thoth-Tech NOT
    SplashKit)
  • Readability: Is the code easy to read and follow? If not are there comments to help
    understand the code?
  • Maintainability: Can this code be easily maintained or extended in the future?

Functionality

  • Correctness: Does the code meet the requirements of the task?
  • Impact on Existing Functionality: Has the impact on existing functionality been considered and tested?

Testing

  • Test Coverage: Are unit tests provided for new or modified code?
  • Test Results: Have all tests passed?

Documentation

  • Documentation: Are both inline and applicable external documentation updated and clear?

Pull Request Details

  • PR Description: Is the problem being solved clearly described?
  • Checklist Completion: Have all relevant checklist items been reviewed and completed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants