Skip navigation

How do I prevent FCP crash with divide-by-0 when playing clip?

1684 Views 23 Replies Latest reply: Oct 30, 2012 8:46 AM by MgFrobozz RSS
1 2 Previous Next
MgFrobozz Calculating status...
Currently Being Moderated
Jul 24, 2012 4:21 PM

One of my customers asked if I could modify a clip so that FinalCutPro 7.0.3 could play it without crashing. I've been testing FCP's sensitivity to a number of variables, and finally generated two clips which differ slightly, one of which will crashes FCP (5 times in 5 tries), the other of which doesn't (0 times in 5 tries). The procedure is ...

  • Start FCP.
  • Add the clip to the project.
  • Drag the clip from the project list to the timeline.

 

For the problem clip, FCP pops up a dialog when adding the clip to the project ("Media Performance Warning ... The following media files are not optimized for Final Cut Pro"). Then, when the clip is dragged to the timeline, there is a 1-2 second pause, and the gui disappears. After another short pause, another dialog appears ("Final Cut Pro quit unexpectedly"), showing a stack dump. See http://www.aratas.org/apple_developer/fcp_crash.txt for the text of both dialogs.

 

The clips:

 

Both of these clips are 4:2:0 25Hz 1080p XDCAM (fourcc "hdv7"). Both use a 12-frame closed-GOP structure with 2 B pictures per I/P picture. out_xdcam_09_57_50_19.mov contains 19 frames; out_xdcam_09_57_50_20.mov contains 20 frames, 19 of which are identical to out_xdcam_09_57_50_19.mov.

 

Both clips play in these players (no leading black frames in any) ...

  • mplayer SVN-r31628-4.1.2 (linux 2.6.18-308.1.1.el5 x86_64)
  • mplayer SVN-r30369-4.2.5 (windows 7 ultimate)
  • QuickTime Player 10.1 (501.8) (Apple OS X 10.7.3)

 

I've pretty much exhausted the possibilities I could think of for FCP crashing on the 20-frame file. Any suggestions would be highly appreciated ...

Final Cut Pro 7, Mac OS X (10.7.2), FCP 7.0.3
  • Jim Cookman Level 7 Level 7 (23,435 points)

    Have you installed the Sony XDCAM plugins?

  • Michael Grenadier Level 6 Level 6 (19,800 points)

    And because I care more than uncle grump, here's where you can find the xdcam plugins (at least last time I looked).

     

    https://discussions.apple.com/docs/DOC-2721

  • Michael Grenadier Level 6 Level 6 (19,800 points)

    first, have you tried deleting your fcp preferences?  www.digitalrebellion.com has a great utiltiy to do this. 

     

    And you might consider converting your material to prores.  Although you can work with xdcam material natively in fcp, converting to prores has some advantages.  Rendering and exporting will be faster with prores material.

  • Jon Chappell Level 5 Level 5 (4,000 points)

    Final Cut Pro utilizes the QuickTime API but it would appear that Apple rewrote certain aspects (perhaps before they existed in QuickTime) so it does not obey the specifications exactly. I've seen certain situatins where FCP expects a certain amount of 0x0 bytes after an ImageDescription extension otherwise it will crash, which forces you to break the QuickTime spec, although luckily the file is still readable by other applications.

     

    So it should not be assumed that a file that other QT apps read just fine will not have problems in FCP. The only thing I know for sure is that it will never be fixed so transcoding may be your best bet.

  • Brad Bechtel Level 1 Level 1 (130 points)

    After importing your two files into FCP, in the Browser the second file that crashes is showing a Media Start and Media End value of 00:00:00:00, no Vid Rate, and a Data Rate of "nan TB/sec".  Compare that to the good file's Media End of 00:00:00:18, Vid Rate of 25 fps, and Data Rate of 0/sec.  The second file is pretty obviously corrupted in some way.

    No idea how to fix that, but there you go.

  • Meg The Dog Level 6 Level 6 (9,370 points)

    If you don't mind, what are the value of/interest in clips that are only 19 frames and 20 frames long?

     

    Just curious.

     

     

    MtD

  • Jon Chappell Level 5 Level 5 (4,000 points)

    I would have assumed FCP gets the bitrate by calculating the size of the entire video data in the file and then dividing it by the frame rate, although that doesn't seem to tally with the results above. I think it's coming out as NaN because it's doing error checking to prevent the divide by zero. Later on in the code it evidently doesn't check for it and crashes.

     

    MgFrobozz wrote:

     

    I wasn't able to find an errata for it, so I'm gradually building my own.

     

    Would you be willing to share this document? I'd be very interested to see it.

  • Jon Chappell Level 5 Level 5 (4,000 points)

    The data rate isn't calculated from just the timescale. Sample duration plays a part and there may be additional factors too.

     

    Now that I think about it, I'd definitely recommend checking the stts and elst atoms for problems. I've seen strange problems caused by edits or samples not having the same duration.

1 2 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.