Recent

Author Topic: app crashes  (Read 282 times)

juank1971

  • Jr. Member
  • **
  • Posts: 64
app crashes
« on: September 13, 2020, 03:07:02 pm »
hi   .
any ideas for when the app crashes and closes completely

Handoko

  • Hero Member
  • *****
  • Posts: 3868
  • My goal: build my own game engine using Lazarus
Re: app crashes
« Reply #1 on: September 13, 2020, 03:32:45 pm »
I ever spent some time learning LAMW - Android programming. I can build games on PC but I want to something further. I wanted to develop a game builder that can run on Windows, Linux and Android.

Tutorials are hard to find, even worse some years ago most of the information was outdated. With some diligent efforts I managed to build the first app that run on my phone. But it crashed and closed frequently.

I carefully inspected the steps I did and tried to understand the toolchain I used. I finally understood and can build fat binaries. I even wrote test code to benchmark the performance of running ARM-based code on Intel-based phone vs its native code. No crash, it worked as what it should be.

And now the time to play with graphics. I tried both jCanvasES and jCanvasES2. Wow I could draw shapes on my phone. So I started to build simple games. Unfortunately it crashed even more.

I got a lot of crash-and-close cases. After examining patiently one by one I fixed almost all the issues. There are plenty of things that can cause crash and close. Debugging Android app is hard, it really needs patience.

Now back to your question.
The short answers is: you did it wrong.

Because you gave us a short description so I gave you a short answer. Next time, please provide more helpful information.
« Last Edit: September 13, 2020, 04:08:45 pm by Handoko »

juank1971

  • Jr. Member
  • **
  • Posts: 64
Re: app crashes
« Reply #2 on: September 13, 2020, 05:53:23 pm »
You are right, I was wrong, what I want to know is if there is any way to stop the crash with some resource like try except or  another idea  messages any resorses users  tested

Handoko

  • Hero Member
  • *****
  • Posts: 3868
  • My goal: build my own game engine using Lazarus
Re: app crashes
« Reply #3 on: September 13, 2020, 07:58:43 pm »
Using try-except block should work but I haven't tried it on Android.

Most (or maybe all) of  my crashes on Android were my own faults. I didn't prepare the toolchain correctly or using a function incorrectly.
« Last Edit: September 13, 2020, 08:00:20 pm by Handoko »

jmpessoa

  • Hero Member
  • *****
  • Posts: 1625
Re: app crashes
« Reply #4 on: September 13, 2020, 08:19:33 pm »
Quote
any ideas for when the app crashes and closes completely

Try on command line  "adb logcat"   

or in LAMW/Lazarus

"Tools"  --> "[LAMW]..."  -->   "ADB logcat"
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018