Android Question Unfortunately, xxx has stopped.

rfhall50

Member
Licensed User
Longtime User
Hello ...

Scenario: (Working on scoring program.)
  • With y'alls help I have my layouts/panels working. No heavy duty work behind the layouts/panels yet, just popping back and forth between them so I could show it to our shooting club.
  • Went from TRIAL to LICENSED on Thursday, 6/24/2016.
  • Recompiled with RELEASE immediately after licensed install.
  • Moved it to my ACER 10 under DOCUMENTS, installed it, everything good.
  • Bounced back and forth between screens, then exited out of app. Did this numerous times with no problem.
  • Moved your B4ABeginners GuideV3_2.pdf and B4AUserGuide.pdf over to documents so that I could do some reading while away for the weekend. No blame intended, just stating all actions.
  • At some point I also installed ES FIle Explorer.
  • Pulled out my laptop Saturday AM, 6/25/2016 to show layouts/panels. Immediately got the dreaded
    "Unfortunately, Scoring has stopped"
  • Attempted it numerous times again, same results.
  • Uninstalled the app quite a few times, reinstalled, with same error.
  • Renamed and reinstalled the APK file trying to fool it. Same error message.
  • Got home tonight (Sunday, 6/26/2016), recompiled (with release) the same code (NO CHANGES MADE) and it worked great via bridge.
  • Moved the APK over again as above, installed, opened and it ran fine!
My Thoughts:
  • AnHad it been my coding error, stopping and restarting the app should have brought me back running OK until I hit my bad code. As stated above, no problem initially jumping from panel to panel.
  • Uninstalling and reinstalling should have at least given me a clean slate to run with.
  • Renaming/reinstalling also should have wiped the slate clean.
  • It appears that MAYBE the APK was changed, flagged, something ????
  • Why would recompiling and moving it over make the app suddenly start working unless the original APK on the ACER was changed?
  • WHAT I DID NOT DO was simply move the APK from the PC to the ACER and retest before recompiling. As I mentioned, I did do a recompile. (Shame on me.)
Our objective is to get away from paper score sheets. I know there is a program called A.C.E.S. that does scoring, but it doesn't meet all our needs. The problem concerns me that with no changes it crashed (I can accept that part) but it also stayed "crashed". That presents a whole new issue from a confidence standpoint.

After all my ramblings, YOUR HELP WOULD BE APPRECIATED.

Bob

BTW, I did reference other posts but none seemed to really address it from this stanpoint.
 

mangojack

Well-Known Member
Licensed User
Longtime User
It would have been much simpler to have uploaded your project for members to run and pinpoint the problem.

IDE Menu > File > Export as Zip .... there is an Upload File option at the bottom of your new post.

Unfortunately I do not have access to Pc to help .. but I am confident someone will pick up the ball soon.
 
Upvote 0

rfhall50

Member
Licensed User
Longtime User
Here is the Zip file. Included also is 1 extra file in the Zip that is not part of the normal EXPORT. It is a 2 field delimited text file that the program reads to populate an array. It is called Shooters.txt.

I still think the biggest question remains:
What in Android makes a program not start again from scratch, and also not be able to be uninstalled / reinstalled and start over?

I bow to y'alls expertise. THANK YOU!
Bob
 

Attachments

  • PITAcode.zip
    34.3 KB · Views: 211
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
i copied the file into assets and copy the file at start to External drive.
I added permission for external sdcard.
B4X:
    SequencedFileToUse = "shooters.txt"  ' LOWERCASE needed in assets
    If File.Exists(File.DirAssets,SequencedFileToUse) = True Then
        File.Copy(File.DirAssets,SequencedFileToUse,File.DirRootExternal,SequencedFileToUse)
  End If
    TextReader1.Initialize(File.OpenInput(File.DirRootExternal, SequencedFileToUse))

works for me...
 
Upvote 0

rfhall50

Member
Licensed User
Longtime User
It always worked for me also. The problem is once it has"stopped", it will not run again until re-compiled.
 
Upvote 0

fixit30

Active Member
Licensed User
Longtime User
I would recommend that you implement the Application_Error Sub in the Starter Service and save the StackTrace to a text file. This way if the issue happens again you will have a better idea what caused it.

B4X:
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
    File.WriteString(File.DirRootExternal, "Exception.txt", StackTrace)
    Return True
End Sub
 
Upvote 0
Top