CommandPost / FCPCafe

FCP Cafe Website
https://fcp.cafe
MIT License
27 stars 17 forks source link

Random Red Lines in Timeline Render Bar #285

Open latenitefilms opened 1 year ago

latenitefilms commented 1 year ago

Apple Feedback Assistant ID: FB13434993

DESCRIBE THE BUG: Sometimes Final Cut Pro 10.7 will show random red lines in the render bar, even if there's nothing in the primary storyline or secondary storyline.


TO REPRODUCE: Unfortunately it seems random.


EXPECTED BEHAVIOUR: These red bars should only be for Apple's internal debugging?


SCREENSHOTS: random-red-lines


SPECS:

joema4 commented 10 months ago

Since we sometimes see this in some difficult cases, it would be good to have additional info on what the red render bars mean. I examined this under XCode, and found a few things but unfortunately not a complete answer.

The "render dots" are officially called the "render indicator". The FCP private library that manages that is TLKit (Timeline Kit). The class is TLKRulerLane and the instance method which draws the render dots is updateRenderIndicator. I don't have a current replication scenario for the "red render bar" case, but in all the normal cases, the stack trace when calling -[TLKRulerLane updateRenderIndicator] looks like this the below.

There are about 77 different instance methods within the TLKRulerLane class. In theory this class is the only code that updates the render indicator lane. However I don't see any of its methods which refer to debugging or invalid render state.

There are two methods which refer to something being wrong:

However, without a replication scenario, it's difficult to dig any deeper.

On 1-12-22 I filed bug FB9842233, "Retimed FCP clip becomes black or deleted after Edit>Remove Effects on multiple clips". It could cause red render bars in some failure modes. That began on 10.5.3, was filed on 10.6.1 and fixed on 10.6.2. The retiming aspect is interesting because that might involve the above method invalidateTimecodeSize, but that's just a guess. See attached of timeline with red render bars and XML analysis.

My current gut feel is the red render bars are more likely an unpredictable failure mode than an undocumented debug feature. If we ever have a portable replication scenario on a current version, I can study it more.

Normal stack trace when updating "render indicator" (render dots) above timeline ruler:

0 -[TLKRulerLane updateRenderIndicator] 1 _NSThreadPerformPerform2 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCEO_PERFORMFUNCTION _CRunLoopDoSourceO 4 _CFRunLoopDoSourcesO 中 5 _CFRunLoopRun 6 CFRunLoopRunSpecific 7 RunCurrentEventLoopInMode 8 ReceiveNextEventCommon 9_BlockUntilNextEventMatchingList/nModeWithFilter 10 _DPSNextEvent 11 - [NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] 12 - [NSApplication run] 13 LKApplicationMain 14 start FCPBlackClipRetimeBug FCP_Bug_FB9842233.txt

latenitefilms commented 10 months ago

The Final Cut Pro team tells me:

The red line is designed to indicate when something is wrong with the time range of the segment. For example, it could mean that the edit is not aligned at the proper time, or there’s something about the clip’s time for that edit/segment that is off. Essentially it’s an error in the timeline.

latenitefilms commented 10 months ago

Here an example of the red line:

image

It only works for clips on the Primary Storyline:

image

This is a 25fps timeline, and the clips that have the red lines are all 23.976fps or 24fps. These are all BRAW Toolbox clips.

Here's a FCPXML of the timeline:

https://gist.github.com/latenitefilms/ae58d43e3bfe8e3684b2e0fd92bff810

joema4 commented 10 months ago

I loaded your XML (sans data); I see the red render bar. I think they set that in TLKit -[TLKRulerLane updateRenderIndicator], but without source code, I can't tell where.

It's not in -[TLKTimelineView rulerStyle] or -[TLKRenderBarLayer setRenderDescription:]. I checked -[TLKRulerLane updateRenderIndicator], -[TLKRenderBarLayer setRenderDescription:], and -[TLKDataSourceProxy renderInfoForTimeRange:] but could not find where they are setting the red render bar (hence I can't tell the specific criteria). However, it's probably sufficient to know it means a timeline error.

I also used "log show" to check the MacOS and FCP log output, but I didn't see any assertions or other messages related to this.

latenitefilms commented 10 months ago

Have you played with Hopper?

joema4 commented 10 months ago

Yes I have it. It's impressive but I haven't used it that much. For this case I just used XCode and lldb, plus symbol lists made with 'nm'. I should have used Hopper.

-- Joe

On Tue, Feb 6, 2024 at 5:12 PM Chris Hocking @.***> wrote:

Have you played with Hopper https://www.hopperapp.com?

— Reply to this email directly, view it on GitHub https://github.com/CommandPost/FCPCafe/issues/285#issuecomment-1930925458, or unsubscribe https://github.com/notifications/unsubscribe-auth/APRV3ATLPUEHSP2K5QCGXKDYSK2F3AVCNFSM6AAAAABAD7Q6I6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZQHEZDKNBVHA . You are receiving this because you commented.Message ID: @.***>