markwylde opened a new issue #206: Fresh PhoneGap iOS Simulator crash on 
keyboard
URL: https://github.com/apache/cordova/issues/206
 
 
   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   1. I create a brand new PhoneGap app
   2. I edit the `index.html` file to add a `<input />` element
   3. I install and build the iOS platform
   4. I open the xcode project
   5. I run the xcode project
   6. My app opens
   7. I click the input element
   8. I type "this is a TEST"
   9. The text appears in the field and the app does not crash
   
   ### What does actually happen?
   1. I create a brand new PhoneGap app
   2. I edit the `index.html` file to add a `<input />` element
   3. I install and build the iOS platform
   4. I open the xcode project
   5. I run the xcode project
   6. My app opens
   7. I click the input element
   8. I type "this is a TEST"
   9. As soon as I hit the shift button on the keyboard, the app crashes
   
   
   ## Information
   As soon as I hit shift, xcode debugger catches the crash with the following 
logs:
   
   ```
   2020-03-30 11:29:51.622251+1000 helloworld[37511:711460] *** Terminating app 
due to uncaught exception 'NSInvalidArgumentException', reason: '*** 
-[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert 
nil object from objects[1]'
   *** First throw call stack:
   (
        0   CoreFoundation                      0x00007fff23e3dcce 
__exceptionPreprocess + 350
        1   libobjc.A.dylib                     0x00007fff50b3b9b2 
objc_exception_throw + 48
        2   CoreFoundation                      0x00007fff23ed0821 
_CFThrowFormattedException + 194
        3   CoreFoundation                      0x00007fff23edb276 
-[__NSPlaceholderDictionary initWithObjects:forKeys:count:].cold.4 + 38
        4   CoreFoundation                      0x00007fff23e9c547 
-[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 247
        5   CoreFoundation                      0x00007fff23e39bd1 
+[NSDictionary dictionaryWithObjects:forKeys:count:] + 49
        6   UIAccessibility                     0x00007fff480255c4 
AXUIAutomationHandleKeyComplete + 200
        7   WebKitLegacy                        0x000000010b30f582 
sendNotificationAfterHandlingWebKeyEventIfNeeded + 144
        8   WebKitLegacy                        0x000000010b30f4de 
-[DOMNodeAccessibility handleKeyWebEvent:] + 72
        9   CoreFoundation                      0x00007fff23e44c4c 
__invoking___ + 140
        10  CoreFoundation                      0x00007fff23e41e31 
-[NSInvocation invoke] + 321
        11  CoreFoundation                      0x00007fff23e42104 
-[NSInvocation invokeWithTarget:] + 68
        12  UIKitCore                           0x00007fff49168101 
-[UIThreadSafeNode forwardInvocation:] + 92
        13  CoreFoundation                      0x00007fff23e42476 
___forwarding___ + 838
        14  CoreFoundation                      0x00007fff23e449b8 
_CF_forwarding_prep_0 + 120
        15  UIKitCore                           0x00007fff48a3b4c3 
-[UIKeyboardImpl 
_handleWebKeyEvent:withEventType:withInputString:withInputStringIgnoringModifiers:executionContext:]
 + 635
        16  UIKitCore                           0x00007fff48a3d30c 
-[UIKeyboardImpl handleModifiersChangeForKeyEvent:executionContext:] + 528
        17  UIKitCore                           0x00007fff48a51e55 
-[UIKeyboardTaskEntry execute:] + 147
        18  UIKitCore                           0x00007fff48a5096b 
-[UIKeyboardTaskQueue continueExecutionOnMainThread] + 310
        19  UIKitCore                           0x00007fff48a3c6be 
-[UIKeyboardImpl handleKeyEvent:] + 201
        20  CoreFoundation                      0x00007fff23e44c4c 
__invoking___ + 140
        21  CoreFoundation                      0x00007fff23e41e31 
-[NSInvocation invoke] + 321
        22  UIKitCore                           0x00007fff48fbeafd 
-[UIRepeatedAction invoke] + 278
        23  UIKitCore                           0x00007fff48fbecfd 
-[UIRepeatedAction _preInvocationTimerFire] + 45
        24  UIKitCore                           0x00007fff48c33d2f 
-[UIApplication _handleKeyboardPressEvent:] + 2214
        25  UIKitCore                           0x00007fff48c1dd43 
-[UIApplication pressesBegan:withEvent:] + 401
        26  UIKitCore                           0x00007fff48c46c66 
forwardTouchMethod + 323
        27  UIKitCore                           0x00007fff48c4a98e 
-[UIResponder pressesBegan:withEvent:] + 49
        28  UIKitCore                           0x00007fff48c46c66 
forwardTouchMethod + 323
        29  UIKitCore                           0x00007fff48c4a98e 
-[UIResponder pressesBegan:withEvent:] + 49
        30  UIKitCore                           0x00007fff48c46c66 
forwardTouchMethod + 323
        31  UIKitCore                           0x00007fff48c4a98e 
-[UIResponder pressesBegan:withEvent:] + 49
        32  UIKitCore                           0x00007fff48c46c66 
forwardTouchMethod + 323
        33  UIKitCore                           0x00007fff48c4a98e 
-[UIResponder pressesBegan:withEvent:] + 49
        34  UIKitCore                           0x00007fff48c46c66 
forwardTouchMethod + 323
        35  UIKitCore                           0x00007fff48c4a98e 
-[UIResponder pressesBegan:withEvent:] + 49
        36  UIKitCore                           0x00007fff48c46c66 
forwardTouchMethod + 323
        37  UIKitCore                           0x00007fff48c4a98e 
-[UIResponder pressesBegan:withEvent:] + 49
        38  UIKitCore                           0x00007fff48c46c66 
forwardTouchMethod + 323
        39  UIKitCore                           0x00007fff48c4a98e 
-[UIResponder pressesBegan:withEvent:] + 49
        40  UIKitCore                           0x00007fff48c46c66 
forwardTouchMethod + 323
        41  UIKitCore                           0x00007fff48c4a98e 
-[UIResponder pressesBegan:withEvent:] + 49
        42  UIKitCore                           0x00007fff48c46c66 
forwardTouchMethod + 323
        43  UIKitCore                           0x00007fff48c4a98e 
-[UIResponder pressesBegan:withEvent:] + 49
        44  UIKitCore                           0x00007fff48c565f4 -[UIWindow 
_sendButtonsForEvent:] + 393
        45  UIKitCore                           0x00007fff48c575c9 -[UIWindow 
sendEvent:] + 3273
        46  UIKitCore                           0x00007fff48c31ed9 
-[UIApplication sendEvent:] + 356
        47  UIKit                               0x00000001038363cb 
-[UIApplicationAccessibility sendEvent:] + 85
        48  UIKitCore                           0x00007fff48c32b62 
-[UIApplication _handleKeyUIEvent:] + 627
        49  UIKitCore                           0x00007fff48c49f11 
-[UIResponder _handleKeyUIEvent:] + 79
        50  UIKitCore                           0x00007fff48c49f11 
-[UIResponder _handleKeyUIEvent:] + 79
        51  UIKitCore                           0x00007fff48c49f11 
-[UIResponder _handleKeyUIEvent:] + 79
        52  UIKitCore                           0x00007fff48c49f11 
-[UIResponder _handleKeyUIEvent:] + 79
        53  UIKitCore                           0x00007fff48c49f11 
-[UIResponder _handleKeyUIEvent:] + 79
        54  UIKitCore                           0x00007fff48c49f11 
-[UIResponder _handleKeyUIEvent:] + 79
        55  UIKitCore                           0x00007fff48c49f11 
-[UIResponder _handleKeyUIEvent:] + 79
        56  UIKitCore                           0x00007fff48c49f11 
-[UIResponder _handleKeyUIEvent:] + 79
        57  UIKitCore                           0x00007fff48c49f11 
-[UIResponder _handleKeyUIEvent:] + 79
        58  UIKitCore                           0x00007fff48c32c0e 
-[UIApplication handleKeyUIEvent:] + 79
        59  UIKitCore                           0x00007fff48c328ce 
-[UIApplication handleKeyHIDEvent:] + 535
        60  UIKit                               0x000000010382fe49 
-[UIApplicationAccessibility handleKeyHIDEvent:] + 41
        61  UIKitCore                           0x00007fff48cbacd1 
__dispatchPreprocessedEventFromEventQueue + 1595
        62  UIKitCore                           0x00007fff48cbf502 
__handleEventQueueInternal + 6565
        63  UIKitCore                           0x00007fff48cb606b 
__handleHIDEventFetcherDrain + 88
        64  CoreFoundation                      0x00007fff23da1c71 
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
        65  CoreFoundation                      0x00007fff23da1b9c 
__CFRunLoopDoSource0 + 76
        66  CoreFoundation                      0x00007fff23da1374 
__CFRunLoopDoSources0 + 180
        67  CoreFoundation                      0x00007fff23d9bf6e 
__CFRunLoopRun + 974
        68  CoreFoundation                      0x00007fff23d9b884 
CFRunLoopRunSpecific + 404
        69  GraphicsServices                    0x00007fff38b5ac1a 
GSEventRunModal + 139
        70  UIKitCore                           0x00007fff48c19220 
UIApplicationMain + 1605
        71  helloworld                          0x0000000101661a61 main + 65
        72  libdyld.dylib                       0x00007fff519b910d start + 1
        73  ???                                 0x0000000000000001 0x0 + 1
   )
   libc++abi.dylib: terminating with uncaught exception of type NSException
   (lldb) 
   ```
   Xcode opens the following file:
   `helloworld > Other Sources > main.m > main(argc, argv)`
   
   With a breakpoint on this line:
   `int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");`
   
   > Thread 1: Exception: "*** -[__NSPlaceholderDictionary 
initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]"
   
   
   ### Command or Code
   No specific commands. Just build a brand new phonegap app:
   
   ```bash
   phonegap create myapp
   phonegap build ios
   ```
   
   Then open the app in xcode.
   
   ### Environment, Platform, Device
   OS: macOS Catalina 10.15.3 (19D76)
   Xcode: Version 11.4 (11E146)
   Phonegap: 9.0.0
   Tried iOS Simulator 8 Plus and 11 Plus Max
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ ] I searched for existing GitHub issues
   - [ ] I updated all Cordova tooling to most recent version
   - [ ] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to