Got several Android crash reports with a recent build @network.NetworkRequest$AsyncNetworkRequestRunnable.run

I published an Android APK today with latest Corona build 2179, and I got 10 crash reports from Android in 4 hours. It’s the first time I got so many crash reports in such a short period of time, with user complaints too.

The crash report is kind of short:

java.lang.NullPointerException at network.NetworkRequest$AsyncNetworkRequestRunnable.run(NetworkRequest.java:1839) at java.lang.Thread.run(Thread.java:856)

(1) This crash report is never seen before

(2) The previous Corona build I was using is build 2170 and it was ok

(3) My own testing cannot reproduce this problem. I guess it crashes in some rare network situation.

Corona please help to investigate what you changed between build 2171 ~ build 2179 about Android network request.

This kind of crash can only be identified & fixed by tracing your changes.

I’ve emailed the engineers to see if the know of anything that has changed.  

Rob

Hi Joe.  Can we get some more information.  What devices and operating systems (4.3, 2.2, etc.)  generated the crash reports?  What devices and OS’s have you tested on that have worked.  We need to rule out what works and what doesn’t.  Can you provide us the code that you are using to make the network call?  It could help clue us in on where to look.

The more specific you can be the better it is on us.  And please go ahead and file a bug report on this too.  While it seems to be a regression bug, we don’t think it is because we haven’t changed anything and it’s just a coincidence that your customer are hitting this all of a sudden.  It could be something network related.

In your bug report, include your build.settings and config.lua.

Thanks

Rob

Out of 12 bug reports, the OS version info:

Android 4.4  * 4

Android 4.3  * 3

Android 4.1  * 4

Android 2.x  * 1

The device info:

Nexus 7  * 3

Xperia Z

Galaxy Note 2

Galaxy Note 3

HTC Desire 600

AQUOS  * 2

PadPhone 

ZTE V800E

I think from the above info, this bug happens in all kinds of OS version & device.

I tested with Galaxy Tab 3 (Android 4.2) & Sony Xperia (Android 4.2) without problem. The network requests I am using are usually to pull down images or php data from the Internet. And I have been using them a long way without problem. I didn’t make any changes to them in my recent updates of my app.

Please note that, although there are 12 bug reports, but there might be 1000+ sessions, which means the bug only happens in rare condition and I doubt we could reproduce it. 

Since I found this crash, I rebuilt my app with Corona build 2170 and published it right away. It has been over 12 hours and there is no more crash reports. Still sounds like something change from 2171-2179 that causes the crash.

From the info above, are you sure you want me to file a bug report for this? I don’t know the steps & source code to reproduce it. 

I think this is also happening on some of my android devices (when i suddenly make a upload network request) it will just crash the app… Galaxy S3

After I re-built my app with build 2170 and it has been 36 hours, there is no single crash report for this kind.

@eja  Do you mean you see the crash with latest Corona build only or it happened with previous versions too?

I actually tested both 2170 and 2179 and you’re right joe528, i cant seem to break the app anymore using version 2170… However, when i used 2179 it would crash when calling my upload function the second time or sometimes even calling the upload function once.

Corona Dev’s there is deff something off

@eja Do you tested it with actual Android device or Simulator? How about iOS device?

When the crash happens, what’s printed out in the console? (I cannot reproduce it. I only got Google Play crash report from end users which doesn’t show much)… wondering what’s printed out in the console?

I tested with an actual Android device (Galaxy S3)… I have also tested on IOS and everything seems fine. As far as console reports i get none, i do however get a message when it crashes that states “Unfortunately, the process com.(app package name) has stopped.”

So we both see a situation that there is no crash with build 2170 and there is a network-related crash in build 2179 for Android devices.

Corona may want to dig into this. It’s quite a severe bug and might lose track if you don’t fix it as soon as possible.

joe, did you report this bug officially yet or no?

@eja

No, because I don’t know how to reproduce it. I only got crash reports from Google Play Store.

@Corona

Here are more updates about this bug:

(1) After I re-built my app with Corona 2170 and published (without any source code change in my part), it has been over 2 days, there is no single crash report.

