Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mTimeoutIntent might be null and throw error, add if not null condition #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidvalen95
Copy link

java.lang.NullPointerException: cancel() called with a null PendingIntent
at android.app.AlarmManager.cancel(AlarmManager.java:890)
at info.guardianproject.cacheword.CacheWordService.resetTimeout(CacheWordService.java:189)
at info.guardianproject.cacheword.CacheWordService.attachSubscriber(CacheWordService.java:145)
at info.guardianproject.cacheword.CacheWordHandler$2.onServiceConnected(CacheWordHandler.java:457)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1465)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1482)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

 java.lang.NullPointerException: cancel() called with a null PendingIntent
                                                                      at android.app.AlarmManager.cancel(AlarmManager.java:890)
                                                                      at info.guardianproject.cacheword.CacheWordService.resetTimeout(CacheWordService.java:189)
                                                                      at info.guardianproject.cacheword.CacheWordService.attachSubscriber(CacheWordService.java:145)
                                                                      at info.guardianproject.cacheword.CacheWordHandler$2.onServiceConnected(CacheWordHandler.java:457)
                                                                      at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1465)
                                                                      at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1482)
                                                                      at android.os.Handler.handleCallback(Handler.java:751)
                                                                      at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                      at android.os.Looper.loop(Looper.java:154)
                                                                      at android.app.ActivityThread.main(ActivityThread.java:6077)
                                                                      at java.lang.reflect.Method.invoke(Native Method)
                                                                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
                                                                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant