From: Jonathan d. S. <mai...@st...> - 2008-06-13 16:23:11
|
While recording using QTCaptureMovieFileOutput, QTKit calls +[NSBundle bundleForClass:] on a background thread. RubyCocoa patches +[NSBundle bundleForClass:] in mdl_bundle_support.m. For reasons I have yet to figure out, when called on a background thread, this eventually causes your app to die a horrible death with "stack level too deep (SystemStackError)", and a badly smashed stack. Maybe it's just a ruby threading problem - I can't see any way that RubyCocoa would descend into calling ruby code from within the rubycocoa_bundleForClass method. A sample project demonstrating this can be found here - http://steelskies.com/QTKitTests.zip - it simply kicks off a background thread, then repeatedly calls bundleForClass:. If your experience is anything like mine, it ought to crash after around 10 seconds. If anyone has a workaround (short of just compiling my own RubyCocoa that doesn't patch bundleForClass:), I'd love to hear it. -Jonathan |