Webview crash in ios with PDFJS - ios

I have loaded a pdf in a UIWebView using PDFJS (pdf.js mozilla library).
All loading is fine, but the app crashes, when the user scrolls very fastly and when zoom. Up on debugging, I noticed that App received memory warning and crashed.
Anyone faced this issue, how do we handle the memory warning generated by UIWebview?

Related

CGPDFDocumentRef iOS 10 memory leak

This is more of a question and an answer. I had noticed in iOS 9 I had no memory issues using the CGPDF Library, and flipped through x amount of pages with no issues. See the attached screenshot, notice each page swipe the memory went down:
However in iOS 10, the exact same PDF and code had a crashing issue when you swipe a certain amount of pages. The app would crash from memory allocations. See attached screenshot, continuous rise in memory:
I'm posting this as a question of if anyone else has encountered this issue with iOS 10, how I fixed the issue was to CGPDFDocumentRelease in the didReceiveMemory warning and then immediately reload my CGPDFDocument, which let the app continue without crashing on iOS 10. After adding the release in the didReceiveMemory, my instruments looks like this, I have not tested on iOS 11 beta yet:
The fix was to add CGPDFDocumentRelease in the didReceiveMemory warning and then immediately reload my CGPDFDocument

iOS app hangs when tapped

My app occasional hangs when opening/awakening from the background. I'll tap the icon and it takes about 10 secs to even open the loading screen. It's mainly with a slow internet connection, but I would think the loading screen would come up first.
The app isn't in the store yet, it's just on my phone through the simulator, would this cause any issues? It only happens after it's been sent to the background and then re-activated.
Any ideas, sorry to be a little vague?
I'm not getting any errors and I don't have any code in the AppDelegate file.
Try to run it in instrument. There must be memory leaks.
Xcode > Open Developer Tool > Instruments

Mapkit consumes lot of memory

I have an iOS app that displays a Map with annotations as soon as the app starts. I pull data from Parse and display it. My issue is that the app consumes lot of memory. In Xcode it shows 600MB+ as soon as the map displays. It works well on simulator but crashes on an iPad.
I tried setting mapView = nil in viewDidDisappear, however, that didn't do any good. I am new to instruments, so there is lot of info that i don't understand. I am using Xcode 7.2
Can somebody help?
Thanks
Shuchi

App is crashes after successfully upload of 100+ images and then opening camera

App is crashes after successfully upload of 100+ images and opening camera. Tested application leaks with leak instrument but there is no leaks at all.
Is there any tool or solution which tell us where the problem exactly is, in which files etc..
I am displaying all the 100+ images in tableview cell.

iOS - "Received memory warning" when viewing specific PDF in UIWebView

I have an iPad app which has a UIViewController containing a UIWebView for viewing documents. I've been using this happily for some time with no problems. However I've come across a 13 page PDF document which the UIWebView loads OK but when you scroll through the pages it causes the app to crash, unless there are very few other apps loaded at the time. When running the app in debug mode, I get the message "Received memory warning" in the debug window. When the app crashes I often (but not always) get a EXC_BAD_ACCESS. I have successfully viewed much bigger PDFs than this one in the past, but this one does have more graphics. I have an iPhone app which uses the same UIViewController and this loads and views the PDF fine with no errors. Any ideas how to handle this?

Resources