{"action":"created","issue":{"url":"https://api.github.com/repos/jpush/jpush-react-native/issues/467","repository_url":"https://api.github.com/repos/jpush/jpush-react-native","labels_url":"https://api.github.com/repos/jpush/jpush-react-native/issues/467/labels{/name}","comments_url":"https://api.github.com/repos/jpush/jpush-react-native/issues/467/comments","events_url":"https://api.github.com/repos/jpush/jpush-react-native/issues/467/events","html_url":"https://github.com/jpush/jpush-react-native/issues/467","id":303346311,"number":467,"title":"android 异常崩溃","user":{"login":"mx1700","id":212883,"avatar_url":"https://avatars2.githubusercontent.com/u/212883?v=4","gravatar_id":"","url":"https://api.github.com/users/mx1700","html_url":"https://github.com/mx1700","followers_url":"https://api.github.com/users/mx1700/followers","following_url":"https://api.github.com/users/mx1700/following{/other_user}","gists_url":"https://api.github.com/users/mx1700/gists{/gist_id}","starred_url":"https://api.github.com/users/mx1700/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mx1700/subscriptions","organizations_url":"https://api.github.com/users/mx1700/orgs","repos_url":"https://api.github.com/users/mx1700/repos","events_url":"https://api.github.com/users/mx1700/events{/privacy}","received_events_url":"https://api.github.com/users/mx1700/received_events","type":"User","site_admin":false},"labels":[{"id":789432829,"url":"https://api.github.com/repos/jpush/jpush-react-native/labels/android","name":"android","color":"841dd3","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-08T03:45:02Z","updated_at":"2018-04-09T10:11:41Z","closed_at":null,"author_association":"NONE","body":"<!--**WARNING: 如果不按照这个表格，我们将无法帮助你，并将忽略你的问题。** -->\r\n\r\n<!--**Tips：**可以在常见 [问题列表](https://github.com/jpush/jpush-react-native/blob/master/example/documents/common_problems.md) 中先搜寻你的问题。-->\r\n\r\n## 你的运行环境\r\n\r\n* 插件版本: 2.1.10\r\n* react-native 版本：0.53\r\n\r\n## 实际效果\r\n\r\n安卓出现随机崩溃\r\n\r\n## 重现步骤\r\n\r\n安卓app启动后马上后退退出（进程不会杀掉），然后再打开，多次重复\r\n随机出现崩溃异常\r\n\r\n我是用了 react-native-navigation，在应用启动时调用了 setAlias\r\n我想可能是 setAlias 还没返回的时候退出了，回调到达时由于reactjs 环境已经销毁所以报错了\r\n但是我并不熟悉 android 代码，所以无法下一步调试解决\r\n\r\n## Debug logs\r\n\r\nFatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.util.SparseArray.get(int)' on a null object reference\r\n       at cn.jpush.reactnativejpush.JPushModule$MyJPushMessageReceiver.onAliasOperatorResult(JPushModule.java:654)\r\n       at cn.jpush.android.a.a$a.run(SourceFile:76)\r\n       at android.os.Handler.handleCallback(Handler.java:808)\r\n       at android.os.Handler.dispatchMessage(Handler.java:101)\r\n       at android.os.Looper.loop(Looper.java:166)\r\n       at android.os.HandlerThread.run(HandlerThread.java:65)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jpush/jpush-react-native/issues/comments/379703044","html_url":"https://github.com/jpush/jpush-react-native/issues/467#issuecomment-379703044","issue_url":"https://api.github.com/repos/jpush/jpush-react-native/issues/467","id":379703044,"user":{"login":"mx1700","id":212883,"avatar_url":"https://avatars2.githubusercontent.com/u/212883?v=4","gravatar_id":"","url":"https://api.github.com/users/mx1700","html_url":"https://github.com/mx1700","followers_url":"https://api.github.com/users/mx1700/followers","following_url":"https://api.github.com/users/mx1700/following{/other_user}","gists_url":"https://api.github.com/users/mx1700/gists{/gist_id}","starred_url":"https://api.github.com/users/mx1700/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mx1700/subscriptions","organizations_url":"https://api.github.com/users/mx1700/orgs","repos_url":"https://api.github.com/users/mx1700/repos","events_url":"https://api.github.com/users/mx1700/events{/privacy}","received_events_url":"https://api.github.com/users/mx1700/received_events","type":"User","site_admin":false},"created_at":"2018-04-09T10:11:41Z","updated_at":"2018-04-09T10:11:41Z","author_association":"NONE","body":"@xwartz 你可以参考我的临时的解决办法：\r\n修改 jpush-react-native/android/src/main/java/cn/jpush/reactnativejpush/JPushModule.java 85 行\r\n```java\r\n    if (null != sCacheMap) {\r\n         sCacheMap.clear();\r\n-        sCacheMap = null;                   //修改成下边\r\n+        sCacheMap = new SparseArray<>();\r\n    }\r\n```"}}
{"actor":{"display_login":"mx1700"}}