Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

Can someone help me understand errors in Google Play "ANR and Crashes"
Started by cbriggsnz Jan 19 2019 06:29 PM

- - - - -
1 reply to this topic
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Contributor

  • 283 posts
  • Corona SDK

Hi all,


I am just after a bit of understanding.  I can see on the Google Play Console that I am getting quite a few Crashes for "java.lang.NullPointerException".


I have added an "unhandledError" listener to my code and am manually logging the error to flurry (until a better solution is available).


local function myUnhandledErrorListener( event )
    local iHandledTheError = true
    if iHandledTheError then
        print( "Handling the unhandled error", event.errorMessage )
        local analytics = require ("scripts.helper.analytics")
        analytics.logError( event)
        print( "Not handling the unhandled error", event.errorMessage )
    return iHandledTheError
Runtime:addEventListener("unhandledError", myUnhandledErrorListener)
This works perfectly when I build on my device, and it logs perfectly with flurry.  However I am not getting any notifications on flurry about these errors that I am seeing on the Google Play Console.  Why would these errors not be caught by the "unhandledError" event listener?  I am worried that the errors are impacting on my retention etc.

[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Corona Geek

  • 1,242 posts
  • Corona SDK

This is not a lua error so the exception catch would not catch this. I would suggest you look at the plugins you are using and what parameters you are sending in. Sometimes the actual trace gives you hits on what exactly is going on.