[Bug]: False negative in EditRenderJob
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
- Domain
- audio-video-rtc
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Tracktion/tracktion_engine
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Tracktion/tracktion_engine#475 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Tracktion/tracktion_engine#476 · 5 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
Tracktion/tracktion_engine#474 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Tracktion/tracktion_engine#473 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 56/100
Tracktion/tracktion_engine#460 ·
Maintainers usually reply within 1 day
All issues in Tracktion/tracktion_engine
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
(S1 - Need confirmation)
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
CleverRaven/Cataclysm-DDA#89182 ·
Maintainers usually reply within 1 day
-
ai_p2
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ClickHouse/ClickHouse#126833 ·
Maintainers usually reply within 1 day
-
clang:static analyzer
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
llvm/llvm-project#233598 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100