Last post Dec 09, 2011 12:36 AM by riteshtandon23
Oct 31, 2009 04:28 AM|pooja.verma|LINK
when a crystal report for same id is opened again at same time or refreshed then it gives the
"System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Stack Trace is :-
[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.] CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetConnectionInfos(ConnectionInfos ConnectionInfos) +0 CrystalDecisions.CrystalReports.Engine.Table.ApplyLogOnInfo(TableLogOnInfo logonInfo) +362 CrystalDecisions.CrystalReports.Engine.ReportDocument.SetTableLogon(Tables tables, String user, String password, String server, String database, Boolean ignoreCase) +258 CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDatabaseLogon(String user, String password, String server, String database, Boolean ignoreCase) +204 CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDatabaseLogon(String user, String password, String server, String database) +69 StudentDetailReport.Page_Load(Object sender, EventArgs e) +351 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Please help me find the solution to it
Nov 04, 2009 04:06 AM|pooja.verma|LINK
Please help me find the solution!! i m not able to find the resolution anywhere
Nov 30, 2009 06:42 PM|dschrenker|LINK
Im getting the same error, does anyone have any idea how to fix this?
Jan 05, 2010 03:59 AM|Pushkar|LINK
Sometime this kind of error occure due to permission level but i don't think in your case.
Try this steps.
Set your Debugger in VS2005:
Uncheck this option "Suppress JIT optimization on module load"..
Hope this will help.
Mar 11, 2010 10:33 AM|emanuele.greco|LINK
The AccessViolationException was raised after first load of the page; I don't know why but the file isn't released the right way; any access after the first one causes an AccessViolationException
I fixed the problem putting all the code for Logon and SetConnectionInfos under an
if(!IsPostBack) clause, and the application started working.
C#rystal reports access violation exception solved
Aug 18, 2010 08:32 AM|Ramkumar.Venkatachalam|LINK
Restart the IIS will solve the problem perfectly......
Aug 18, 2010 08:51 AM|dschrenker|LINK
This issue was resolved. It was a corrupted installation of the Crystal Reports for VS2008 redistributable and access denied to a temporary folder where the PDF was being written.
Oct 25, 2010 07:42 PM|ehWutsupDoc|LINK
File this under "Strange phenomenon of the unexplained"
I had the same error and restarting the IIS server did not fix it for me.
I had the same code in two projects, it worked in one project, but not the other. So what I did is compare the settings between the two.
The one which didn't work (ie corrupt memory error) was set up to use a non-default App-Pool in IIS. I changed it to the Default App Pool. And all the sites stopped working.
At that point, I changed it back to use a non-default App-Pool.
And still all the sites were down.
I stopped and started the IIS service, and it started working.
Dec 09, 2011 12:36 AM|riteshtandon23|LINK
Include all your report displaying code in event Page_Init. And include the code which sets the database logon i.e. SetDatbaseLogon in Try Catch Block This would solve the problem.