Null Pointer Error on App Resume

5 posts, 0 answers
  1. Richard
    Richard avatar
    44 posts
    Member since:
    Jun 2014

    Posted 14 Mar Link to this post

    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

  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 15 Mar Link to this post

    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
  3. DevCraft banner
  4. Richard
    Richard avatar
    44 posts
    Member since:
    Jun 2014

    Posted 15 Mar in reply to Victor Link to this post

    Hi --

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

    The flash is gone.

    Thanks

    Rich

  5. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 17 Mar Link to this post

    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
  6. Richard
    Richard avatar
    44 posts
    Member since:
    Jun 2014

    Posted 17 Mar in reply to Victor Link to this post

    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

Back to Top
DevCraft banner