Skip to content

Images: the theme's stay loaded, data images can't crash a region that holds them - #382

Closed
kloptops wants to merge 1 commit into
PortsMaster:mainfrom
kloptops:theme-images
Closed

kloptops wants to merge 1 commit into
PortsMaster:mainfrom
kloptops:theme-images

Conversation

@kloptops

Copy link
Copy Markdown
Member

The image cache kept the 30 most recently loaded images and destroyed the rest, including ones a region still held: a theme whose list pointer wasn't in #resources crashed ("Cannot use a texture after it has been destroyed") once enough port screenshots had loaded.

Now:

  • theme images, found by name (the theme's files and PortMaster's: #resources, a region's image, pimage and pointer, animation frames), stay loaded until the theme reloads
  • data images (screenshots and other absolute paths, QR codes) are cached as before, and one a region still holds after the cache dropped it loads itself again on its next draw

…t holds them

The image cache kept the 30 most recently loaded images and destroyed the
rest, including ones a region still held: a theme whose list pointer
wasn't in #resources crashed ("Cannot use a texture after it has been
destroyed") once enough port screenshots had loaded.

Now:
- theme images, found by name (the theme's files and PortMaster's:
  #resources, a region's image, pimage and pointer, animation frames),
  stay loaded until the theme reloads
- data images (screenshots and other absolute paths, QR codes) are cached
  as before, and one a region still holds after the cache dropped it
  loads itself again on its next draw

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NxABmR1rUUgi4iicVLZchY
@kloptops kloptops closed this Nov 12, 2026
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.

1 participant