Invalid Text Format String Causing Crash
jbristowe opened this issue · 1 comments
jbristowe commented
Steps to repro:
- Launch app on Android 8.0
- Navigate to example labelled, "Pie series"
- Tap third item in action view (pie3)
Environment: Android 8.0 on Pixel XL
Suspected issue: Text format string specified for Android line 7 in pie3.xml:
android:textFormat="$%d"
The following exception is thrown when view for pie3.xml is loaded:
An uncaught Exception occurred on "main" thread.
java.util.IllegalFormatConversionException: d != java.lang.Double
at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4402)
at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2884)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2838)
at java.util.Formatter.format(Formatter.java:2523)
at java.util.Formatter.format(Formatter.java:2458)
at java.lang.String.format(String.java:2770)
at com.telerik.widget.chart.visualization.pieChart.PieSeriesLabelRenderer.getLabelText(PieSeriesLabelRenderer.java:91)
at com.telerik.widget.chart.visualization.common.renderers.BaseLabelRenderer.renderLabel(BaseLabelRenderer.java:370)
at com.telerik.widget.chart.visualization.common.ChartSeries.drawLabels(ChartSeries.java:648)
at com.telerik.widget.chart.visualization.common.ChartSeries.postRender(ChartSeries.java:576)
at com.telerik.widget.chart.visualization.common.RadChartViewBase.onDraw(RadChartViewBase.java:287)
at android.view.View.draw(View.java:19119)
at android.view.View.buildDrawingCacheImpl(View.java:18367)
at android.view.View.buildDrawingCache(View.java:18227)
at android.view.View.draw(View.java:18839)
at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
at android.view.View.updateDisplayListIfDirty(View.java:18060)
at android.view.View.draw(View.java:18847)
at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
at android.view.View.updateDisplayListIfDirty(View.java:18060)
at android.view.View.draw(View.java:18847)
at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
at android.view.View.draw(View.java:19122)
at android.view.View.updateDisplayListIfDirty(View.java:18069)
at android.view.View.draw(View.java:18847)
at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
at android.view.View.updateDisplayListIfDirty(View.java:18060)
at android.view.View.draw(View.java:18847)
at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
at android.view.View.updateDisplayListIfDirty(View.java:18060)
at android.view.View.draw(View.java:18847)
at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
at android.view.View.updateDisplayListIfDirty(View.java:18060)
at android.view.View.draw(View.java:18847)
at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
at android.view.View.draw(View.java:19122)
at android.view.View.updateDisplayListIfDirty(View.java:18069)
at android.view.View.draw(View.java:18847)
at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
at android.view.View.updateDisplayListIfDirty(View.java:18060)
at android.view.View.draw(View.java:18847)
at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
at android.view.View.updateDisplayListIfDirty(View.java:18060)
at android.view.View.draw(View.java:18847)
at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
at android.view.View.updateDisplayListIfDirty(View.java:18060)
at android.view.View.draw(View.java:18847)
at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
at android.view.View.draw(View.java:19122)
at com.android.internal.policy.DecorView.draw(DecorView.java:785)
at android.view.View.updateDisplayListIfDirty(View.java:18069)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:643)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:649)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:757)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2980)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2794)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2347)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1386)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6733)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:658)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
NickIliev commented
The issue is no longer reproducible (using textFormat="$%.0f"
).
Please do let me know if you are still experiencing this problem