Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception 'NSRangeException' for searchSpaces feature #59

Closed
wonderhero opened this issue May 22, 2018 · 9 comments
Closed

Exception 'NSRangeException' for searchSpaces feature #59

wonderhero opened this issue May 22, 2018 · 9 comments
Assignees
Labels

Comments

@wonderhero
Copy link

wonderhero commented May 22, 2018

First of all, thank you for the great library that you have written. I have discovered an issue that could be reproduce as following:

  1. Enable searchSpaces in SZMentionsListener
  2. Type Any String "@tag String" Any String in text view.
  3. Randomly keep changing cursor (Select text position) position (In quick manner) in text view.

It will throw the Range out of bounds issue.

Example of error message:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '-[__NSCFString substringWithRange:]: Range {72, 18} out of bounds; string length 86'

@szweier
Copy link
Owner

szweier commented Aug 3, 2018

Apologies for the delay here. I will look into this. Thank you for the bug report.

@szweier szweier self-assigned this Aug 3, 2018
@szweier
Copy link
Owner

szweier commented Aug 3, 2018

@wonderhero I'm a bit confused by the steps here. For step 2 am I typing Any String then creating a tag and then typing Any String? So the end result would be Any String on either side of a mention?

@wonderhero
Copy link
Author

@szweier Thank you for your response. Sorry for the unclear explanation, Any String is mean to type any characters before and after a mention.

Example: This is a test to @mention someone.

@szweier
Copy link
Owner

szweier commented Aug 3, 2018

Thanks, and then just moving the cursor will trigger this issue?

@wonderhero
Copy link
Author

@szweier Yea. Thank you.

@szweier
Copy link
Owner

szweier commented Aug 3, 2018

@wonderhero are you able to reproduce this in the example app? Pull this repo and run the SZMentionsExample scheme. I can't seem to reproduce this problem.

@wonderhero
Copy link
Author

@szweier I will try first and update you later. Thanks again.

@wonderhero
Copy link
Author

@szweier I have ran the SZMentionsExample scheme. I couldn't reproduce the problem. You may proceed to close this issue. I will look into my implementation that cause the issue. Thank you again for your effort in making this great library.

@szweier
Copy link
Owner

szweier commented Aug 3, 2018

No problem. Good luck tracking down the issue. If it turns out to be in this library please feel free to open another ticket.

@szweier szweier closed this as completed Aug 3, 2018
@szweier szweier added the invalid label Aug 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants