java.util.IllegalFormatConversionException: %f can't format java.lang.Integer arguments

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Getting this error when launching KS (it doesn't crash the app): 03-30 17:38:33.941: E/TitaniumModule(3794): (KrollRuntimeThread) [894,1676] Error in string format 03-30 17:38:33.941: E/TitaniumModule(3794): java.util.IllegalFormatConversionException: %f can't format java.lang.Integer arguments 03-30 17:38:33.941: E/TitaniumModule(3794): at java.util.Formatter.badArgumentType(Formatter.java:1520) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.util.Formatter.transformFromFloat(Formatter.java:2080) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.util.Formatter.transform(Formatter.java:1496) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.util.Formatter.doFormat(Formatter.java:1101) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.util.Formatter.format(Formatter.java:1062) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.util.Formatter.format(Formatter.java:1031) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.lang.String.format(String.java:2177) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.lang.String.format(String.java:2151) 03-30 17:38:33.941: E/TitaniumModule(3794): at ti.modules.titanium.TitaniumModule.stringFormat(TitaniumModule.java:299) 03-30 17:38:33.941: E/TitaniumModule(3794): at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) 03-30 17:38:33.941: E/TitaniumModule(3794): at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:134) 03-30 17:38:33.941: E/TitaniumModule(3794): at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:267) 03-30 17:38:33.941: E/TitaniumModule(3794): at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:160) 03-30 17:38:33.941: E/TitaniumModule(3794): at android.os.Handler.dispatchMessage(Handler.java:95) 03-30 17:38:33.941: E/TitaniumModule(3794): at android.os.Looper.loop(Looper.java:123) 03-30 17:38:33.941: E/TitaniumModule(3794): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:104)
    via by Hieu Pham,
  • Getting this error when launching KS (it doesn't crash the app): 03-30 17:38:33.941: E/TitaniumModule(3794): (KrollRuntimeThread) [894,1676] Error in string format 03-30 17:38:33.941: E/TitaniumModule(3794): java.util.IllegalFormatConversionException: %f can't format java.lang.Integer arguments 03-30 17:38:33.941: E/TitaniumModule(3794): at java.util.Formatter.badArgumentType(Formatter.java:1520) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.util.Formatter.transformFromFloat(Formatter.java:2080) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.util.Formatter.transform(Formatter.java:1496) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.util.Formatter.doFormat(Formatter.java:1101) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.util.Formatter.format(Formatter.java:1062) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.util.Formatter.format(Formatter.java:1031) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.lang.String.format(String.java:2177) 03-30 17:38:33.941: E/TitaniumModule(3794): at java.lang.String.format(String.java:2151) 03-30 17:38:33.941: E/TitaniumModule(3794): at ti.modules.titanium.TitaniumModule.stringFormat(TitaniumModule.java:299) 03-30 17:38:33.941: E/TitaniumModule(3794): at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) 03-30 17:38:33.941: E/TitaniumModule(3794): at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:134) 03-30 17:38:33.941: E/TitaniumModule(3794): at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:267) 03-30 17:38:33.941: E/TitaniumModule(3794): at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:160) 03-30 17:38:33.941: E/TitaniumModule(3794): at android.os.Handler.dispatchMessage(Handler.java:95) 03-30 17:38:33.941: E/TitaniumModule(3794): at android.os.Looper.loop(Looper.java:123) 03-30 17:38:33.941: E/TitaniumModule(3794): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:104)
    via by Hieu Pham,
  • h4. Problem Description Integer format strings that contain positional arguments result in an IllegalFormatConversionException when passed to String.format(). If the positional part of the format is removed, the call works fine. h4. Expected Results Strings with positional should work fine. h4. Actual results The strings with positional information are throwing an exception. h4. Test case {code} var win = Ti.UI.createWindow(); Ti.API.info(String.format('non-positional: %d', 1)); Ti.API.info(String.format('positional: %1$d', 1)); win.open(); {code} h4. Crashlog {code} /TiAPI ( 275): non-positional: 1 E/TitaniumModule( 275): (KrollRuntimeThread) [363,3214] Error in string format E/TitaniumModule( 275): java.util.IllegalFormatConversionException: d is incompatible with java.lang.Double E/TitaniumModule( 275): at java.util.Formatter$Transformer.badArgumentType(Formatter.java:1452) E/TitaniumModule( 275): at java.util.Formatter$Transformer.transformFromInteger(Formatter.java:1683) E/TitaniumModule( 275): at java.util.Formatter$Transformer.transform(Formatter.java:1410) E/TitaniumModule( 275): at java.util.Formatter.doFormat(Formatter.java:1082) E/TitaniumModule( 275): at java.util.Formatter.format(Formatter.java:994) E/TitaniumModule( 275): at java.lang.String.format(String.java:2254) E/TitaniumModule( 275): at java.lang.String.format(String.java:2219) E/TitaniumModule( 275): at ti.modules.titanium.TitaniumModule.stringFormat(TitaniumModule.java:294) E/TitaniumModule( 275): at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) E/TitaniumModule( 275): at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:116) E/TitaniumModule( 275): at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:207) E/TitaniumModule( 275): at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:136) E/TitaniumModule( 275): at android.os.Handler.dispatchMessage(Handler.java:95) E/TitaniumModule( 275): at android.os.Looper.loop(Looper.java:123) E/TitaniumModule( 275): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:102) I/TiAPI ( 275): null {code}
    via by Paul Mietz Egli,
  • h4. Problem Description Integer format strings that contain positional arguments result in an IllegalFormatConversionException when passed to String.format(). If the positional part of the format is removed, the call works fine. h4. Expected Results Strings with positional should work fine. h4. Actual results The strings with positional information are throwing an exception. h4. Test case {code} var win = Ti.UI.createWindow(); Ti.API.info(String.format('non-positional: %d', 1)); Ti.API.info(String.format('positional: %1$d', 1)); win.open(); {code} h4. Crashlog {code} /TiAPI ( 275): non-positional: 1 E/TitaniumModule( 275): (KrollRuntimeThread) [363,3214] Error in string format E/TitaniumModule( 275): java.util.IllegalFormatConversionException: d is incompatible with java.lang.Double E/TitaniumModule( 275): at java.util.Formatter$Transformer.badArgumentType(Formatter.java:1452) E/TitaniumModule( 275): at java.util.Formatter$Transformer.transformFromInteger(Formatter.java:1683) E/TitaniumModule( 275): at java.util.Formatter$Transformer.transform(Formatter.java:1410) E/TitaniumModule( 275): at java.util.Formatter.doFormat(Formatter.java:1082) E/TitaniumModule( 275): at java.util.Formatter.format(Formatter.java:994) E/TitaniumModule( 275): at java.lang.String.format(String.java:2254) E/TitaniumModule( 275): at java.lang.String.format(String.java:2219) E/TitaniumModule( 275): at ti.modules.titanium.TitaniumModule.stringFormat(TitaniumModule.java:294) E/TitaniumModule( 275): at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) E/TitaniumModule( 275): at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:116) E/TitaniumModule( 275): at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:207) E/TitaniumModule( 275): at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:136) E/TitaniumModule( 275): at android.os.Handler.dispatchMessage(Handler.java:95) E/TitaniumModule( 275): at android.os.Looper.loop(Looper.java:123) E/TitaniumModule( 275): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:102) I/TiAPI ( 275): null {code}
    via by Paul Mietz Egli,
  • Creating csv results in crash
    via Stack Overflow by AmazingHorse
    ,
  • SpotlightLog error
    via GitHub by sandroacoelho
    ,
    • java.util.IllegalFormatConversionException: %f can't format java.lang.Integer arguments at java.util.Formatter.badArgumentType(Formatter.java:1520) at java.util.Formatter.transformFromFloat(Formatter.java:2080) at java.util.Formatter.transform(Formatter.java:1496) at java.util.Formatter.doFormat(Formatter.java:1101) at java.util.Formatter.format(Formatter.java:1062) at java.util.Formatter.format(Formatter.java:1031) at java.lang.String.format(String.java:2177) at java.lang.String.format(String.java:2151) at ti.modules.titanium.TitaniumModule.stringFormat(TitaniumModule.java:299) at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:134) at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:267) at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:160) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:123) at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:104)

    Users with the same issue

    Unknown visitor1 times, last one,
    aldrinleal
    aldrinleal1 times, last one,
    Unknown visitor1 times, last one,
    bmacedo
    bmacedo3 times, last one,
    iridic
    iridic16 times, last one,
    18 more bugmates