[MacRuby] #1312: Segfault when trying NSArray.alloc.initWithObjects(1)
MacRuby
ruby-noreply at macosforge.org
Fri Jun 3 17:15:57 PDT 2011
#1312: Segfault when trying NSArray.alloc.initWithObjects(1)
------------------------------------+---------------------------------------
Reporter: mrada@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: major | Milestone:
Component: MacRuby | Keywords: reduction
------------------------------------+---------------------------------------
Cocoa normally requires that you nil terminate your va_list list when
initializing an NSArray. If you do not add the nill termination, then
MacRuby will segfault, which is odd behaviour for a high level language.
Example:
{{{
framework 'Cocoa'
NSArray.alloc.initWithObjects(1)
}}}
Laurent mentioned that the new bridge support has an attribute that could
tell MacRuby if an argument must be null-terminated, so I will include it
as a note for later:
<method variadic='true' sentinel='0' selector='initWithObjects:'/>
--
Ticket URL: <http://www.macruby.org/trac/ticket/1312>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list