Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Android - NullPointerException at network.NetworkRequest$AsyncNetworkRequestRunnable.run at startup
Started by stanga Sep 25 2016 10:49 AM

10 replies to this topic
android crash nullpointerexception asyncnetworkrequestrunnable
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

Ever since I updated to build 2016.2948 I get the following crash when my Android device starts:

W/dalvikvm( 6094): threadid=29: thread exiting with uncaught exception (group=0x41a0a700)
W/System.err( 6094): java.lang.NullPointerException
W/System.err( 6094):    at network.NetworkRequest$AsyncNetworkRequestRunnable.run(NetworkRequest.java:1912)
W/System.err( 6094):    at java.lang.Thread.run(Thread.java:841)
W/FlurryAgent( 6094): Flurry session ended
E/AndroidRuntime( 6094): FATAL EXCEPTION: Thread-476
E/AndroidRuntime( 6094): java.lang.NullPointerException
E/AndroidRuntime( 6094):        at network.NetworkRequest$AsyncNetworkRequestRunnable.run(NetworkRequest.java:1912)
E/AndroidRuntime( 6094):        at java.lang.Thread.run(Thread.java:841)
W/ActivityManager( 2186):   Force finishing activity com.jokkogames.footballunderworld.mobile/com.ansca.corona.CoronaActivity

This crash happens very often, but not every time I open the app (every 2-3 sessions).

I tried wrapping all my network.request calls with pcall, but that did not help. 

 

I am using a Galaxy S2 device with Android 4.3.1. 

 

I also tried the builds 2016.2949 and 2016.2961, and this reproduces with these as well. 

I was previously using build 2016.2907, and that never occurred with it. 

If I re-install 2016.2907 and use it to compile, the crash is gone.

 

Why is this happening? This is really bad having our app crash every other session, and because of the splash plugin changes I can't continue using 2016.2907...

Please help. 

 

Thanks

 



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,331 posts
  • Enterprise

Can you try 2913 and 2914 and see if your crash happens in 2914 and not 2913? There was a network change around error messages in 2914.  If not, it would be really helpful if you could narrow down the build number where the problem started.

 

Thanks

Rob



[TOPIC: post.html]
#3

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

As you suspected, in 2914 the crash happens, and I wasn't able to reproduce it in 2913. 

 

I did see a similar stack trace in 2913, but it didn't crash my app:

W/System.err(18040): java.net.UnknownHostException: Unable to resolve host "stats.coronalabs.com": No address associated with hostname
W/System.err(18040):    at java.net.InetAddress.lookupHostByName(InetAddress.java:394)
W/System.err(18040):    at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
W/System.err(18040):    at java.net.InetAddress.getAllByName(InetAddress.java:214)
W/System.err(18040):    at libcore.net.http.HttpConnection.<init>(HttpConnection.java:70)
W/System.err(18040):    at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
W/System.err(18040):    at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:340)
W/System.err(18040):    at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:87)
W/System.err(18040):    at libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
W/System.err(18040):    at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:316)
W/System.err(18040):    at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:461)
W/System.err(18040):    at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:442)
W/System.err(18040):    at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:290)
W/System.err(18040):    at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:240)
W/System.err(18040):    at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:81)
W/System.err(18040):    at libcore.net.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
W/System.err(18040):    at libcore.net.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:281)
W/System.err(18040):    at network.NetworkRequest$AsyncNetworkRequestRunnable.run(NetworkRequest.java:1368)
W/System.err(18040):    at java.lang.Thread.run(Thread.java:841)


[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,331 posts
  • Enterprise

Can you put together a small sample app that will crash using your network.request() If so I'd like you to file a bug report using the "Report a bug" link at the top of the page. This mini-project needs a main.lua, config.lua, build.settings and any assets that our engineers can load up and see the problem. Put that in a .zip file and include it with your bug report.

 

Thanks

Rob



[TOPIC: post.html]
#5

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

I created a small sample app that can reproduced the crash (I tested it, and it crashed for me)

I submitted a bug report (6003854), but since this only reproduces on some Android versions/devices, it might not reproduce on your end. 

Please make sure someone looks at this issue - I have yet to receive any news regarding any bug report I ever submitted, and this issue is too important to neglect...

 

I appreciate your help

Stanga



[TOPIC: post.html]
#6

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,331 posts
  • Enterprise

Engineering is going to look into this. In the mean time, you might want to consider a smaller screen and see how it scales up on a tablet.

 

Rob



[TOPIC: post.html]
#7

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

Is there any progress with this crash?

I still see it reproducing a lot while testing...

 

Thanks



[TOPIC: post.html]
#8

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,331 posts
  • Enterprise

If I'm following the bug report and release notes correctly, a change went in to 2965 to address this. QA is verifying the fix before they respond to your bug report, but notes sounds like that testing is going well.

 

You could grab daily build 2965 or later and see if this is fixed for you.

 

Rob



[TOPIC: post.html]
#9

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

I updated the build and am testing it. It looks good so far, and I'll keep you posted if the issue returns. 

Thanks!



[TOPIC: post.html]
#10

rich.stupek

[GLOBAL: userInfoPane.html]
rich.stupek
  • Enthusiast

  • 68 posts
  • Corona SDK

Rob,

 

Could this same error vector lead to problems in IOS too?



[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,331 posts
  • Enterprise

I'm pretty sure this was an Android only issue.




[topic_controls]
[/topic_controls]