0

I've been trying to reproduce an error for an android application that a colleague built. Our client has the application crashing on their phone every time they run it. I suspect that the error is related to the graphics API being targeted by the application (it's a unity app), but can't be sure yet.

In order to track down the problem, I'm using the Android Virtual Device emulator from Android Studio to make a virtual version of the exact device the client is seeing the crash on (it's an old Samsung running Android 4.4.4 which I don't have access to).

Does the fact that the application does not ever crash or produce any error on the virtual device prove anything about my idea of where the error is coming from?

In other words, how sure can I be that the Android Virtual Device is accurately reproducing the real device - particularly in terms of its graphics and processor (which I believe to be the root of the error)?

Bonus: Would the CPU (ABI) or the graphics rendering settings change anything here in terms of replication fidelity?

eunoia
  • 28
  • 1
  • 6
  • I don't know anything about unity apps, but the device that's crashing, can't you plug it in and see what the logcat says. I've had some app crashes that weren't related to the app, but the device itself, usually see it as sigsev I think its caused, it basically just dumps out a load of system errors nothing in the app at all but there's not a lot you can do about that if there is. Have you tried clearing the app data for the app and trying to load it in case something has just got corrupted – Boardy May 24 '17 at 13:00
  • 1
    Grab the logcat from their device. `adb logcat -clear` *Run App* `adb logcat -d >> user\dekstop\log.txt` – James Poag May 24 '17 at 13:01
  • @Boardy The application crashes only on a few particular models of phone, none of which I have access to. – eunoia May 24 '17 at 13:02
  • @JamesPoag I do not have access to their device. My plan is to reproduce the error in the virtual machine and start debugging from there. – eunoia May 24 '17 at 13:03
  • 1
    Get them to install adb, plugin in their device to their computer and then send them a batch file that dumps it for you. Then have them email it to you. Also, look into Firebase CrashReporting. It's a simple module to link and it *should* report the error to your Firebase console. – James Poag May 24 '17 at 13:05

1 Answers1

2

When debugging, it won't hurt to:

  • Attempt the same actions on a real Android device of any sort,
  • Attempt the same actions on an AVD as you described.

If you cannot reproduce it using the above, you have only validated that those test cases do work. But not being able to reproduce the error is not proof of its cause. It is, at best, a narrowing of the search space. But how large is the search space?

To answer this, in general, I believe that AVDs are not good at reproducing device errors of this sort. The search space that the AVD will not accurately replicate is large:

  • Rendering or GPU errors,
  • Architecture or native library errors,
  • Memory errors, and
  • Almost any logic error you might find on the AVD but won't because your configuration is different.

Therefore, if you cannot reproduce the error and don't appear to have the means to install the app on a similar device, I agree with @james-poag that you could:

  • Ask the user for device logs if they are technical. You may use adb as a standalone tool these days.
  • Visit the user and plug their device into Android Studio.
  • Ask them to report the bug using Google Play if they see the Force Close dialog. You can then review the details via the Google Play console.
  • Ask the developer to include log uploading.
  • Include a crash reporting tool such as Fabric Crashlytics (which is excellent, IMO).

FWIW, I think your suspicion is most likely correct, but you will not have a way to prove that until you get more details.

Note: I think that your question has been downvoted because your title is too general. Perhaps consider editing it to reflect the particulars of testing a Unity app on an AVD.

LordParsley
  • 3,808
  • 2
  • 30
  • 41