My app often crashes with this stacktrace, using version 4.2.0:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.json.JSONObject.toString()' on a null object reference at com.ibm.mobilefirstplatform.clientsdk.android.push.internal.MFPInternalPushMessage.writeToParcel(MFPInternalPushMessage.java:405) at android.os.Parcel.writeParcelable(Parcel.java:1699) at android.os.Parcel.writeValue(Parcel.java:1605) at android.os.Parcel.writeArrayMapInternal(Parcel.java:891) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579) at android.os.Bundle.writeToParcel(Bundle.java:1233) at android.os.Parcel.writeBundle(Parcel.java:931) at android.content.Intent.writeToParcel(Intent.java:10667) at android.app.IActivityManager$Stub$Proxy.broadcastIntent(IActivityManager.java:3716) at android.app.ContextImpl.sendBroadcast(ContextImpl.java:1071) at android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:449) at com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushIntentService.onNotificationReceived(MFPPushIntentService.java:195)...
This line produces the crash dest.writeString(channelJson.toString());. Seems like a null-check is required here.
My app often crashes with this stacktrace, using version 4.2.0:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.json.JSONObject.toString()' on a null object reference at com.ibm.mobilefirstplatform.clientsdk.android.push.internal.MFPInternalPushMessage.writeToParcel(MFPInternalPushMessage.java:405) at android.os.Parcel.writeParcelable(Parcel.java:1699) at android.os.Parcel.writeValue(Parcel.java:1605) at android.os.Parcel.writeArrayMapInternal(Parcel.java:891) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579) at android.os.Bundle.writeToParcel(Bundle.java:1233) at android.os.Parcel.writeBundle(Parcel.java:931) at android.content.Intent.writeToParcel(Intent.java:10667) at android.app.IActivityManager$Stub$Proxy.broadcastIntent(IActivityManager.java:3716) at android.app.ContextImpl.sendBroadcast(ContextImpl.java:1071) at android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:449) at com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushIntentService.onNotificationReceived(MFPPushIntentService.java:195)...
This line produces the crash
dest.writeString(channelJson.toString());
. Seems like a null-check is required here.