Hi again -
I somehow triggered a small bug in OUIEditableFrame: the setAttributedText:newContent method bombs (in replaceCharactersInRange) when newContent is nil. My countermeasure is of course simple as you can see below. A simple bit of defensive programming ;-) Don't ask me how since it is simply pulling the Hello.rtf from the picker and just started acting bizarre, possibly a leak in another part of my code (which I am pursuing) ... Anyhoo, worth reporting. You also have the backtrace.
Spira
Backtrace:
I somehow triggered a small bug in OUIEditableFrame: the setAttributedText:newContent method bombs (in replaceCharactersInRange) when newContent is nil. My countermeasure is of course simple as you can see below. A simple bit of defensive programming ;-) Don't ask me how since it is simply pulling the Hello.rtf from the picker and just started acting bizarre, possibly a leak in another part of my code (which I am pursuing) ... Anyhoo, worth reporting. You also have the backtrace.
Spira
Quote:
// Called by both -setAttributedText: and -setTextStorage: - (void)setAttributedText:(NSAttributedString *)newContent { [self textStorage]; // Make sure our text storage has been created.} |
Quote:
bt #0 -[OUIEditableFrame setAttributedText:] (self=0x11c61d30, _cmd=0x15f057) at /Volumes/Shiva/Users/Me/Development/iPhone/iPhone_Apps/Lux/Framework/OmniGroup/Frameworks/OmniUI/iPad/OUIEditableFrame.m:2270 #1 0x000f96d3 in -[OUIEditableFrame didMoveToWindow] (self=0x11c61d30, _cmd=0x393c238) at /Volumes/Shiva/Users/Me/Development/iPhone/iPhone_Apps/Lux/Framework/OmniGroup/Frameworks/OmniUI/iPad/OUIEditableFrame.m:1812 #2 0x00b375a7 in -[UIView(Internal) _didMoveFromWindow:toWindow:] () #3 0x00b37244 in -[UIView(Internal) _didMoveFromWindow:toWindow:] () #4 0x00b413c1 in -[UIScrollView _didMoveFromWindow:toWindow:] () #5 0x00b37244 in -[UIView(Internal) _didMoveFromWindow:toWindow:] () #6 0x00b33a00 in -[UIView(Hierarchy) _postMovedFromSuperview:] () #7 0x00b387b8 in -[UIView(Internal) _addSubview:positioned:relativeTo:] () #8 0x00b324bb in -[UIView(Hierarchy) addSubview:] () #9 0x0002f1f6 in -[CanvasToolbarViewController _prepareViewControllerForContainment:hidden:] (self=0xbaac940, _cmd=0x160f0e, soonToBeInnerViewController=0x11a60830, hidden=1 '\001') at /Volumes/Shiva/Users/Me/Development/iPhone/iPhone_Apps/Lux/Framework/ImageEditor/Canvas/CanvasToolbarViewController.m:137 #10 0x0002f4d4 in -[CanvasToolbarViewController setInnerViewController:animatingFromView:rect:toVi ew:rect:] (self=0xbaac940, _cmd=0x161033, viewController=0x11a60830, fromView=0xbaa0840, fromViewRect={origin = {x = 0, y = 0}, size = {width = 0, height = 0}}, toView=0x11c61d30, toViewRect={origin = {x = 0, y = 0}, size = {width = 0, height = 0}}) at /Volumes/Shiva/Users/Me/Development/iPhone/iPhone_Apps/Lux/Framework/ImageEditor/Canvas/CanvasToolbarViewController.m:197 #11 0x000301b9 in -[CanvasToolbarViewController setInnerViewController:animatingView:toView:] (self=0xbaac940, _cmd=0x15e8e4, viewController=0x11a60830, fromView=0xbaa0840, toView=0x11c61d30) at /Volumes/Shiva/Users/Me/Development/iPhone/iPhone_Apps/Lux/Framework/ImageEditor/Canvas/CanvasToolbarViewController.m:303 #12 0x00017874 in -[CanvasSingleAppController setupInnerViewControllerForDocument:animated:] (self=0xbaa1e20, _cmd=0x15e957, thisDocument=0x11a5ef10, anim=1 '\001') at /Volumes/Shiva/Users/Me/Development/iPhone/iPhone_Apps/Lux/Framework/ImageEditor/Canvas/CanvasSingleAppController.m:701 #13 0x00017eba in -[CanvasSingleAppController _mainThread_finishedLoadingDocument:] (self=0xbaa1e20, _cmd=0x15e83a, result=0x11a5ef10) at /Volumes/Shiva/Users/Me/Development/iPhone/iPhone_Apps/Lux/Framework/ImageEditor/Canvas/CanvasSingleAppController.m:785 #14 0x026feea2 in -[NSObject performSelector:withObject:] () #15 0x0140b98f in __NSThreadPerformPerform () #16 0x026d19af in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FU NCTION__ () #17 0x02634bf3 in __CFRunLoopDoSources0 () #18 0x026344d4 in __CFRunLoopRun () #19 0x02633e34 in CFRunLoopRunSpecific () #20 0x02633d4b in CFRunLoopRunInMode () #21 0x02c439dd in GSEventRunModal () #22 0x02c43aa2 in GSEventRun () #23 0x00afba1b in UIApplicationMain () #24 0x00002c6d in main (argc=1, argv=0xbffff460) at /Volumes/Shiva/Users/Me/Development/iPhone/iPhone_Apps/Lux/Framework/ImageEditor/Canvas/main.m:29 (gdb) |