[MacRuby-devel] NSPredicate crash
Alan Skipp
al_skipp at fastmail.fm
Thu Jan 6 15:49:51 PST 2011
Hi Laurent,
I couldn't find a crash report in Console, but Xcode gave the following with build and debug.
#0 0x7fff815020da in objc_exception_throw
#1 0x7fff81af26f0 in _qfqp2_performParsing
#2 0x7fff81af05b9 in +[NSPredicate predicateWithFormat:arguments:]
#3 0x7fff81af057c in +[NSPredicate predicateWithFormat:]
#4 0x7fff81af020d in _qfqp_InitializedGlobalData
Is this of any use or do you require more info.
Alan
On 6 Jan 2011, at 22:42, Laurent Sansonetti wrote:
> Hi Alan,
>
> The crash may be a bug in the way we compile calls to variadic functions (such as predicateWithFormat:). Could you locate the crash report and copy/paste the backtrace information?
>
> Laurent
>
> On Jan 6, 2011, at 11:14 AM, Alan Skipp wrote:
>
>> Hi everyone,
>> Has anyone had any trouble with NSPredicate causing occasional crashes when used with NSArrayController? Well actually about 50% of the time.
>>
>> What I have is a subclass of NSArrayController which is a data source for an NSTableView that accepts drag and drop operations. In 'awakeFromNib' a NSPredicate is defined, sometimes the error is just, “EXC_BAD_ACCESS”, other times there's a bit more info:
>>
>> data_source.rb:20:in `awakeFromNib': NSInvalidArgumentException: Unable to parse the format string "AND" (RuntimeError)
>>
>> This is the offending line:
>> @filter_predicate = NSPredicate.predicateWithFormat("file_type == 'NSFileTypeRegular'")
>>
>> The crash doesn't always occur, when it doesn't my app works without any problems. I've tried the predicate in macirb and the crash doesn't occur!?
>>
>> Best regards,
>> Alan
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110106/4ec2097a/attachment.html>
More information about the MacRuby-devel
mailing list