User (Legacy) Posted December 20, 2004 Report Share Posted December 20, 2004 I get this error on a postback. The page/chart loads perfect on the initial load. I've set break points at PageLoad and the exception occurs before that. I'm running the latest updates to dev studio. It seems to occur before the postback is actually handled Object reference not set to an instance of an object. 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.NullReferenceException: Object reference not set to an instance of an object. 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: [NullReferenceException: Object reference not set to an instance of an object.] SoftwareFX.ChartFX.Internet.Server.ChartCore.6A(Object 10C) +528 SoftwareFX.ChartFX.Internet.Server.ChartCore.Import(FileFormat format, Stream stream) +403 SoftwareFX.ChartFX.Internet.Server.ChartCore.Import(FileFormat format, String fileName) +69 SoftwareFX.ChartFX.Internet.Server.Chart.LoadViewState(Object objState) +87 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +136 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +414 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +414 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +414 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +414 System.Web.UI.Page.LoadPageViewState() +306 System.Web.UI.Page.ProcessRequestMain() +447 Link to comment Share on other sites More sharing options...
Software FX Posted December 21, 2004 Report Share Posted December 21, 2004 Right after this error occurs, please go to ChartFX62/Temp and look for the most recent CHW file. Attach this file to your posting. This should help us determine the cause of this problem. -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted December 21, 2004 Author Report Share Posted December 21, 2004 here is the chw. please keep in mind the initial chart loads fine (w/ data). The goal of the postback is to change the datasource of the same chart object and rebind the data, it doesn't ever reach this point however. "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:y7ONR125EHA.3492@webserver3.softwarefx.com... > Right after this error occurs, please go to ChartFX62/Temp and look for > the > most recent CHW file. Attach this file to your posting. This should help > us > determine the cause of this problem. > > -- > FP > Software FX > > Link to comment Share on other sites More sharing options...
Software FX Posted December 22, 2004 Report Share Posted December 22, 2004 For some reason. The chart being generated here has some inconsistent properties that makes it crash when it Loads from the saved ViewState. I can see what's wrong with the file but I can not determine why is this happening. Can you provide with a repro case ? do you have a WebForms app that I can run here that reproduces the problem ? If this is not possible, can you please post the code that configures the chart, in particular anything that you are doing with the LegendBox, ClearData would be of interest to me. -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted December 22, 2004 Author Report Share Posted December 22, 2004 well, it seems to work now ?? I fired up the .sln to get the source, couldn't build because cfx dlls were "access denied" on build (new error). Deleted bin directory, gave myself Full control on the c:\program files\ChartFx.. dir and sub dirs as well as BIN. Rebuild was fine (normal). Launched IE navigated to local chart, did postback and everybody is fine. This all arose when i went to fix something w/ the dates at the bottom of the graph. When a user would change their preference from a Line gallery to a Bar gallery, the Bar graph would show 2 dates at the bottom and one would be 6 days in the future. (see attached - both are generated in the same session from the same dataset) This appears to be ok now as well. Maybe just some .Net DLL run-a-muckery. Thanks for the help, maybe you can bill MS for your time... Anyway, here was the code to bind the data to the chart if it still interests you --- I added the cleardata line to try and fix the date problem, turns out it makes no difference. private void BindGraph(string TableName) { PSTrendedTable table = GetSite().Tables[TableName]; if (table == null) { ViewState["Err"] = true; ErrLabel.Text = "There is no data for this site."; return; } cfxGraph.ClearData( SoftwareFX.ChartFX.ClearDataFlag.AllData ); ViewState["CurrentTable"] = TableName; PSTrendedTableProperties props = new PSTrendedTableProperties( CONNSTR ); props.Load( table.TableRefKey ); // ========= Set Title ========== // cfxGraph.Titles[0].Text = TableName.Trim(); switch( table.UOM ) { case 0: cfxGraph.Titles[0].Text += " Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.