Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingFormatWidthException #88

Closed
voituk opened this issue Oct 28, 2012 · 5 comments
Closed

MissingFormatWidthException #88

voituk opened this issue Oct 28, 2012 · 5 comments

Comments

@voituk
Copy link

voituk commented Oct 28, 2012

Just got this Exception reported by one of my applications:

java.util.MissingFormatWidthException: -s
at java.util.Formatter$FormatToken.checkFlags(Formatter.java:1365)
at java.util.Formatter.transform(Formatter.java:1440)
at java.util.Formatter.doFormat(Formatter.java:1079)
at java.util.Formatter.format(Formatter.java:1040)
at java.util.Formatter.format(Formatter.java:1009)
at java.lang.String.format(String.java:1998)
at java.lang.String.format(String.java:1972)
at com.nostra13.universalimageloader.core.assist.MemoryCacheKeyUtil.generateKey(MemoryCacheKeyUtil.java:16)
at com.nostra13.universalimageloader.core.ImageLoadingInfo.(ImageLoadingInfo.java:37)
at com.nostra13.universalimageloader.core.ImageLoader.displayImage(ImageLoader.java:216)
at com.nostra13.universalimageloader.core.ImageLoader.displayImage(ImageLoader.java:104)
................
at android.widget.AbsListView.obtainView(AbsListView.java:2033)
at android.widget.ListView.makeAndAddView(ListView.java:1772)
at android.widget.ListView.fillDown(ListView.java:672)
at android.widget.ListView.fillSpecific(ListView.java:1330)
at android.widget.ListView.layoutChildren(ListView.java:1603)
at android.widget.AbsListView.onLayout(AbsListView.java:1863)
at android.view.View.layout(View.java:11282)
at android.view.ViewGroup.layout(ViewGroup.java:4224)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
at android.view.View.layout(View.java:11282)
at android.view.ViewGroup.layout(ViewGroup.java:4224)
at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
at android.view.View.layout(View.java:11282)
at android.view.ViewGroup.layout(ViewGroup.java:4224)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
at android.view.View.layout(View.java:11282)
at android.view.ViewGroup.layout(ViewGroup.java:4224)
at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
at android.view.View.layout(View.java:11282)
at android.view.ViewGroup.layout(ViewGroup.java:4224)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1514)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2467)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)

[exClass] => java.util.MissingFormatWidthException
[exDateTime] => 2012-10-28 00:59:16+0400
[exMessage] => -s
[exThreadName] => main
[devAvailableMemory] => 380555264
[devTotalMemory] => 528424960
[devModel] =>  DIGMA iDs10 3G
[devSdk] => 15
[devReleaseVersion] => 4.0.4
@nostra13
Copy link
Owner

Very strange exception for

String.format("%s_%sx%s", imageUri, targetSize.getWidth(), targetSize.getHeight());

Any ideas why it has happened?

@voituk
Copy link
Author

voituk commented Oct 28, 2012

Unfortunately i can't reproduce this exception myself and have no access to this device.
But i guess it may happens when the imageUri value contains "-s" or "-" in it.

@nostra13
Copy link
Owner

I don't think so... Really I don't have idea how %s can become %-s
I'll chang format string to %1$s_%2$dx%3$d. Maybe it'll help.

nostra13 added a commit that referenced this issue Oct 28, 2012
Changed format string for MemoryCache keys
@nostra13
Copy link
Owner

Integrate new version 1.6.2 into your project and let me know if you (your users) still have this problem.

@voituk
Copy link
Author

voituk commented Oct 29, 2012

Will do and keep you updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants