Strange error

Hi,

I am not sure if anyone can help me as this is quite a vague question.  I “thought” I was almost ready to release my first game which works perfectly on my android devices, however I finally got around to testing it on an iPad and have had an error all afternoon that just shut down my app (to the home screen), and since it is just shutting it down I am not getting much help from the console to help me narrow it down.

I am using GPGS and noticed that the error occurred when it was posting to the leaderboard (not everytime), and that if I removed this code then it worked OK - although I am not 100% sure on this as I did not do a huge amount of testing.

In the device “console” in xCode I see the following

Jan 11 21:51:17 iPad Truck Trials[1551] \<Warning\>: 2017-01-11 08:51:17 +0000 [Appodeal 1.3.6][info] AdItem mraid eCPM = 0.000000 did load (1 round) Jan 11 21:51:17 iPad Truck Trials[1551] \<Warning\>: 2017-01-11 08:51:17 +0000 [Appodeal 1.3.6][info] Waterfall finish with success adItem: mraid eCPM = 0.000000, failed adItems ( ) Jan 11 21:51:17 iPad Truck Trials[1551] \<Notice\>: 2017-01-11 08:51:17 +0000 [Appodeal 1.3.6][debug] Banner rtb did fail with error Error Domain=com.appodeal.error Code=195944102 "RTB, no bidders to auction" UserInfo={NSLocalizedDescription=RTB, no bidders to auction} Jan 11 21:51:17 iPad Truck Trials[1551] \<Warning\>: event.phase appodeal in main loaded Jan 11 21:51:17 iPad Truck Trials[1551] \<Warning\>: event.phase appodeal in main displayed Jan 11 21:51:17 iPad SpringBoard[47] \<Warning\>: HW kbd: Failed to set (null) as keyboard focus Jan 11 21:51:17 iPad mediaserverd[43] \<Warning\>: 21:51:17.958 WARNING: [0x40197000] 255: CMSession retain count \> 1! Jan 11 21:51:17 iPad mediaserverd[43] \<Notice\>: '' com.trucktrails(pid = 1551) setting DiscoveryMode = DiscoveryMode\_None, currentDiscoveryMode = DiscoveryMode\_None Jan 11 21:51:18 iPad com.apple.xpc.launchd[1] (UIKitApplication:com.trucktrails[0xb53f][1551]) \<Notice\>: Service exited due to signal: Abort trap: 6 Jan 11 21:51:18 iPad mediaserverd[43] \<Notice\>: '' com.trucktrails(pid = 1551) setting DiscoveryMode = DiscoveryMode\_None, currentDiscoveryMode = DiscoveryMode\_None Jan 11 21:51:18 iPad mediaserverd[43] \<Notice\>: '' (pid = 1551) setting DiscoveryMode = DiscoveryMode\_None, currentDiscoveryMode = DiscoveryMode\_None Jan 11 21:51:18 iPad SpringBoard[47] \<Warning\>: Application 'UIKitApplication:com.trucktrails[0xb53f]' crashed. Jan 11 21:51:18 iPad UserEventAgent[23] \<Warning\>: 4179508728348: id=com.trucktrails pid=1551, state=0 Jan 11 21:51:18 iPad diagnosticd[81] \<Error\>: assertion failed: 13G36: diagnosticd + 10539 [F6A8ED43-4602-3418-A6A5-6034114E5D1E]: 0x1 Jan 11 21:51:18 iPad Unknown[81] \<Error\>: Jan 11 21:51:18 iPad diagnosticd[81] \<Error\>: Invalid trace slot 0 location 211909808 for image 'CF0C7B4F-731E-326B-8483-5B2983F9ED0E' Jan 11 21:51:18 iPad ReportCrash[1577] \<Notice\>: platform\_thread\_get\_unique\_id matched 420899 Jan 11 21:51:18 iPad ReportCrash[1577] \<Notice\>: Formulating report for corpse[1551] Truck Trials&nbsp;

I have attached the log from xCode as well.

If anyone could offer me some guidance on how I go about tracking down the source of the issue it would be appreciated.

Cheers,

Craig

Corona SDK version 3016

Mac Sierra 10.12.2

iPad 3rd Gen 9.3.5

xCode 8.2.1

I have noticed that in all the crash logs I am seeing “<Warning>: HW kbd: Failed to set (null) as keyboard focus”, I am not using a keyboard or anything, does anyone know what this is?

Cheers,

Craig

Hi.  Two things;

  1. I tested the app for much longer with GPGS logged out and there were NO errors.  Im going to put a link in the GPGS forum linking to this thread.

  2. I tested the app on my wives “iPad 4th generation Model A1460” running 10.2 and get the same error.  However, her log and console shows a bit more info.

I can now see that the HW kbd event relates to touch events on the screen (nothing to do with onscreen keyboard.)

HW kbd: currently com.trucktrails ((null) \< com.trucktrails)

Just before the crash I see the following, this is the only time in the log that the error appears;

Jan 12 09:39:32 Shangyues-iPad SpringBoard(KeyboardArbiter)[48] \<Info\>: HW kbd: currently com.trucktrails ((null) \< (null)) Jan 12 09:39:32 Shangyues-iPad SpringBoard(KeyboardArbiter)[48] \<Error\>: HW kbd: Failed to set (null) as keyboard focus

In the log there is a “__handleUncaughtException” in thread 0 which could be related to this.

And finally when I looked at the log from hockeyapp (different time stamp, but only error around same time) I can see the following.

\*\*\* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '\*\*\* -[\_\_NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'

Not sure where to go from here,  Is this an error caused by my coding, or something in Corona??  Ill try and put together a test case, but my app is quite large so I am not sure I can reproduce it…

Cheers,

Craig

I’m having a similar issue where my app crashes on device as well.

First console entries I see at crash are:

SpringBoard(KeyboardArbiter)[54] <Info>: HW kbd: currently com.my.app ((null) < (null))
SpringBoard(KeyboardArbiter)[54] <Error>: HW kbd: Failed to set (null) as keyboard focus

Unable to release until this is fixed. Anyone have any leads? It’s been really touch chasing a fix to this.

Using Corona 3023. Occurs during the clean up of a scene with numerous physics objects and joints.

Thank you

Hi jhow,

I continued this thread over in the game networking forum, since I was able to confirm that for me it was related to GPGS).

https://forums.coronalabs.com/topic/67330-gpgs-ios-crash/

Are you using GPGS?   I emailed Lerg a sample that replicated the issue, I discovered that for me the error occurred when the user posted a better leaderboard score.  I guess that he is still working on it.

Cheers,

Craig

@cbriggsnz,

Thanks for your response. After more investigating I believe it has to do with the physics engine. Will post another thread.

Might want to mark this one as “Solved”. 

Thanks!

Jeff

This seems to be a common error across all frameworks and even into native iOS development. All of the useful answers was they fixed something in their code. But in almost everyone’s case they were trying to show a text field. There was also someone discussing have custom keyboards installed.

I’m not sure why GPGS or Physics would need a text field. Are you using any? Are you trying to dismiss a keyboard that’s not showing maybe?

Rob

Hey everyone,

Are there any further development on this? I’m getting very much the same error - that is, a complete crash on iOS when submitting a leaderboard score using the new GPGS plugin, with the error “*** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]’” in the log.

This seems to _only_ occur when the player submits a score larger than their current highscore and the request goes through successfully (as the next time you run the app, the new score is reflected correctly on the leaderboard in question) before the crash. This doesn’t happen on Android, only iOS.

Also I’m not using any part of the physic engine. There are no textfields in the current scene, nor anything that attempts to access the keyboard.

Thoughts?

Thanks for the help!

I have similar issue which the app crashes when submitting new score.  Any update to this?

I have noticed that in all the crash logs I am seeing “<Warning>: HW kbd: Failed to set (null) as keyboard focus”, I am not using a keyboard or anything, does anyone know what this is?

Cheers,

Craig

Hi.  Two things;

  1. I tested the app for much longer with GPGS logged out and there were NO errors.  Im going to put a link in the GPGS forum linking to this thread.

  2. I tested the app on my wives “iPad 4th generation Model A1460” running 10.2 and get the same error.  However, her log and console shows a bit more info.

I can now see that the HW kbd event relates to touch events on the screen (nothing to do with onscreen keyboard.)

HW kbd: currently com.trucktrails ((null) \< com.trucktrails)

Just before the crash I see the following, this is the only time in the log that the error appears;

Jan 12 09:39:32 Shangyues-iPad SpringBoard(KeyboardArbiter)[48] \<Info\>: HW kbd: currently com.trucktrails ((null) \< (null)) Jan 12 09:39:32 Shangyues-iPad SpringBoard(KeyboardArbiter)[48] \<Error\>: HW kbd: Failed to set (null) as keyboard focus

In the log there is a “__handleUncaughtException” in thread 0 which could be related to this.

And finally when I looked at the log from hockeyapp (different time stamp, but only error around same time) I can see the following.

\*\*\* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '\*\*\* -[\_\_NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'

Not sure where to go from here,  Is this an error caused by my coding, or something in Corona??  Ill try and put together a test case, but my app is quite large so I am not sure I can reproduce it…

Cheers,

Craig

I’m having a similar issue where my app crashes on device as well.

First console entries I see at crash are:

SpringBoard(KeyboardArbiter)[54] <Info>: HW kbd: currently com.my.app ((null) < (null))
SpringBoard(KeyboardArbiter)[54] <Error>: HW kbd: Failed to set (null) as keyboard focus

Unable to release until this is fixed. Anyone have any leads? It’s been really touch chasing a fix to this.

Using Corona 3023. Occurs during the clean up of a scene with numerous physics objects and joints.

Thank you

Hi jhow,

I continued this thread over in the game networking forum, since I was able to confirm that for me it was related to GPGS).

https://forums.coronalabs.com/topic/67330-gpgs-ios-crash/

Are you using GPGS?   I emailed Lerg a sample that replicated the issue, I discovered that for me the error occurred when the user posted a better leaderboard score.  I guess that he is still working on it.

Cheers,

Craig

@cbriggsnz,

Thanks for your response. After more investigating I believe it has to do with the physics engine. Will post another thread.

Might want to mark this one as “Solved”. 

Thanks!

Jeff

This seems to be a common error across all frameworks and even into native iOS development. All of the useful answers was they fixed something in their code. But in almost everyone’s case they were trying to show a text field. There was also someone discussing have custom keyboards installed.

I’m not sure why GPGS or Physics would need a text field. Are you using any? Are you trying to dismiss a keyboard that’s not showing maybe?

Rob

Hey everyone,

Are there any further development on this? I’m getting very much the same error - that is, a complete crash on iOS when submitting a leaderboard score using the new GPGS plugin, with the error “*** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]’” in the log.

This seems to _only_ occur when the player submits a score larger than their current highscore and the request goes through successfully (as the next time you run the app, the new score is reflected correctly on the leaderboard in question) before the crash. This doesn’t happen on Android, only iOS.

Also I’m not using any part of the physic engine. There are no textfields in the current scene, nor anything that attempts to access the keyboard.

Thoughts?

Thanks for the help!

I have similar issue which the app crashes when submitting new score.  Any update to this?