Page 1 of 1

WPF Chart Hangs in Infinite Loop

Posted: Wed Nov 26, 2008 6:16 pm
by 14049096
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.

Posted: Thu Nov 27, 2008 9:17 am
by narcis
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.

Re: WPF Chart Hangs in Infinite Loop

Posted: Thu Jul 01, 2010 3:42 pm
by 16056172
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

Re: WPF Chart Hangs in Infinite Loop

Posted: Thu Jul 01, 2010 4:04 pm
by narcis
Hello Vish,

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

Thanks in advance.