ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Problem with XYChart in ASP.NET 2.0
Posted by Shaleen Chugh on Jul-13-2007 20:12
I am getting this error:

An unhandled exception of type 'System.AccessViolationException' occurred in Unknown Module.

Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

The Pie charts seem to work fine but the Bar charts crash the application. I have ched Indexing and the Indexing service is stopped. Pls help

Thanks,
Shaleen

  Re: Problem with XYChart in ASP.NET 2.0
Posted by Peter Kwan on Jul-13-2007 23:56
Hi Shaleen,

First, please verify if you are using the latest version of ChartDirector (Ver 4.1). The latest version of ChartDirector should contain of a 1 file assembly "netchartdir.dll" around 600 Kbytes in size. Earlier versions of ChartDirector consists of 3 files "netchartdir.dll", "netchartdir_internal" and "netchartdir???.dll" and the "netchartdir???.dll" is over 1 MB in size.

If you are not using the latest version of ChartDirector, please kindly download it from our web site. If you have purchased ChartDirector on or after 1 Apr 2003, the upgrade is free of charge. Your existing license key will continue to work with the latest version.

After the download, please delete the old files "netchartdir.dll", "netchartdir_internal" and "netchartdir???.dll" from your system (particularly the "netchartdir???.dll", just to make sure the old version is removed and the system is really using the new version). Then use the new file "netchartdir.dll". The diagnostic page "ChartDirector/VBNetASP/cdinfo.aspx" should show the version as Ver 4.1.

Actually, this is the first time we saw of this error occuring with any version of ChartDirector. I suggest to upgrade to ChartDirector Ver 4.1, because "in theory", this version should not be capable to produce this error at all. (ChartDirector Ver 4.1 is 100% managed code without using Interop or DllImport.) If this problem still occurs, there is a chance the problem may not be related to ChartDirector. In this case, I suggest you may create a test page for testing. The test page should draw the same XY chart as your real page, but using hard coded data or random numbers. It should not have any other things except the chart. This can confirm if the crashing is in the charting code. If the test page still crashes, please attach the test page in your message so I may reproduce the issue.

Regards
Peter Kwan

  Re: Problem with XYChart in ASP.NET 2.0
Posted by Lenin on Feb-22-2013 19:55
Code behind:
byte[] pImage = xyCHart.makeWebImage(Chart.PNG).image; (error here)





Error Type:
System.AccessViolationExceptionError Message:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.Stack Trace:
   at ChartDirector.BaseChart.CBaseChart_makeChart2(IntPtr ptr, Int32 format, IntPtr& data, Int32& len)
   at ChartDirector.BaseChart.makeChart(Int32 imgFormat)
   at ChartDirector.BaseChart.makeChart2(Int32 imgFormat)
   at ChartDirector.BaseChart.makeWebImage(Int32 imgFormat, Int32 timeout)
   at ChartDirector.BaseChart.makeWebImage(Int32 imgFormat)

  Re: Problem with XYChart in ASP.NET 2.0
Posted by Peter Kwan on Feb-22-2013 22:59
Hi Lenin,

This error should be produced by a quite old version of ChartDirector (possibly releaesd over 7 or 8 years ago). For some old versions of ChartDirector for .NET, they require "Full Trust" to work. You would need to configure the .NET system in the Control Panel to make sure the ChartDirector assembly has "Full Trust", and also the ASP.NET system that runs ChartDirector has "Full Trust".

To solve the problem, we suggest to upgrade to a later version of ChartDirector (preferably the latest version 5.1.1, but at least 4.1) that does not require full trust to run.

Hope this can help.

Regards
Peter Kwan