Android Question Back to the app crash

rogersantosferreira

Member
Licensed User
Longtime User
Hi!

I'm getting strange messages when I left and return to application using motorola devices like the G2 with Android 5.0.2. I have tested it on various other devices such as Samsung, LG, Positivo and even in earlier version of Motorola itself. Only G2 Motorola have these problems. Any help or suggestion?

Details at files below...
 

Attachments

  • Screenshot_2015-09-10-02-02-55.png
    Screenshot_2015-09-10-02-02-55.png
    132.1 KB · Views: 109
  • Screenshot_2015-09-10-01-59-51.png
    Screenshot_2015-09-10-01-59-51.png
    69.7 KB · Views: 101
  • Screenshot_2015-09-10-02-02-55.png
    Screenshot_2015-09-10-02-02-55.png
    132.1 KB · Views: 108

Roycefer

Well-Known Member
Licensed User
Longtime User
Naively, it looks like your app is trying to use a Cursor object that hasn't been initialized. This could be caused by any number of programming errors.

You could have declared a Cursor in Activity_Globals instead of Process_Globals and only initialized it in Activity_Create when FirstTime==True. This way, whenever you come back into the app and it hasn't been cleared from memory, the Cursor will be created again but not initialized.

Another possibility is that the Cursor object in question is a local variable in a sub that runs as a result of Activity_Resume being called but the SQLite query whose results are assigned to the Cursor during normal operation is only performed in Activity_Create when FirstTime==True.

The Exception is being thrown from at least 2 different subs, so you know which subs to check, at least.
 
Upvote 0

rogersantosferreira

Member
Licensed User
Longtime User
Thanks Roicefer and Erel...
I've been declared Cursors in methods that use it. To solve this problem, I change the declaration of cursors to globals in Process Globals and the initialization of global resources on the project were moved to a Starter Service.

Now, it works fine.
Thanks again to you guys!
 
Upvote 0
Top