Jacob Wallström
jacob****@ghost*****
Sat Oct 27 07:03:42 JST 2007
H On 26 okt 2007, at 23.15, Laurent Sansonetti wrote: > Hi Jacob, > > On Oct 26, 2007, at 9:45 PM, Jacob Wallström wrote: > >> Hi, >> >> I have an application that is having problem starting on Leopard but >> works on Tiger. I get the following message: >> >> RBCocoaInstallRubyThreadSchedulerHooks: couldn't find autoreleasePool >> ivar >> I remember reading a several discussions on this list about threading >> in RC. Given that I currently target 10.4 and 10.5, the standard >> ruby >> install and don't need multiple threads in RC, how can I get this to >> work? > > This message is just a warning and should not be the cause of your > problem. > > Last time I tried building a RC on Tiger, then I could manage to run > it on both Tiger and Leopard successfully. > > Could you copy/paste the crash log when running your app under > Leopard? Also, on which platform did you build it? > > Laurent I'm building it on Leopard and linking it with RC on Leopard and standard ruby on Leopard. (Although the build from Tiger didn't work either.) I have the stack trace attached below (from my own exception handler). The class "Action" is a ruby subclass of NSManagedObject. I don't know where the super:valueForUndefinedKey call is coming from, I'm never calling that method myself. If I add the following method to the Action class, I don't get this particular crash but another one. Curiosly, the method is never called. def valueForUndefinedKey(x) raise "Error" end =========================== NSInvalidArgumentException: *** -[Action super:valueForUndefinedKey:]: unrecognized selector sent to instance 0x11d6eb00 == Objective-C trace == NSExceptionHandlerExceptionRaiser (in ExceptionHandling) objc_exception_throw (in libobjc.A.dylib) -[NSObject doesNotRecognizeSelector:] (in CoreFoundation) ___forwarding___ (in CoreFoundation) _CF_forwarding_prep_0 (in CoreFoundation) ovmix_register_ruby_method (in RubyCocoa) _NSGetUsingKeyValueGetter (in Foundation) -[NSFunctionExpression expressionValueWithObject:context:] (in Foundation) -[NSComparisonPredicate evaluateWithObject:substitutionVariables:] (in Foundation) -[NSCompoundPredicateOperator evaluatePredicates:withObject:substitutionVariables:] (in Foundation) -[NSCompoundPredicate evaluateWithObject:substitutionVariables:] (in Foundation) -[NSPredicate evaluateWithObject:] (in Foundation) _filterObjectsUsingPredicate (in Foundation) -[NSMutableArray(NSPredicateSupport) filterUsingPredicate:] (in Foundation) -[NSArrayController _filterObjects:] (in AppKit) -[NSArrayController arrangeObjects:] (in AppKit) -[NSArrayController _arrangeObjectsWithSelectedObjects:avoidsEmptySelection:operationsMask:useBasis :] (in AppKit) -[NSArrayController setContent:] (in AppKit) -[NSArrayDetailBinder _refreshDetailContentInBackground:] (in AppKit) NSKVONotify (in Foundation) -[NSObject(NSKeyValueObservingPrivate) _notifyObserversForKeyPath:change:] (in Foundation) -[NSController _notifyObserversForKeyPath:change:] (in AppKit) -[NSController observeValueForKeyPath:ofObject:change:context:] (in AppKit) -[NSArrayController observeValueForKeyPath:ofObject:change:context:] (in AppKit) NSKVONotify (in Foundation) -[NSObject(NSKeyValueObservingPrivate) _didChangeValuesForKeys:] (in Foundation) _PFFaultHandlerFulfillFault (in CoreData) -[NSFaultHandler fulfillFault:withContext:] (in CoreData) _sharedIMPL_pvfk_core (in CoreData) -[NSManagedObject valueForKey:] (in CoreData) -[NSObject(NSKeyValueCoding) valueForKeyPath:] (in Foundation) -[NSArrayController _singleValueForKeyPath:] (in AppKit) -[NSObject(NSKeyValueCoding) valueForKeyPath:] (in Foundation) -[NSBinder _valueForKeyPath:ofObject:mode:raisesForNotApplicableKeys:] (in AppKit) -[NSBinder valueForBinding:resolveMarkersToPlaceholders:] (in AppKit) -[NSEditableBinder enabledState] (in AppKit) -[NSEditableBinder _setStatesImmediatelyInObject:mode:triggerRedisplay:] (in AppKit) -[NSEditableBinder _observeValueForKeyPath:ofObject:context:] (in AppKit) NSKVONotify (in Foundation) -[NSObject(NSKeyValueObservingPrivate) _notifyObserversForKeyPath:change:] (in Foundation) -[NSController _notifyObserversForKeyPath:change:] (in AppKit) -[NSController didChangeValueForKey:] (in AppKit) -[NSArrayController didChangeValuesForArrangedKeys:objectKeys:indexKeys:] (in AppKit) -[NSArrayController _arrangeObjectsWithSelectedObjects:avoidsEmptySelection:operationsMask:useBasis :] (in AppKit) -[NSArrayController setContent:] (in AppKit) -[NSArrayController(NSManagedController) _performFetchWithRequest:merge:error:] (in AppKit) -[NSObjectController(NSManagedController) fetchWithRequest:merge:error:] (in AppKit) -[NSObjectController(NSManagedController) _executeFetch:didCommitSuccessfully:actionSender:] (in AppKit) _NSSendCommitEditingSelector (in AppKit) -[NSController _controllerEditor:didCommit:contextInfo:] (in AppKit) __invoking___ (in CoreFoundation) -[NSInvocation invoke] (in CoreFoundation) -[NSInvocation invokeWithTarget:] (in CoreFoundation) __NSFireDelayedPerform (in Foundation) CFRunLoopRunSpecific (in CoreFoundation) CFRunLoopRunInMode (in CoreFoundation) RunCurrentEventLoopInMode (in HIToolbox) ReceiveNextEventCommon (in HIToolbox) BlockUntilNextEventMatchingListInMode (in HIToolbox) _DPSNextEvent (in AppKit) -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit) == Ruby trace == RubyCocoa.framework/Resources/ruby/osx/objc/oc_wrapper.rb:50:in `ocm_send' RubyCocoa.framework/Resources/ruby/osx/objc/oc_wrapper.rb:50:in `method_missing' main2.rb:17