title: app crashes when doing a search on a PDF file
body: <p>I'm using <a href="https://github.com/mobfarm/FastPdfKit" rel="nofollow noreferrer">FastPdfKit</a>  to open PDF documents on iPhone, however, when I try to use the search feature on a heavy loaded graphics pdf file, the app crashes when tapping on the search icon (exactly after typing in the search term and tapping on the search icon).</p>
  
  <p>this is a screenshot of the crash:
  <img src="https://i.stack.imgur.com/8dd3V.png" alt="enter image description here"></p>
  
  <p>Now I have a doubt that it's a multi-threading issue, as I know that the phrase: <code>Switching to process xxxx thread xxxx</code> shows at app launch in the usual situations, but I noticed that this phrase shows in console window of xcode as follows (depicted in the screenshot):</p>
  
  <p>twice at app launch (this is weird, supposed to be one not two)</p>
  
  <p>one time at opening a PDF document (this is OK since the main app is starting to use <code>FastPdfKit</code> framework, i.e. a mini new app comes in)</p>
  
  <p>one time at opening the <code>SearchViewController</code> of <code>FastPdfKit</code> (and this is weird because there is no new app comes in)</p>
  
  <p>and lastly, twice at application crash after exactly hitting the search icon.</p>
  
  <p>my questions are:</p>
  
  <p>1) is multiple appearance of the phrase <code>Switching to process xxxx thread xxxx</code> normal at the situations listed above ?</p>
  
  <p>2) do you have any hint of how to solve this crash.</p>
  
  <p>p.s. the crash happens only on device (iphone 4s) but not on simulator.</p>
  
  <p>thank you in advance.</p>