android studio debugging introduction

Story Background

In the android studio debugging introduction post I want to talk about when people submit bug requests in the form of youtube comments.

I make my tutorials with Nexus devices using the latest version of android OS at the time. Therefore I only support the Nexus devices on the version of Android OS that I am using at the time.

I recommend everyone following my tutorials to use Nexus devices as well. One of the reasons for this is that none Nexus devices will have different and additional code for porting Android OS to the device hardware. As well the software required for ui customisations.

More code means the potential for bugs additional to the Nexus device on pure android OS.

Let’s look at the example below.

In the camera2 api video series I have a number of pop raise bugs against part 14.

you-tube-bug

The issue they were experiencing was not reproducible on my Nexus device. One point to note was that I was doing at least two recordings. So if the viewer was watching carefully they would have been able to note that the startPreview method was working for me on my environment.

Then another keen follower confirmed the issue.

salman-bug

 

Up to now it had been rare to get a number of issues submitted on the same comment. But note the device and version of Android OS they are using.

So I responded that I would investigate the issue. For I do own a Samsung Note 4 device running on Lollipop OS.

Investigation

As mentioned before the said issue was not reproducible on the Nexus 5x & android marshmallow OS.

So I installed the application on the Note 4. And here were the findings.

Samsung-note4-android-camera2-bug

To summarise we are seeing a java.lang.IllegalStateException when attempting to create the start preview session. On this line

mCaptureRequestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);

The camera device had been closed down due to the illegalStateException on the Samsung Note 4 device running on android lollipop.

Now we know from the previous tutorials that the start preview session works fine by itself. And we are receiving no error from the start record capture session. It’s after the start record capture session and calling the start preview capture session we are having the illegalStateException.

In the next tutorial we will start the debug analysis to identify the cause of the issue.

Android studio debugging introduction summary

The android studio debugging introduction tutorial was just a brief summary of how an issue gets raised regard one of the android development tutorials.

A common way for issues to be raised is through the youtube comments section.

One thing that the audience of the channel need to be aware of is that the channel only supports issues that are reproducible on android Nexus devices running the latest version of Android OS at the time.

But for the purposes of this tutorial we will be using a bug found on the Samsung Note 4 device as a demonstration for android development debugging. And the issue was confirmed on the Samsung Note 4 device at the end.

The following tutorial will describe the techniques in finding the source of the problem.

 

About The Author
-

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>