title: iOS15 UITextView After dragging the view, it causes a crash, Invalid parameter not satisfying: pos
body: <p><a href="https://qiita.com/Yaruki00/items/219902185610b52a7a0d" rel="noreferrer">crash example</a></p>
  <p>The above article is a problem found by a netizen on the forum. Recently, I also found a similar crash stack on firebase. I guess it is also caused by this reason, and it may be the problem of data out of bounds. Do you have a good solution?</p>
  <p>Firebase crashed the stack:</p>
  <pre><code>Fatal Exception: NSInternalInconsistencyException
  Invalid parameter not satisfying: pos
  0
  CoreFoundation
  __exceptionPreprocess
  1
  libobjc.A.dylib
  objc_exception_throw
  2
  Foundation
  _userInfoForFileAndLine
  3
  UIKitCore
  -[_UITextKitTextPosition compare:]
  4
  UIKitCore
  -[UITextInputController comparePosition:toPosition:]
  5
  UIKitCore
  -[UITextView comparePosition:toPosition:]
  6
  UIKitCore
  -[UITextPasteController _clampRange:]
  7
  UIKitCore
  __87-[UITextPasteController _performPasteOfAttributedString:toRange:forSession:completion:]_block_invoke
  8
  UIKitCore
  __87-[UITextPasteController _performPasteOfAttributedString:toRange:forSession:completion:]_block_invoke.177
  9
  UIKitCore
  -[UITextInputController _pasteAttributedString:toRange:completion:]
  10
  UIKitCore
  -[UITextPasteController _performPasteOfAttributedString:toRange:forSession:completion:]
  11
  UIKitCore
  __49-[UITextPasteController _executePasteForSession:]_block_invoke
  12
  libdispatch.dylib
  _dispatch_call_block_and_release
  13
  libdispatch.dylib
  _dispatch_client_callout
  14
  libdispatch.dylib
  _dispatch_main_queue_callback_4CF
  15
  CoreFoundation
  __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
  16
  CoreFoundation
  __CFRunLoopRun
  17
  CoreFoundation
  CFRunLoopRunSpecific
  18
  GraphicsServices
  GSEventRunModal
  19
  UIKitCore
  -[UIApplication _run]
  20
  UIKitCore
  UIApplicationMain
  21
  HelloTalk_Binary
  main.m -  20 
  main + 20
  </code></pre>