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

NullReferenceException when calling RadCartesianChart.Behaviors.Clear

7 Answers 63 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.
Alex
Top achievements
Rank 1
Alex asked on 30 Dec 2013, 12:36 PM
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.


7 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 02 Jan 2014, 01:59 PM
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.
0
Alex
Top achievements
Rank 1
answered on 03 Jan 2014, 04:29 PM
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.
0
Ivo
Telerik team
answered on 06 Jan 2014, 01:09 PM
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.
0
Alex
Top achievements
Rank 1
answered on 10 Jan 2014, 02:46 PM
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.
0
Deyan
Telerik team
answered on 13 Jan 2014, 09:57 AM
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.
0
Alex
Top achievements
Rank 1
answered on 16 Jan 2014, 02:11 PM
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.

0
Deyan
Telerik team
answered on 20 Jan 2014, 09:30 AM
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.
Tags
Chart
Asked by
Alex
Top achievements
Rank 1
Answers by
Todor
Telerik team
Alex
Top achievements
Rank 1
Ivo
Telerik team
Deyan
Telerik team
Share this question
or