SasqChart
Home
Home
Chart Gallery
Thumbs
Bar Charts
Stacked Bar
Line Charts
Area Charts
Stacked Area
Pie Charts
Mixed Charts
Chart Styles
Axis Options
Layout Options
ASP.Net Tutorials
Base Example
DataSet Bind
WinForm Tutorials
Base Example
DataSet Bind
  Forums Login
Username:
Password:
 
Create account
Forget password?
 Who is Online

There are currently:
3 anonymous users online.

0 of 1,436 registered users online.

There have been 160325 Page Hits by 118881 users

 Search Forums

More search options
SasqChart  > SasqChart FAQ  > Infinite loop detected in range matching loop  
 
Display using:  
Previous Thread :: Next Thread 
 Author Thread: Infinite loop detected in range matching loop
zipfeli is not online. Last active: 3/11/2008 4:20:43 AM zipfeli
Top 25 Poster
Joined: 10 Mar 2008
Total Posts: 2
 
Infinite loop detected in range matching loop
Posted: 10 Mar 2008 04:49 AM
Dear, I'm not able to understand the following server error:

Infinite loop detected in range matching loop

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Infinite loop detected in range matching loop


Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: Infinite loop detected in range matching loop
]
SasqChart.Canvas.AxisExtents.CreateYAxisExtents(ChartEngine chart, Graphics g, Rectangle clientRect) +2843
SasqChart.Canvas.AxisExtents..ctor(ChartEngine chart, Graphics g, Rectangle clientRect) +104
SasqChart.Canvas.Cartesian.Draw(ChartEngine chart, Graphics g, Rectangle clientRect) +114
SasqChart.ChartEngine.Draw(Graphics g, Rectangle rect) +1001
SasqChart.ChartEngine.Draw(Graphics g, Int32 width, Int32 height) +76
SasqChart.WebChartControl.Generate_StoreToDisk() +669
SasqChart.WebChartControl.AddAttributesToRender(HtmlTextWriter writer) +19
System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer) +17
System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +17
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +59
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +68
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +37
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
System.Web.UI.Page.Render(HtmlTextWriter writer) +26
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2558




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Sasq is not online. Last active: 2/9/2010 4:13:32 PM Sasq
Top 25 Poster
Joined: 31 Dec 2004
Total Posts: 80
 
Re: Infinite loop detected in range matching loop
Posted: 10 Mar 2008 11:31 AM
You got me on this one.. I think this is something to do with having 2 ranges that the control due to rubbish coding on my behalf can not make fit...

Can you post some code that generates this?

Thanks
Steve
zipfeli is not online. Last active: 3/11/2008 4:20:43 AM zipfeli
Top 25 Poster
Joined: 10 Mar 2008
Total Posts: 2
 
Re: Infinite loop detected in range matching loop
Posted: 11 Mar 2008 04:20 AM
Hi Steve, thank you for answering:
---------------------------------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using SasqChart;

namespace X
{

public partial class Set : System.Web.UI.Page
{
// Raise variables
DateTime stop;
DateTime start;
int exerciseID;
// TODO: Fetch this from membership profile
int TimeZoneAddHours = 5;



protected void Page_Load(object sender, EventArgs e)
{

// Without postback, textbox values will be overwritten
if (!IsPostBack)
{
// Get Exercise from querystring
exerciseID = int.Parse(Request.QueryString["ExerciseID"]);
//exerciseID = 6;

// Create datacontext instance
MyStatsDataContext db = new MyStatsDataContext();

// Get the ExerciseSet from ExerciseID querystring with highest ExerciseSetID
var exerc = db.GetExercise(exerciseID).First();

// Get unit name from Exercise.Unit
var unitName = from ex in db.Exercises where ex.ExerciseID == exerciseID select ex.Unit.UnitName_DE;

try
{

var LastSet = db.GetExerciseSet(exerciseID).OrderByDescending(i => i.ExerciseSetID).Take(1).First(); ;
// Set quantity and repetitions textboxes with value from last ExerciseSet
GrdVwEx.HeaderRow.Cells[2].Text = unitName.First();
lblTtl.Text = exerc.Name_DE;
lblQty.Text = unitName.First();
qtyTxtBx.Text = LastSet.Quantity.ToString();
lpsTxtBx.Text = LastSet.Repetitions.ToString();
noteTxt.Text = LastSet.Note.ToString();

#region Chart

var set = db.GetExerciseSet(exerciseID).OrderBy(i => i.ExerciseSetID).ToList();

chart.Series[0].Type = ChartType.Line;
chart.Series[1].Type = ChartType.Line;

chart.Series[0].Name = unitName.First();
chart.Series[1].Name = "Repetitions";
chart.Series[1].Group = Series.AxisGroup.SecondGroup;
chart.Legend.Visible = true;

double v1 = 0.0;
double v2 = 0.0;
int setcount = 0;


foreach (var s in set)
{

setcount++;
v1 = double.Parse(s.Quantity.ToString());
v2 = double.Parse(s.Repetitions.ToString());


chart.Series[0].Data.Add(new DataPoint(v1, setcount.ToString()));
chart.Series[1].Data.Add(new DataPoint(v2, setcount.ToString()));
}
#endregion Chart
}
catch (Exception)
{

}
Sasq is not online. Last active: 2/9/2010 4:13:32 PM Sasq
Top 25 Poster
Joined: 31 Dec 2004
Total Posts: 80
 
Re: Infinite loop detected in range matching loop
Posted: 12 Mar 2008 05:43 AM
My appologies, i did not get time last night to try this. I will do my best to debug this tonight.

Thanks
Steve
Sasq is not online. Last active: 2/9/2010 4:13:32 PM Sasq
Top 25 Poster
Joined: 31 Dec 2004
Total Posts: 80
 
Re: Infinite loop detected in range matching loop
Posted: 15 Mar 2008 03:30 AM
Hi,

You are using a second axis, which means sasqChart is trying to find an axis which fits both the first and the second series. Unfortunatly this bit of code is rather shoddy and gives up if it can not find a good scale after a few hundered iterations.

I have been trying to fix this code for 2 years, but have never been able to get a dataset that causes the issue apart from my initial set some years back.

Can you tell me the range of numbers you are using on both axis please?

Thanks
Steve
Sasq is not online. Last active: 2/9/2010 4:13:32 PM Sasq
Top 25 Poster
Joined: 31 Dec 2004
Total Posts: 80
 
Re: Infinite loop detected in range matching loop
Posted: 29 Apr 2008 02:55 PM
Hiya,
Just checking if you need any further assistance on this?

Thanks
Steve
Previous Thread :: Next Thread 
Page 1 of 1
 
SasqChart  > SasqChart  > SasqChart FAQ  > Infinite loop detected in range matching loop