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

Lantern.java line 108 Crash #9

Open
ytheekshana opened this issue May 5, 2019 · 3 comments
Open

Lantern.java line 108 Crash #9

ytheekshana opened this issue May 5, 2019 · 3 comments

Comments

@ytheekshana
Copy link

This is another crash.

Fatal Exception: java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=6937, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.ytheekshana.deviceinfo/com.nabinbhandari.android.permissions.PermissionsActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void github.nisrulz.lantern.FlashController.off()' on a null object reference
at android.app.ActivityThread.deliverResults(ActivityThread.java:4519)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4563)
at android.app.ActivityThread.-wrap21(Unknown Source)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1779)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7002)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

Caused by java.lang.NullPointerException: Attempt to invoke interface method 'void github.nisrulz.lantern.FlashController.off()' on a null object reference
at github.nisrulz.lantern.Lantern.enableTorchMode(Lantern.java:108)
at com.ytheekshana.deviceinfo.FlashlightTestActivity$1.onGranted(FlashlightTestActivity.java:84)
at com.nabinbhandari.android.permissions.PermissionsActivity.grant(PermissionsActivity.java:228)
at com.nabinbhandari.android.permissions.PermissionsActivity.onRequestPermissionsResult(PermissionsActivity.java:122)
at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7811)
at android.app.Activity.dispatchActivityResult(Activity.java:7634)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4515)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4563)
at android.app.ActivityThread.-wrap21(Unknown Source)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1779)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7002)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

1

@nisrulz
Copy link
Owner

nisrulz commented May 5, 2019

Was addressed in this commit, I just pushed a few minutes back: 4951ece

@ytheekshana
Copy link
Author

Was addressed in this commit, I just pushed a few minutes back: 4951ece

Thanks. Waiting for the next public release with AndroidX.

@ytheekshana
Copy link
Author

Got another crash on another line

Fatal Exception: java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=6937, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.ytheekshana.deviceinfo/com.nabinbhandari.android.permissions.PermissionsActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void github.nisrulz.lantern.c.a()' on a null object reference
at android.app.ActivityThread.deliverResults(ActivityThread.java:4616)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4658)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1959)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7075)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)

Caused by java.lang.NullPointerException: Attempt to invoke interface method 'void github.nisrulz.lantern.c.a()' on a null object reference
at github.nisrulz.lantern.Lantern.access$000(Lantern.java:62)
at com.ytheekshana.deviceinfo.tests.FlashlightTestActivity$1.onGranted(FlashlightTestActivity.java:12)
at com.nabinbhandari.android.permissions.PermissionsActivity.access$200(PermissionsActivity.java:7)
at com.nabinbhandari.android.permissions.PermissionsActivity.onRequestPermissionsResult(PermissionsActivity.java:44)
at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7954)
at android.app.Activity.dispatchActivityResult(Activity.java:7776)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4609)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4658)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1959)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7075)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)

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

No branches or pull requests

2 participants