User (Legacy) Posted September 2, 2003 Report Share Posted September 2, 2003 We are developing a Web Application using .Net and ChartFX. The chart displayed is using this code: SoftwareFX.ChartFX.Borders.GradientBackground cfxGradient; cfxGradient = new SoftwareFX.ChartFX.Borders.GradientBackground(SoftwareFX.ChartFX.Borders.Gra dientType.ForwardDiagonal); cfxGradient.Color[0] = System.Drawing.Color.Blue; cfxGradient.Color[1] = System.Drawing.Color.Beige; cfxGradient.Color[2] = System.Drawing.Color.White; cfxGradient.Position[0] = 0; cfxGradient.Position[1] = (float)0.5; cfxGradient.Position[2] = 1; cfxChart.BackObject = cfxGradient; cfxChart.InsideColor = System.Drawing.Color.Beige; After the addition of that code it always crashes on any postback. This is the error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Stack Trace: [NullReferenceException: Object reference not set to an instance of an object.] SoftwareFX.ChartFX.Internet.Server.AxisBase.ClearLabels() SoftwareFX.ChartFX.Internet.Server.AxisBase.99() SoftwareFX.ChartFX.Internet.Server.AxisCollection.99() SoftwareFX.ChartFX.Internet.Server.ChartCore.ClearData(ClearDataFlag clearDataFlag) SoftwareFX.ChartFX.Internet.Server.ChartCore.Dispose() SoftwareFX.ChartFX.Internet.Server.Chart.Dispose() System.Web.UI.Control.UnloadRecursive(Boolean dispose) +138 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +74 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +74 System.Web.UI.Page.ProcessRequestCleanup() +24 System.Web.UI.Page.ProcessRequest() +218 System.Web.UI.Page.ProcessRequest(HttpContext context) +18 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionSte p.Execute() +179 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&completedSynchronously) +87 We discovered that adding cfxChart.EnableViewState = false The error disappears, but we have to use ViewState for other situations. Any ideas of what could be the error? DDP Note: We installed the service pack and now the error is: Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: obj Stack Trace: [ArgumentNullException: Value cannot be null. Parameter name: obj] System.Runtime.Serialization.ObjectManager.RegisterObject(Object obj, Int64 objectID, SerializationInfo info, Int64 idOfContainingObj, MemberInfo member, Int32[] arrayIndex) +781 System.Runtime.Serialization.ObjectManager.RegisterObject(Object obj, Int64 objectID) +23 SoftwareFX.ChartFX.Internet.Server.09.8N(Object 0SR, String 0SS, Boolean& 0ST, Int64& 0SU) SoftwareFX.ChartFX.Internet.Server.09.8T(String 0SY, Object 0SZ, String 0T0, ObjFlags 0T1, Int64 0T2) SoftwareFX.ChartFX.Internet.Server.09.Serialize(String sName, Object obj, String sType, ObjFlags flags) SoftwareFX.ChartFX.Borders.GradientBackground.03(Boolean 7U, IPersistBase 7V) SoftwareFX.ChartFX.Internet.Server.09.8T(String 0SY, Object 0SZ, String 0T0, ObjFlags 0T1, Int64 0T2) SoftwareFX.ChartFX.Internet.Server.09.Serialize(String sName, Object obj, String sType, ObjFlags flags) SoftwareFX.ChartFX.Internet.Server.00.2Y(Boolean 0QW, IPersistBase 0QX) SoftwareFX.ChartFX.Internet.Server.09.8T(String 0SY, Object 0SZ, String 0T0, ObjFlags 0T1, Int64 0T2) SoftwareFX.ChartFX.Internet.Server.09.Serialize(String sName, Object obj, String sType, ObjFlags flags) SoftwareFX.ChartFX.Internet.Server.ChartCore.54(Boolean 0LX, IPersistBase 0LY, Boolean 0LZ) SoftwareFX.ChartFX.Internet.Server.ChartCore.5I(IPersistBase 0MG) SoftwareFX.ChartFX.Internet.Server.ChartCore.Import(FileFormat format, Stream stream) SoftwareFX.ChartFX.Internet.Server.ChartCore.Import(FileFormat format, String fileName) SoftwareFX.ChartFX.Internet.Server.Chart.LoadViewState(Object objState) System.Web.UI.Control.LoadViewStateRecursive(Object savedState) System.Web.UI.Control.LoadViewStateRecursive(Object savedState) System.Web.UI.Control.LoadViewStateRecursive(Object savedState) System.Web.UI.Control.LoadViewStateRecursive(Object savedState) System.Web.UI.Page.LoadPageViewState() System.Web.UI.Page.ProcessRequestMain() +417 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.