Summary: When I try to get SVN annotations for my Python .py source file, Xcode produces an internal error from an uncaught exception and will eventually crash if I try multiple times to get annotations. Steps to Reproduce: 1. In Xcode SCM preferences, check Configure SCM Automatically. 2. Launch Xcode with Pulsar.xcodeproj, which was checked out from SVN repository. This is a PyObjC app. 3. Wait a minute for SVN to load SCM info. 4. Open Python source file ARXMTracker.py 5. From SCM menu, select Get Annotations For Latest. 6. In the Internal Error window, press Continue. 7. Repeat step 5. Expected Results: Xcode shows the annotations for the source file. Actual Results: After step 5, Internal Error window for Uncaught Exception *** -[NSCFString getLineStart:end:contentsEnd:forRange:]: Range or index out of bounds. After step 7, Xcode crashes. Regression: No regression testing done. Notes: Here is the internal error stacktrace logged to the console: 2/3/09 8:13:52 PM Xcode 376 com.apple.console Warning ** INTERNAL ERROR: Uncaught Exception ** Exception: *** -[NSCFString getLineStart:end:contentsEnd:forRange:]: Range or index out of bounds Stack: 0 0x92cbc10b __raiseError (in CoreFoundation) 1 0x93608e3b objc_exception_throw (in libobjc.A.dylib) 2 0x92cbbeeb +[NSException raise:format:arguments:] (in CoreFoundation) 3 0x92cbbf2a +[NSException raise:format:] (in CoreFoundation) 4 0x919eba5d -[NSCFString getLineStart:end:contentsEnd:forRange:] (in Foundation) 5 0x919ec09e -[NSString lineRangeForRange:] (in Foundation) 6 0x0027545e -[XCPythonScanner computeContext:inString:forLocation:] (in XcodeEdit) 7 0x00275097 -[XCPythonScanner parseOneIncludedRule:inTree:withContext:initialToken:inputStream:range:dirtyRange:isLexing:reusedToken:] (in XcodeEdit) 8 0x00233f98 -[XCSourceScanner parseIncludedRules:inTree:withContext:initialToken:inputStream:range:dirtyRange:] (in XcodeEdit) 9 0x00233424 -[XCSourceScanner parse:withContext:initialToken:inputStream:range:dirtyRange:] (in XcodeEdit) 10 0x00232f49 -[XCSourceModel parse] (in XcodeEdit) 11 0x0022cc1a -[XCTextStorage sourceModel] (in XcodeEdit) 12 0x0022cb0d -[XCTextStorage cachedSourceModelItemAtCharacterIndex:] (in XcodeEdit) 13 0x0022c6c7 -[XCTextStorage colorIdAtCharacterIndex:inTextView:effectiveRange:] (in XcodeEdit) 14 0x0022c4c1 -[XCTextStorage fixSyntaxColoringInRange:] (in XcodeEdit) 15 0x0022c0ee -[XCTextStorage fixAttributesInRange:] (in XcodeEdit) 16 0x94009acb -[NSTextStorage processEditing] (in AppKit) 17 0x0022b9f6 -[XCTextStorage processEditing] (in XcodeEdit) 18 0x93f39407 -[NSTextStorage endEditing] (in AppKit) 19 0x0024eeeb -[XCTextStorage endEditing] (in XcodeEdit) 20 0x0022d615 -[XCTextStorage setLanguage:] (in XcodeEdit) 21 0x00dfea0a -[XCSCMController scmAnnotateDidEnd:] (in DevToolsInterface) 22 0x91959e1a _nsnote_callback (in Foundation) 23 0x92c238da __CFXNotificationPost (in CoreFoundation) 24 0x92c23bb3 _CFXNotificationPostNotification (in CoreFoundation) 25 0x91957080 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation) 26 0x0076c91e -[XCSourceControlManager finishAnnotate:] (in DevToolsCore) 27 0x007f6527 -[SCMRequest reportCompletionWithCode:] (in DevToolsCore) 28 0x008004ff -[SCMModel handleFinishedRequest:] (in DevToolsCore) 29 0x007f50b8 -[SCMSandbox handleFinishedRequest:] (in DevToolsCore) 30 0x007f660e -[SCMRequest reportFinished] (in DevToolsCore) 31 0x0080260a -[SCMManager handlePortMessage:] (in DevToolsCore) 32 0x91994823 __NSFireMachPort (in Foundation) 33 0x92c1e455 __CFMachPortPerform (in CoreFoundation) 34 0x92c428e8 CFRunLoopRunSpecific (in CoreFoundation) 35 0x92c42cd8 CFRunLoopRunInMode (in CoreFoundation) 36 0x9654e2c0 RunCurrentEventLoopInMode (in HIToolbox) 37 0x9654e0d9 ReceiveNextEventCommon (in HIToolbox) 38 0x9654df4d BlockUntilNextEventMatchingListInMode (in HIToolbox) 39 0x93ea5d7d _DPSNextEvent (in AppKit) 40 0x93ea5630 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit) 41 0x93e9e66b -[NSApplication run] (in AppKit) 42 0x93e6b8a4 NSApplicationMain (in AppKit) 43 0x00002bca