Note that there are some explanatory texts on larger screens.

plurals
  1. POUIWebview crashes on loading certain pdf document on ios7 only
    primarykey
    data
    text
    <p>I have <strong>iPhone application</strong> which uses <code>UIWebview</code> to show documents. When I try to open certain pdf file, the app crashes with this exception:</p> <pre><code>0 CoreFoundation 0x036925e4 __exceptionPreprocess + 180, 1 libobjc.A.dylib 0x02c2d8b6 objc_exception_throw + 44, 2 CoreFoundation 0x036923bb +[NSException raise:format:] + 139, 3 QuartzCore 0x0126bcaa _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 190, 4 QuartzCore 0x0126be69 -[CALayer setPosition:] + 68, 5 QuartzCore 0x0126c56f -[CALayer setFrame:] + 799, 6 UIKit 0x017e572c -[UIView(Geometry) setFrame:] + 302, 7 UIKit 0x01d14bcb -[UIWebPDFViewHandler didDetermineDocumentBounds:] + 161, 8 UIKit 0x01d0f2b4 -[UIWebPDFView didCompleteLayout] + 628, 9 WebKit 0x069cbac1 -[WebPDFViewPlaceholder _notifyDidCompleteLayout] + 161, 10 libobjc.A.dylib 0x02c3f81f -[NSObject performSelector:withObject:] + 70, 11 Foundation 0x026759d8 __NSThreadPerformPerform + 285, 12 CoreFoundation 0x0361b83f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15, 13 CoreFoundation 0x0361b295 __CFRunLoopDoSources0 + 437, 14 CoreFoundation 0x0363829e __CFRunLoopRun + 910, 15 CoreFoundation 0x03637ac3 CFRunLoopRunSpecific + 467, 16 CoreFoundation 0x036378db CFRunLoopRunInMode + 123, 17 GraphicsServices 0x035bd9e2 GSEventRunModal + 192, 18 GraphicsServices 0x035bd809 GSEventRun + 104, 19 UIKit 0x0178ed3b UIApplicationMain + 1225, 20 Navigator 0x0000317d main + 141, 21 libdyld.dylib 0x041a570d start + 1 </code></pre> <p>Obviously this specific pdf document is corrupted, but the <code>UIWebview</code> crashes only on <strong>iOS7</strong>. on <strong>iOS6</strong> devices and simulator the file is not shown but the application survives.</p> <p>I would love if anyone could explain the source for this difference, and more important - how to avoid such situations from crashing my app.</p> <p>Edit: you can try and play with a sample project i have created to show the problem. The project is here: <a href="https://github.com/eliktz/testWebViewProject" rel="nofollow">https://github.com/eliktz/testWebViewProject</a> You can see how the application crashes on the corrupted file when running on <strong>ios7 simulator</strong>, and survives on <strong>ios6 simulator</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload