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

[Bug]: False negative in EditRenderJob

Open
#271 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

Research direction

The faulty check is in EditRenderJob::completeRender() in the render subsystem; it only reports success when result.items is non-empty or the proxy file exists. For an in-memory Edit params.category stays ProjectItem::Category::none and renderSeparateTracks() writes per-track files, so read completeRender() together with renderSeparateTracks(), RenderPass::~RenderPass() and RenderOptions::getRenderParameters() to see which output files should count. Done means an in-memory Edit rendered with separate tracks reports success, covered by a small unit test.

Written by the indexing model from the issue text.

Description

Detailed steps on how to reproduce the bug

I'm performing a render for an in-memory Edit (meaning, no project file on disk exists for the Edit).

Additionally, I'm rendering to seperate tracks.

The problem is that EditRenderJob is reporting the job as failed, due to what I believe is a bug in the logic in the following Tracktion code:

bool EditRenderJob::completeRender()
{
    CRASH_TRACER

    if (result.items.size() > 0
         || (params.category == ProjectItem::Category::none && proxy.getFile().existsAsFile()))
        result.result = juce::Result::ok();

    return result.result.wasOk();
}

Given that my Edit is an in-memory edit, params.category stays at its default value of ProjectItem::Category::none (see Renderer::Parameters RenderOptions::getRenderParameters (Edit& edit, SelectionManager* selectionManager, TimeRange markedRegionTime)).

This results in result.items (list of ProjectItems) being empty, for which the logic is found in RenderPass::~RenderPass().

Looking at the condition up in completeRender, the only other thing that can make the job be marked as success is if the proxy file exists. The problem is that the proxy file doesn't exist if separateTracks is true, which it is for me, because then each track is rendered to a unique file, not to the proxy file. See the code below from void EditRenderJob::renderSeparateTracks():

auto file = proxy.getFile();
auto trackFile = file.getSiblingFile (file.getFileNameWithoutExtension()
                                                       + " " + track->getName()
                                                       + " " + TRANS("Render") + " 0"
                                                       + file.getFileExtension());

params.destFile = juce::File (juce::File::createLegalPathName (getNonExistentSiblingWithIncrementedNumberSuffix (trackFile, false)
                                                                                .getFullPathName()));

Any idea how to fix this?

What is the expected behaviour?

The job succeeds :)

Unit test to reproduce the error?

Operating systems

macOS

What versions of the operating systems?

15.6.1 (24G90)

Architectures

ARM

Stacktrace

Plug-in formats (if applicable)

Standalone

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

The bug is present on the develop branch

Code of Conduct
  • I agree to follow the Code of Conduct
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.