[MacRuby] #255: NSArray.new(["elem"]) segfaults
#255: NSArray.new(["elem"]) segfaults ---------------------------------------+------------------------------------ Reporter: thilo@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: NSArray constructor ---------------------------------------+------------------------------------ {{{ NSArray.new(["elem"]) }}} causes a segmentation fault with macruby 0.4 -- Ticket URL: <http://www.macruby.org/trac/ticket/255> MacRuby <http://macruby.org/>
#255: NSArray.new(["elem"]) segfaults ---------------------------------------+------------------------------------ Reporter: thilo@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: NSArray constructor ---------------------------------------+------------------------------------ Old description:
{{{ NSArray.new(["elem"]) }}}
causes a segmentation fault with macruby 0.4
New description: {{{ NSArray.new(["elem"]) }}} causes a segmentation fault with macruby 0.4 -- Comment(by mattaimonetti@…): {{{ my_array = Array.new(['elem']) }} or even better: {{{ my_array = ['eleme'] }} -- Ticket URL: <http://www.macruby.org/trac/ticket/255#comment:1> MacRuby <http://macruby.org/>
#255: NSArray.new(["elem"]) segfaults ---------------------------------------+------------------------------------ Reporter: thilo@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: NSArray constructor ---------------------------------------+------------------------------------ Comment(by thilo@…): Sure this is the preferred way. Just discovered that while playing around with mixing Obj-C and MacRuby and thought you might wanna know this. -- Ticket URL: <http://www.macruby.org/trac/ticket/255#comment:2> MacRuby <http://macruby.org/>
#255: NSArray.new(["elem"]) segfaults ---------------------------------------+------------------------------------ Reporter: thilo@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: NSArray constructor | ---------------------------------------+------------------------------------ Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.5 Comment: Doesn't seem to crash anymore with trunk. {{{ $ ./miniruby -e 'NSArray.new(["elem"])' can't modify frozen/immutable array (RuntimeError) }}} The exception is because we will firstly allocate an NSArray instance then #initialize will try to modify it, and it fails since the object is immutable. Not sure if it's meaningful to fix that. -- Ticket URL: <http://www.macruby.org/trac/ticket/255#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby