I use H.264 encoding using QTKit in my application.

This Application is always crashing with a "segmentation fault" or "EXEC_BAD_ACCESS".

My debugger shows the crash at this place:

0x7fff801fea94:  je     0x7fff801feba6           ; JVTLib_101906(JVTLib_100990*, JVTLib_101383 const*, JVTLib_101895*) + 3886

( ... )

0x7fff801feaba:  movl   $1, 24(%r13)

The last "movl" line causes the crash. One can see in the comment, that it is the JVT module from the H.264 encoder (I assume).

What I don't understand is: My code worked for long time. Since yesterday it's unstable. If I use "Instruments" the code is running fine. So there must be some issue with popping up the menu. Uncommenting the videoroutines works fine (that means the menu has no memory issue)

Understanding the "magic" behind QTKit would be exciting.

Edit: I can see the object names now: The crash happens in the 'QTBackgroundQueueRun' thread, and the object is: 'PBRemoveObjectInternal(FSRefParam*, unsigned char)'

SOLUTION: Hi everyone. I finally found the problem! It was a long and hard search on Goole and co.

QTKit don't like bein interrupted by timers. If you compile your project in 'Debug' mode with debug symbols included and i.e. gdb running, the app will crash!

NSLog is working in 'Release' mode. For most debugging issues this will work. So if you need to 'really' debug your code, add some makro definitions into your project settings where all QTCaptureMovieFileOutput related code is being removed. And you're done. I wonder why QTKit is so sensitive to these things. But as we all know Quicktime is very old code and Apple is doing modernism with Quicktime X. So we can all hope for better releases next time.

0

There are 0 answers