2

I have an OS X App That builds on Lion (with latest sdk) but deploy set to 10.6 (to be able run on Snow Leo). ARC enabled.

I want's to run app on Show Leopard. Application works well on Lion.

But when I start application in 10.6 I get this exception in console:

NSRLEArray objectAtIndex:effectiveRange: Out of bounds

And nothing more. No stack or whatever. Just this one line.

What I may do to clarify situation ? Problem seems more strange, since in Lion all works good.

dmitrynikolaev
  • 8,994
  • 4
  • 30
  • 45
  • 1
    Googling for NSRLEArray seems to show that this is something used internally by NSAttributedString. If you use the NSAttributedString class somewhere, that might be a good place to start. Comment out that part and see if the crash disappears. – Ken Aspeslagh Jul 30 '12 at 15:03
  • 1
    I think you are right. At the end if there will be no another solutions, I left without options. What's more (and more) interesting, it's the difference "in vacuum" for the Lion and Snow leo. In first all ok, in the second this crash. – dmitrynikolaev Jul 30 '12 at 16:47
  • I am having the same issue with an iOS 7.0 app here: http://stackoverflow.com/questions/25748671/scrolling-through-uitableview-causes-exception-and-crash-only-on-iphone-5c – JAL Sep 09 '14 at 15:36
  • 1
    @JAL The data detectors find linkable items (addresses, websites, etc.) asynchronously to avoid blocking the main thread. This code isn't threadsafe, so if the text has changed since the operation started, this crash can occur. To fix this, you could use synchronous data detectors, or something more threadsafe like [this approach in `TTTAttributedLabel`](https://github.com/mattt/TTTAttributedLabel/blob/76aec740cea55aa9823cd25b66f1369693a95739/TTTAttributedLabel/TTTAttributedLabel.m#L1047). – Aaron Brager Nov 04 '14 at 16:57
  • @AaronBrager thank you for your answer. I have edited the original question to include the relevant code block. – JAL Nov 04 '14 at 17:25

0 Answers0