xamarin/Xamarin.Forms
[Bug] Update results in SearchHandler crashes on real iOS device
Open
#6,505 opened on Jun 12, 2019
a/shell :shell:e/3 :clock3:help wantedi/highinactivep/iOS 🍎t/bug :bug:up-for-grabs
Repository metrics
- Stars
- (5,644 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
Description
When updating the SearchHandler.ItemsSource property, it works fine on an iOS simulator but crashes on a real device.
Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[UIKit_UISearchController___Xamarin_UISearchResultsUpdating updateSearchResultsForSearchController:]: unrecognized selector sent to instance 0x2829d9940
Native stack trace:
0 CoreFoundation 0x00000002100a5294 <redacted> + 252
1 libobjc.A.dylib 0x000000020f27f9f8 objc_exception_throw + 56
2 CoreFoundation 0x000000020ffc1ab8 <redacted> + 0
3 CoreFoundation 0x00000002100aa7c0 <redacted> + 636
4 CoreFoundation 0x00000002100ac75c _CF_forwarding_prep_0 + 92
5 UIKitCore 0x000000023c8d6da0 <redacted> + 836
6 UIKitCore 0x000000023c8d6a28 <redacted> + 284
7 UIKitCore 0x000000023c8d6184 <redacted> + 32
8 UIKitCore 0x000000023c0f03d4 <redacted> + 152
9 UIKitCore 0x000000023c869040 <redacted> + 96
10 UIKitCore 0x000000023c3121c8 <redacted> + 80
11 UIKitCore 0x000000023c3124e8 <redacted> + 440
12 UIKitCore 0x000000023cb5c414 <redacted> + 720
13 UIKitCore 0x000000023cb4f394 <redacted> + 180
14 UIKitCore 0x000000023c0f369c <redacted> + 92
15 UIKitCore 0x000000023cb4f1b4 <redacted> + 28
16 UIKitCore 0x000000023c0f398c <redacted> + 304
17 UIKitCore 0x000000023c872dec <redacted> + 296
18 UIKitCore 0x000000023c86193c <redacted> + 352
19 UIKitCore 0x000000023c88e7ac <redacted> + 116
20 CoreFoundation 0x00000002100365f8 <redacted> + 32
21 CoreFoundation 0x0000000210031320 <redacted> + 412
22 CoreFoundation 0x000000021003189c <redacted> + 1228
23 CoreFoundation 0x00000002100310b0 CFRunLoopRunSpecific + 436
24 GraphicsServices 0x000000021223179c GSEventRunModal + 104
25 UIKitCore 0x000000023c867978 UIApplicationMain + 212
26 Xaminals.iOS 0x000000010169a7a8 Xaminals.iOS + 4286376
27 Xaminals.iOS 0x000000010162418c Xaminals.iOS + 3801484
28 Xaminals.iOS 0x000000010162414c Xaminals.iOS + 3801420
29 Xaminals.iOS 0x00000001012b4630 Xaminals.iOS + 198192
30 Xaminals.iOS 0x00000001015858d8 Xaminals.iOS + 3152088
31 Xaminals.iOS 0x0000000102616bd0 mono_pmip + 24712
32 Xaminals.iOS 0x0000000102684270 mono_pmip + 472872
33 Xaminals.iOS 0x000000010268952c mono_pmip + 494052
34 Xaminals.iOS 0x00000001025fd9d8 Xaminals.iOS + 20421080
35 Xaminals.iOS 0x000000010272fa2c _Z9__isctypeim + 47160
36 Xaminals.iOS 0x00000001012b4530 Xaminals.iOS + 197936
37 libdyld.dylib 0x000000020faf68e0 <redacted> + 4
Steps to Reproduce
- Clone the Xaminals sample (https://github.com/xamarin/xamarin-forms-samples/tree/master/UserInterface/Xaminals/Xaminals)
- Debug the iOS project in a simulator
- Select the search bar and try typing something
- Results appear
- Debug the iOS project on an iPhone
- Select the search bar
- The app crashes with a native stack trace
Expected Behavior
Changing the value of ItemsSource should not crash the application
Actual Behavior
Changing the value of ItemsSource crashes the application
Basic Information
- Version with issue: 4.0.0.425677
- IDE: Visual Studio for Mac
- Platform Target Frameworks:
- iOS: 12.2 (Xamarin.iOS 12.2.1.16 - Deployment Target 8.0)
- Affected Devices: iPhone 6 (iOS 12.3.1)
Reproduction Link
https://github.com/xamarin/xamarin-forms-samples/blob/master/UserInterface/Xaminals