question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Let annotation crashes on Android N devices

See original GitHub issue

Hey there, Thought you’d like to know about this crash on Android N:

java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String[] com.canelmas.let.AskPermission.value()' on a null object reference
    at com.canelmas.let.RuntimePermissionRequest.proceed(RuntimePermissionRequest.java:61)
    at com.canelmas.let.RuntimePermissionRequest.proceed(RuntimePermissionRequest.java:52)
    at com.canelmas.let.LetAspect.ajc$inlineAccessMethod$com_canelmas_let_LetAspect$com_canelmas_let_RuntimePermissionRequest$proceed(LetAspect.java:1)
    at com.canelmas.let.LetAspect.annotatedMethods(LetAspect.java:57)

Here’s the line of code where it crashed: @AskPermission({ Manifest.permission.ACCESS_FINE_LOCATION })

Just thought I’d give you a heads up for when the full OS release actually comes out. Love the library!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
canelmascommented, Mar 20, 2016

it should be fixed with 0.1.10

0reactions
mufumbocommented, Apr 9, 2018

this problem still happens on 0.1.11:

    Process: com.craftlog.android.cooking, PID: 14695
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.annotation.Annotation java.lang.reflect.Method.getAnnotation(java.lang.Class)' on a null object reference
        at com.canelmas.let.RuntimePermissionRequest.proceed(SourceFile:61)
        at com.canelmas.let.RuntimePermissionRequest.proceed(SourceFile:52)
        at com.canelmas.let.LetAspect.ajc$inlineAccessMethod$com_canelmas_let_LetAspect$com_canelmas_let_RuntimePermissionRequest$proceed(SourceFile:1)
        at com.canelmas.let.LetAspect.annotatedMethods(SourceFile:57)

it started happening after we disabled D8 compiler.

Do you think this library should never crash? Maybe a big-O try/catch will be necessary, regardless of android bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android: the app crashes if I run it on a device with API 24 or ...
The problem occurs when the camera intent is called: in this case the app runs smooth if I run it on an emulator...
Read more >
Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
Diagnosing Native Crashes | Android Open Source Project
The following sections include common types of native crash, an analysis of a sample crash dump, and a discussion of tombstones.
Read more >
Troubleshoot known issues with Android Emulator
This page lists known issues, workarounds, and troubleshooting tips for the Android Emulator. If you encounter an issue not listed here or ...
Read more >
ANRs - Android Developers
You can capture a bug report from a physical device by using either the Take bug report developer option on the device, or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found