locked
Crystal Report gives System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.s RRS feed

  • Question

  • User-166935432 posted

    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 :-


    Stack Trace:

    [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

    Saturday, October 31, 2009 4:28 AM

All replies

  • User-166935432 posted

    Please help me find the solution!! i m not able to find the resolution anywhere

    Wednesday, November 4, 2009 4:06 AM
  • User1686364564 posted

    Im getting the same error, does anyone have any idea how to fix this? 

    Monday, November 30, 2009 6:42 PM
  • User-1584272385 posted

    Hi Pooja.

    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:

    From Tools---->Options

    Debugging----->General

    Uncheck this option "Suppress JIT optimization on module load"..

    Hope this will help.

    Tuesday, January 5, 2010 3:59 AM
  • User-1404041403 posted

    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.


    Greetings

    emanuele.greco

    Thursday, March 11, 2010 10:33 AM
  • User-1948400566 posted


    Restart the IIS will solve the problem perfectly......

    Wednesday, August 18, 2010 8:32 AM
  • User1686364564 posted

    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. 


    Thanks.

    Wednesday, August 18, 2010 8:51 AM
  • User204360544 posted

    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.


    Monday, October 25, 2010 7:42 PM
  • User1336021323 posted

    Hi Pooja,

    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.

    Thnx

    ritessh

    Friday, December 9, 2011 12:36 AM