Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

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
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

cbriggsnz

[GLOBAL: userInfoPane.html]
cbriggsnz
  • 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)
    else
        print( "Not handling the unhandled error", event.errorMessage )
    end
    
    return iHandledTheError
 
end
 
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.
 
Cheers,
 
Craig
 
 


[TOPIC: post.html]
#2

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,152 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.




[topic_controls]
 
[/topic_controls]