This is a migrated thread and some comments may be shown as answers.

Null Pointer Error on App Resume

4 Answers 42 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Richard
Top achievements
Rank 1
Richard asked on 14 Mar 2016, 04:54 PM

Hi --

I have an activity with three charts which all animated on using various scale animations.

The initial load works as expected but when I switch to another app and then back to my app, my app crashes

 

03-14 12:49:28.724: E/AndroidRuntime(14842): FATAL EXCEPTION: main
03-14 12:49:28.724: E/AndroidRuntime(14842): Process: com.tlp.test.chart, PID: 14842
03-14 12:49:28.724: E/AndroidRuntime(14842): java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setScaleY(float)' on a null object reference
03-14 12:49:28.724: E/AndroidRuntime(14842): at android.support.v4.view.ViewCompatHC.setScaleY(ViewCompatHC.java:129)
03-14 12:49:28.724: E/AndroidRuntime(14842): at android.support.v4.view.ViewCompat$HCViewCompatImpl.setScaleY(ViewCompat.java:1060)
03-14 12:49:28.724: E/AndroidRuntime(14842): at android.support.v4.view.ViewCompat.setScaleY(ViewCompat.java:2428)
03-14 12:49:28.724: E/AndroidRuntime(14842): at com.telerik.widget.chart.visualization.behaviors.animations.ChartScaleAnimation.setInitialValues(ChartScaleAnimation.java:62)
03-14 12:49:28.724: E/AndroidRuntime(14842): at com.telerik.widget.chart.visualization.behaviors.ChartAnimationPanel.startAllAnimations(ChartAnimationPanel.java:190)
03-14 12:49:28.724: E/AndroidRuntime(14842): at com.telerik.widget.chart.visualization.behaviors.ChartAnimationPanel.onDraw(ChartAnimationPanel.java:274)
03-14 12:49:28.724: E/AndroidRuntime(14842): at android.view.View.draw(View.java:16536)

I have not yet been able to determine which of the three charts is the one calling the scale method that is causing the crash.

Any idea why this is happening?

 

Thanks

 

Rich

4 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 15 Mar 2016, 08:17 AM
Hi Richard,

Thank you for reporting this.
So far we have not seen this exception.
I will notify you here as soon as I figure out what is going on.
Is the blinking issue resolved on your end?

Regards,
Victor
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Richard
Top achievements
Rank 1
answered on 15 Mar 2016, 04:39 PM

Hi --

I was able to fix this error by changing where I instantiated the animation.

The flash is gone.

Thanks

Rich

0
Victor
Telerik team
answered on 17 Mar 2016, 08:08 AM
Hello Richard,

Excellent. Happy to hear that.
Write again if you need further assistance.

Regards,
Victor
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Richard
Top achievements
Rank 1
answered on 17 Mar 2016, 03:08 PM

Hi --

I started another thread relating to an odd issue with a custom label renderer on a pie chart. Can you look at that thread?

Thanks

Rich

Tags
Chart
Asked by
Richard
Top achievements
Rank 1
Answers by
Victor
Telerik team
Richard
Top achievements
Rank 1
Share this question
or