NullReferenceException when calling RadCartesianChart.Behaviors.Clear

8 posts, 0 answers
  1. Alex
    Alex avatar
    12 posts
    Member since:
    Mar 2012

    Posted 30 Dec 2013 Link to this post

    Hello,

    My code was working for a while now, but recently I got (twice in the same day) the following exception while calling RadCartesianChart.Behaviors.Clear():

    System.NullReferenceException: Object reference not set to an instance of an object.
       at Telerik.Windows.Controls.ChartTrackBallBehavior.OnDetached()
       at Telerik.Windows.Controls.RadChartBase.OnBehaviorsReset()
       at Telerik.Windows.Controls.RadChartBase.OnBehaviorsCollectionChanging(BehaviorCollectionChangedInfo info)
       at Telerik.Windows.Controls.ChartBehaviorCollection.ClearItems()
       at System.Collections.ObjectModel.Collection`1.Clear()

    I have not managed to reproduce the problem since. I'm using the last version of the Telerik controls (2013.3.1127.3040).

    Do you know what could cause this exception?

    Thanks,

    Alex.


  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 02 Jan 2014 Link to this post

    Hi,

    Thank you for writing.

    We are not aware of a similar issue and the provided information is not enough to help us find the cause for it. It would be great if you could send us a sample project that we can use to reproduce the exception and assist you further.

    Regards,
    Todor
    Telerik
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
  4. Alex
    Alex avatar
    12 posts
    Member since:
    Mar 2012

    Posted 03 Jan 2014 Link to this post

    Hello,

    Thanks for your answer.

    As I said I have no mean to reproduce. I was just asking if you already encountered this exception with your code.

    Alex.
  5. Ivo
    Admin
    Ivo avatar
    90 posts

    Posted 06 Jan 2014 Link to this post

    Hi,
    We are not aware of that exception.
    We will really appreciate if you manage to isolate the sequence or the code snippet, into which the exception occurs.

    Regards,
    Ivo
    Telerik
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  6. Alex
    Alex avatar
    12 posts
    Member since:
    Mar 2012

    Posted 10 Jan 2014 Link to this post

    Hello,

    I got the same error yesterday, 3 times, so I'm going to try to progress and give you some code.

    For your information I recently installed the last version of the chart controls (2013.3.1016.3040 -> to 2013.3.1127.3040).

    Thanks. 

    Alex.
  7. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 13 Jan 2014 Link to this post

    Hi Jean,

    Thanks for getting back to us.

    Sending some code that reproduces the behavior will help us address the issue right away. Looking forward to your sample.

    Regards,
    Deyan
    Telerik
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  8. Alex
    Alex avatar
    12 posts
    Member since:
    Mar 2012

    Posted 16 Jan 2014 Link to this post

    Hello,

    I'm sorry but I spent time trying to isolate the issue, but it almost never occurs, and I can't reproduce it easily.

    The workaround I found is to never call Clear() on the behavior collection. Instead I'm using an existing behavior, and I do not create a new one anymore.

    Alex.

  9. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 20 Jan 2014 Link to this post

    Hello Jean-Alexis,

    Thanks for writing back.

    Good to hear that you've managed to find a workaround.

    Anyway, let us know if you find a deterministic way of reproducing the glitch. We are willing to look into it.

    Regards,
    Deyan
    Telerik
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Back to Top
DevCraft banner