[SOLVED] A crash for Android: "java.util.MissingFormatArgumentException: Format specifier: s"

Hi,

We couldn’t reproduce the issue BUT we do believe we have fixed the issue.  This fix will be in the next daily build.

Great news to know you have put in a possible fix. 

Yes, it’s not easy to reproduce, I have never reproduced it, but if you look at the code, I guess you could identify the problem easily.

Can’t wait to use the next build and I will let you know if any user reports back about this problem again.

Haven’t seen a new daily build for a week :frowning:

Is this fix put in after  CoronaSDK 2013.2100?

There is usually a period of time after we release a public build before daily builds resume.  I don’t have a schedule, but we should restart them next week I would guess (don’t hold me to it…)

Rob

Ok, Rob, thanks for that.

No wonder, 2100 is the latest public release…

I really hope Corona can help on this issue, I keep getting Android reports about this crash.

Can any Android engineer check the related code in handling network error, a simply typo like this

System.out.printf(“The error: $%s\n” + errorString)

 

can generate a similar error. 

Even if I passes a nil parameter, I think Corona should be more fault-tolerant. It shouldn’t let it crash in such a “tolerable” case.

For almost a week, I have not received any crash report for this problem again.

I think it should have been fixed. I will mark it solved.

Thanks a lot for the investigation & fix.

We have the same issue!

In my case this problem only occurs on Galaxy Nexus.

Other android devices run without problem.

And this issue occurs at calling the following API

network.request(url, “POST”, callback, param)

All 4 parameters were not nil.

I’m using CoronaAPI Version 2013.1202.

Phone OS :  Android 4.2.1

The following is the error message when my game crashes.

12-06 17:21:30.864: E/AndroidRuntime(2946): FATAL EXCEPTION: Thread-227

12-06 17:21:30.864: E/AndroidRuntime(2946): java.util.MissingFormatArgumentException: Format specifier: 201.8:

12-06 17:21:30.864: E/AndroidRuntime(2946):     at java.util.Formatter.getArgument(Formatter.java:1109)

12-06 17:21:30.864: E/AndroidRuntime(2946):     at java.util.Formatter.doFormat(Formatter.java:1074)

12-06 17:21:30.864: E/AndroidRuntime(2946):     at java.util.Formatter.format(Formatter.java:1040)

12-06 17:21:30.864: E/AndroidRuntime(2946):     at java.util.Formatter.format(Formatter.java:1009)

12-06 17:21:30.864: E/AndroidRuntime(2946):     at java.lang.String.format(String.java:1988)

12-06 17:21:30.864: E/AndroidRuntime(2946):     at java.lang.String.format(String.java:1962)

12-06 17:21:30.864: E/AndroidRuntime(2946):     at network.NetworkRequest.error(NetworkRequest.java:64)

12-06 17:21:30.864: E/AndroidRuntime(2946):     at network.NetworkRequest$AsyncNetworkRequestRunnable.run(NetworkRequest.java:1775)

12-06 17:21:30.864: E/AndroidRuntime(2946):     at java.lang.Thread.run(Thread.java:856)

@iamarej

Are you able to reproduce it? What kind of operations would cause your game crash? 

@jeo528

Yes! Every time I run my game on Galaxy Nexus (Android 4.2.1).

But Other Android devices and iPhone have no problem running my game.

When my game start, it is trying to connect to my game server with " network.request" API  to send some json text!

And every time this issue occurs only on Galaxy Nexus (Android 4.2.1).

@Corona

Take a look at the similarity of the crash call stacks reported by me & iamarej, I think it’s a Corona crash and should be fixed as soon as possible.

Although it does not happen often (as long as the user has a good network connection), it does happen now and then when there is an unstable network environment. It seems a network error not easy to be simulated but it does happen.

Corona engineer who is responsible for Java network handling should review the code to see if there is a missing parameter when formatting a string in network error handling.

Hi,

We couldn’t reproduce the issue BUT we do believe we have fixed the issue.  This fix will be in the next daily build.

Great news to know you have put in a possible fix. 

Yes, it’s not easy to reproduce, I have never reproduced it, but if you look at the code, I guess you could identify the problem easily.

Can’t wait to use the next build and I will let you know if any user reports back about this problem again.

Haven’t seen a new daily build for a week :frowning:

Is this fix put in after  CoronaSDK 2013.2100?

There is usually a period of time after we release a public build before daily builds resume.  I don’t have a schedule, but we should restart them next week I would guess (don’t hold me to it…)

Rob

Ok, Rob, thanks for that.

No wonder, 2100 is the latest public release…

For almost a week, I have not received any crash report for this problem again.

I think it should have been fixed. I will mark it solved.

Thanks a lot for the investigation & fix.