(2) I still received 6 more crash reports from Google Play for those users who are still using my app built with Corona 2179. So the number of this crash report is 12+6=18 in total now. Although the number is not many, it’s still the greatest number for a single problem so far since my app is published.

All my users are hitting this all of a sudden when they use the app built with 2179, and no single crash like this if 2170 is used.

And don’t forget that my app built with 2179 was in published state for fewer than 10 hours. In such a short time frame, I got 18 crash reports for the same bug. It’s odd enough and unprecedented.

It’s just not a coincidence.

My app uses a lot of network requests to pull data from the Internet. So this bug might not happen to a normal app built with Corona but there is something wrong fundamentally in network handling that should be heeded immediately. This definitely hurts the stability of Corona. And if you want to reproduce this bug first, you may never be able to identify the bug & fix it.

Hi,

I have received the same crash reports as well.

The app was built with latest version 2179.

9 crash reports have been received within past few hours. 

So far these 9 reports all came from Android 4.3.

Possible steps to reproduce the crash:
I am using Sony Xperia Z1 Android 4.3

  1. (100% crash in my case)
  • Open your app
    - do not do anything and wait until your device go into sleepmode/standby/autolock

  • wake up your phone and resume your app 

  • game crash

  1. (50% crash in my case)
  • run your app as normal

  • press home button after some minutes

  • game crash

Here is my build.settings
[lua]-- Supported values for orientation:
– portrait, portraitUpsideDown, landscapeLeft, landscapeRight

settings = {

orientation = {
default = “portrait”,
supported = { “portrait”, }
},

iphone = {
plist = {
UIStatusBarHidden = false,
UIPrerenderedIcon = true, – set to false for “shine” overlay
UIApplicationExitsOnSuspend = false, – uncomment to quit app on suspend

UIAppFonts =
{
“slkscr.ttf”,
},

FacebookAppID = “XXX”,
CFBundleURLTypes =
{
{
CFBundleURLSchemes =
{
“fbXXX”, – example scheme for facebook
}
}
}
}
},

android =
{
usesPermissions =
{
“android.permission.INTERNET”,
“android.permission.ACCESS_WIFI_STATE”,
“android.permission.READ_PHONE_STATE”,
“android.permission.ACCESS_NETWORK_STATE”,
“android.permission.WRITE_EXTERNAL_STORAGE”,
},
},

plugins =
{
[“facebook”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { iphone = true },
},

[“CoronaProvider.native.popup.social”] =
{
– required
publisherId = “com.coronalabs”,
},

[“CoronaProvider.ads.admob”] =
{
– required
publisherId = “com.coronalabs”,
},
},

}
[/lua]

@snagonstudio

Could you reiterate followings so Corona can start to believe something wrong between 2170~2179

(1) Could you post your crash report, is it exactly the same as what I posted in my first post?

(2) Did you receive this crash report before you use build 2179? Ever?

java.lang.NullPointerException
at network.NetworkRequest$AsyncNetworkRequestRunnable.run(NetworkRequest.java:1839)
at java.lang.Thread.run(Thread.java:841)

Last reported

Today, 3:34 PM

Reports this week

7

Reports total

7

Application version

 
1.0.67

Android version

 
Android 4.37

Device

 
Xperia Z1 (C6903)3
2.
 
Galaxy Note3 (hlte)2
3.
 
Xperia Z (C6603)1
4.
 
Galaxy Nexus (maguro)1

 

  1. Yes this crash only occur with 2179 build. Not sure with 2171-2178 builds.

When I switch back to 2170 build. The crash is gone.

Hope that helps!

Wow, Corona

based on the information above,

I really don’t know what else you need to believe something is just off between build 2170~2179

I am going to create a sample app just so I can submit this bug right now so this can get resolved, this is not good.

Please try with 2182.  We’ve fixed a case that could be causing it, and it should produce more useful information in the log files.  If you can try with 2182 and let us know if it fixes it, or more likely the crash will stop but the network error will still be there and info from the logs will be most helpful in helping is make this solid.

Thanks

Rob

@eja are you able to try it with build 2182?

Looks like only you can reproduce it offline.