Mobile Safari crashes or reloads after taking a picture to populate file input

Originator:hello
Number:rdar://20172315 Date Originated:2015-03-16
Status:Closed Resolved:iOS 9
Product:iOS Product Version:8.2
Classification:Crash Reproducible:Sometimes
 
Summary:
Mobile Safari crashes or reloads the page showing "A problem occurred with this webpage so it was reloaded". when the user takes a photo after tapping on a HTML file input.

Steps to Reproduce:
1. Open a few other tabs with relatively heavy websites (NYTimes, Guardian, CNN, BBC, Adobe, Google image search)
2. Open a website with a file upload on it
3. Select "Choose file"
4. Select "Take Picture" from the action sheet

Expected Results:
The selected file should populate the input field without crashing the tab/browser.

Actual Results:
Sometimes the website reloads and shows "A problem occurred with this webpage so it was reloaded" in the banner at the top. On a few occasions we've seen Mobile Safari crashing completely, not just reloading the current tap.

Version:
iOS 8.2 (12D508)

Notes:
The behaviour is more likely to happen the more memory is used by a website and other tabs. However, at the same time, we tried reducing the memory footprint of our website and it doesn't make much of a difference.

I don't know if it's relevant but we also use a few CSS transitions.

We tried building an isolated case to showcase the behaviour. However with a lot less CSS and Javascript it doesn't cause the crash/reload.

Also, trying the same on other devices it seems to be only happening on iPhone 6.

Configuration:
iPhone 6, 64GB, O2 UK, using WiFi


The crash log shows:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0004000000000368
Triggered by Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   WebKit                        	0x000000018a775e94 WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon(WTF::Vector<WTF::String, 0ul, WTF::CrashOnOverflow> const&, WTF::String const&, API::Data const*) + 44
1   WebKit                        	0x000000018a751de4 WebKit::WebOpenPanelResultListenerProxy::chooseFiles(API::Array*, API::String*, API::Data const*) + 100
2   WebKit                        	0x000000018a751de4 WebKit::WebOpenPanelResultListenerProxy::chooseFiles(API::Array*, API::String*, API::Data const*) + 100
3   WebKit                        	0x000000018a70357c -[WKFileUploadPanel _chooseFiles:displayString:iconImage:] + 468
4   libdispatch.dylib             	0x0000000196a0d990 _dispatch_call_block_and_release + 20
5   libdispatch.dylib             	0x0000000196a0d950 _dispatch_client_callout + 12
6   libdispatch.dylib             	0x0000000196a12208 _dispatch_main_queue_callback_4CF + 1604
7   CoreFoundation                	0x000000018539e2e8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
8   CoreFoundation                	0x000000018539c390 __CFRunLoopRun + 1488
9   CoreFoundation                	0x00000001852c91f0 CFRunLoopRunSpecific + 392
10  GraphicsServices              	0x000000018e6eb6f8 GSEventRunModal + 164
11  UIKit                         	0x0000000189c5a108 UIApplicationMain + 1484
12  MobileSafari                  	0x000000010006b494 0x100064000 + 29844
13  libdyld.dylib                 	0x0000000196a3aa04 start + 0

Comments

still happening with ios 10

I am seeing the same problem with an iPhone 7 running the latest iOS, page reloads with "A problem occurred with this webpage so it was reloaded", crash logs include reason:vm-thrashing

By zac.spitzer at May 18, 2017, 6:27 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!