[MacRuby] #544: NSBigMutableString#tr crashes
#544: NSBigMutableString#tr crashes ----------------------------------------+----------------------------------- Reporter: vincent.isambart@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Calling NSBigMutableString#tr makes MacRuby crash if the string is not empty. NSBigMutableString is for instance the class of the value returned by NSTextField#string. To reproduce the bug: macruby -e "NSBigMutableString.stringWithString('1').tr('a','b')" -- Ticket URL: <http://www.macruby.org/trac/ticket/544> MacRuby <http://macruby.org/>
#544: NSBigMutableString#tr crashes ----------------------------------------+----------------------------------- Reporter: vincent.isambart@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by martinlagardette@…): In `string.c:str_charset_find:2901`, the following debug: {{{ printf("CFStringRef len: %ld\n", CFStringGetLength(str)); CFShowStr(str); }}} Shows this for an `NSMutableString`: {{{ $ ./miniruby -e "NSMutableString.stringWithString('abcd').tr('a','b')" CFStringRef len: 4 Length 4 IsEightBit 1 HasLengthByte 1 HasNullByte 1 InlineContents 0 Allocator SystemDefault Mutable 1 CurrentCapacity 32 DesiredCapacity 32 Contents 0x20004d9e0 }}} But it shows this for an `NSBigMutableString`: {{{ $ ./miniruby -e "NSBigMutableString.stringWithString('abcd').tr('a','b')" CFStringRef len: 8590253120 This is an NSString, not CFString unknown: [BUG] Segmentation fault }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/544#comment:1> MacRuby <http://macruby.org/>
#544: NSBigMutableString#tr crashes ----------------------------------------+----------------------------------- Reporter: vincent.isambart@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.6 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------------+----------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: MacRuby 0.5 => MacRuby 0.6 Comment: Should be fixed in trunk. -- Ticket URL: <http://www.macruby.org/trac/ticket/544#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby