Crash on device when calling registerForPushNotifications() on latest builds

I’m having a serious problem with Push Notifications on the latest builds…

Basically, every time I call notifications.registerForPushNotifications() the app crashes on device and simulator.

No matter if I call the command at launch, after a few seconds or from a button… as soon as I call it, it crashes (without even entering the notificationListener).

I can confirm it’s happening at least from build 2594. 

On previous builds (2585 for example) the push notification works correctly.

All the certificates and code are in order.

Here’s the device logs just after notifications.registerForPushNotifications

\<Error\>: task\_set\_exception\_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument) \<Notice\>: ReportCrash acting against PID 3667 \<Error\>: error evaluating process info - pid: 3667, punique: 3667 \<Notice\>: Formulating crash report for process devtest[3667] com.apple.xpc.launchd[1] (UIKitApplication:com.pxlartificer.destinypublicevents[0xcf93][3667]) \<Notice\>: Service exited due to signal: Segmentation fault: 11

I’m also getting a crash after updating to build 2015.2596.  Did something around notifications change since 2015.2583 ?

Thread 1Queue : com.apple.main-thread (serial)

#0 0x00256fb6 in luaS_newlstr ()

#1 0x00247d4a in lua_getfield ()

#2 0x00166fc6 in NotificationEvent::PrepareDispatch(lua_State*) const at /Users/dannychan/src/plugins-hosted/projects/notifications/ios/Plugin/NotificationEvent.mm:72

#3 0x00167002 in NotificationEvent::Dispatch(lua_State*) const at /Users/dannychan/src/plugins-hosted/projects/notifications/ios/Plugin/NotificationEvent.mm:82

#4 0x001675d2 in -[CoronaNotificationsDelegate application:didRegisterForRemoteNotificationsWithDeviceToken:] at /Users/dannychan/src/plugins-hosted/projects/notifications/ios/Plugin/CoronaNotificationsDelegate.mm:86

#5 0x30c4c534 in __invoking___ ()

#6 0x30b9708a in -[NSInvocation invoke] ()

#7 0x30b9a822 in -[NSInvocation invokeWithTarget:] ()

#8 0x001ffd8c in -[CoronaAppDelegate forwardInvocation:] ()

#9 0x30c4b0a0 in ___forwarding___ ()

#10 0x30b9a768 in _CF_forwarding_prep_0 ()

#11 0x33787866 in _UIXXRemoteNotificationRegistrationSucceeded ()

#12 0x337883d4 in _XRemoteNotificationRegistrationSucceeded ()

#13 0x34623f2e in migHelperRecievePortCallout ()

#14 0x30c13a66 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()

#15 0x30c13a02 in __CFRunLoopDoSource1 ()

#16 0x30c121d6 in __CFRunLoopRun ()

#17 0x30b7cebe in CFRunLoopRunSpecific ()

#18 0x30b7cca2 in CFRunLoopRunInMode ()

#19 0x35ad6662 in GSEventRunModal ()

#20 0x334c914c in UIApplicationMain ()

#21 0x001049d4 in main at /Users/bob/dev/working/corona/Fremont/ios/main.mm:15

Confirmed that going back to build 2015.2590 works.  I also logged a bug.

Forgot to add that I’m also using GameThrive, so perhaps there’s an incompatibility there?

I cant get the latest build to get google play game services plugin to build for device. Do I need to file a bug report? Because I was using an older build at first and still got the same error.

oh and the file/picture uploader on this forum does not work anymore or I would’ve attached a screenshot of the error.

Hi all,

How many of you in this thread are using GameThrive? Only @nandgate or others too?

Brent

No Gamethrive for me Brent

I’m using pushbots

I’m using Parse. 

Just in case the problem was maybe related to other functions/plugins, I tried starting a blank project with only the notification plugin and a call to registerforpushnotifications. Still crashing on 2598. 

nahmeenstudios filed a bug (39914) and helped us track down the regression, which was introduced in 2594. 

We’ve got a fix coming in starting in daily build 2600 and after.

The issue should only affect projects using the notifications plugin on iOS.

Thanks for the timely response to this issue!

I’m also getting a crash after updating to build 2015.2596.  Did something around notifications change since 2015.2583 ?

Thread 1Queue : com.apple.main-thread (serial)

#0 0x00256fb6 in luaS_newlstr ()

#1 0x00247d4a in lua_getfield ()

#2 0x00166fc6 in NotificationEvent::PrepareDispatch(lua_State*) const at /Users/dannychan/src/plugins-hosted/projects/notifications/ios/Plugin/NotificationEvent.mm:72

#3 0x00167002 in NotificationEvent::Dispatch(lua_State*) const at /Users/dannychan/src/plugins-hosted/projects/notifications/ios/Plugin/NotificationEvent.mm:82

#4 0x001675d2 in -[CoronaNotificationsDelegate application:didRegisterForRemoteNotificationsWithDeviceToken:] at /Users/dannychan/src/plugins-hosted/projects/notifications/ios/Plugin/CoronaNotificationsDelegate.mm:86

#5 0x30c4c534 in __invoking___ ()

#6 0x30b9708a in -[NSInvocation invoke] ()

#7 0x30b9a822 in -[NSInvocation invokeWithTarget:] ()

#8 0x001ffd8c in -[CoronaAppDelegate forwardInvocation:] ()

#9 0x30c4b0a0 in ___forwarding___ ()

#10 0x30b9a768 in _CF_forwarding_prep_0 ()

#11 0x33787866 in _UIXXRemoteNotificationRegistrationSucceeded ()

#12 0x337883d4 in _XRemoteNotificationRegistrationSucceeded ()

#13 0x34623f2e in migHelperRecievePortCallout ()

#14 0x30c13a66 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()

#15 0x30c13a02 in __CFRunLoopDoSource1 ()

#16 0x30c121d6 in __CFRunLoopRun ()

#17 0x30b7cebe in CFRunLoopRunSpecific ()

#18 0x30b7cca2 in CFRunLoopRunInMode ()

#19 0x35ad6662 in GSEventRunModal ()

#20 0x334c914c in UIApplicationMain ()

#21 0x001049d4 in main at /Users/bob/dev/working/corona/Fremont/ios/main.mm:15

Confirmed that going back to build 2015.2590 works.  I also logged a bug.

Forgot to add that I’m also using GameThrive, so perhaps there’s an incompatibility there?

I cant get the latest build to get google play game services plugin to build for device. Do I need to file a bug report? Because I was using an older build at first and still got the same error.

oh and the file/picture uploader on this forum does not work anymore or I would’ve attached a screenshot of the error.

Hi all,

How many of you in this thread are using GameThrive? Only @nandgate or others too?

Brent

No Gamethrive for me Brent

I’m using pushbots

I’m using Parse. 

Just in case the problem was maybe related to other functions/plugins, I tried starting a blank project with only the notification plugin and a call to registerforpushnotifications. Still crashing on 2598. 

nahmeenstudios filed a bug (39914) and helped us track down the regression, which was introduced in 2594. 

We’ve got a fix coming in starting in daily build 2600 and after.

The issue should only affect projects using the notifications plugin on iOS.