WPF Chart Hangs in Infinite Loop

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
david
Newbie
Newbie
Posts: 2
Joined: Thu May 22, 2008 12:00 am

WPF Chart Hangs in Infinite Loop

Post by david » Wed Nov 26, 2008 6:16 pm

I encountered an infinite loop in the following code. It is taken from the Axis class.

do
{
tmp = iRange / tmpResult;
if (Math.Abs(tmp) < int.MaxValue)
{
tempNumLabels = Utils.Round(tmp);
if (tempNumLabels > maxNumLabels)
if (Logarithmic)
tmpResult = tmpResult * LogarithmicBase;
else
tmpResult = NextStep(tmpResult);
}
else
if (Logarithmic)
tmpResult = tmpResult * LogarithmicBase;
else
tmpResult = NextStep(tmpResult);

inf = double.IsInfinity(tmpResult);

} while ((tempNumLabels > maxNumLabels) && (tmpResult <= iRange) && (!inf));

I did not spend a lot of time debugging it. Please resolve.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 27, 2008 9:17 am

Hi david,

Would you be so kind to send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

vk_nomura
Newbie
Newbie
Posts: 12
Joined: Mon May 17, 2010 12:00 am

Re: WPF Chart Hangs in Infinite Loop

Post by vk_nomura » Thu Jul 01, 2010 3:42 pm

I am also using WPF version and my chart hangs once in a while and CPU usage remains at 25%. It happens 40% of the time.

Regards,
Vish

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: WPF Chart Hangs in Infinite Loop

Post by Narcís » Thu Jul 01, 2010 4:04 pm

Hello Vish,

Can you please attach a simple project with which we can reproduce the problem here and debug it?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply