Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Thumbnail cache is invalid if time range is short

Open
#114 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
40/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start in modules/tracktion_engine/audio_files/tracktion_Thumbnail.cpp, focusing on TracktionThumbnail::CachedWindow::refillCache around line 463 where the cache-versus-on-the-fly decision is made. Reproduce the issue with the provided test application (test_tracktion_waveform_bug.zip) and compare cached versus on-the-fly level data for short time ranges. Done means the thumbnail no longer leads with zeros and responds correctly to small start-time adjustments. No test file is named; check the repository for a thumbnail test suite.

Written by the indexing model from the issue text.

Description

Hi all,

I've discovered an issue with the TracktionThumbnail::CachedWindow::refillCache function.

From my understanding, if the thumbnail time range is shorter than the CachedWindow has cached, then it begins reading audio level data "on the fly" from the source. This check between using the cache and going "on the fly" is performed here.

When the cache is refilled "on the fly" - the time range is too short for the cache to be used - then it returns invalid data. For some reason, the first several levels are 0. When small adjustments are made to the start of the time range, the thumbnail doesn't always change as expected - the beginning appears to stay in place and the whole thing stretches.
I made a test application to demonstrate this. Here's a screen recording of it:

https://user-images.githubusercontent.com/35109863/157196868-2a808e7c-c424-484a-a6ee-cb8d87515bba.mp4

You can download the source files for this test app here: test_tracktion_waveform_bug.zip

Dominant language
C++
Stars
1.5k
Forks
222
Avg merge
15h 44m
Merged PRs (30d)
33

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Tracktion/tracktion_engine

All issues in Tracktion/tracktion_engine

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.