Attempted to read or write protected memory source CR for VS 2010

Hye everyone,
I'm working on VS2010 : C# Application WPF.
When I try to instance a Crystal Report, I receive this message
CrystalReport2 newCR = new CrystalReport2();
Attempted to read or write protected memory.
source=crystaldecisions.crystalreports.engine
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.CreateRptDoc()
   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper..ctor()
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Initialize()
   at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
   at CrystalDecisions.CrystalReports.Engine.ReportClass..ctor()
When I'm debugging I can see the report but when I stop the application I've got a "vshost32.exe has stopped working"
If I use the exe file of my application, I can't see the report and I've got a "MyApplication has stopped working". He never enters the constructor of my report.
For my report I use .net objects for Database Fields
Please help needed
Gridin

See the WPF demo here:
http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a09f7025-0629-2d10-d7ae-df006a51d1a8
Do you get the same issue using the steps described in the demo?
Also, see the kBase [1544651  - Crystal Reports WPF Viewer fails with NullReferenceException when used in a WinForms application|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533343334333633353331%7D.do].
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Similar Messages

  • Attempt to read or write protected memory VS 2010

    I can't run orr debug my program anymore. The message attempt to read or write protected memory. Other 2012 has no problems.
    Rinaldo
    Full of ideas but don't know how. Coding for fun.
    System.AccessViolationException was unhandled
      HResult=-2147467261
      Message=Poging tot het lezen of schrijven van beveiligd geheugen. Dit duidt er vaak op dat ander geheugen is beschadigd.
      Source=mscorlib
      StackTrace:
           bij System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
           bij System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
           bij System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           bij Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           bij System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           bij System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
           bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
           bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           bij System.Threading.ThreadHelper.ThreadStart()
      InnerException:

    For the VS 2010 project if the .exe inside the debug folder (unless you are compiling for release then the release folder) is executed outside of VS 2010 does the same issue occur?
    Also VS 2010 I believe required some updates. Perhaps this tool
    VersionInfo (Version information about your Visual Studio 2010 installation, and how to keep it updated to the latest) could provide if there are any issues with your VS 2010.
    On the other hand what originally occured with this project? It was created on VS 2010 and never worked then a copy of it was used with VS 2012 and all the sudden it worked? Or for some reason on VS 2010 it was working then one day suddenly memory issues
    began occuring?
    If the "one day suddenly memory issues began occuring" was the issue then that would be the day to get assistance. As anything could've happened that day that possibly could've been traced rather easily where however much time has gone by now and
    whatever else has been done with that system between then and now may make that extremely difficult to impossible.
    La vida loca

  • Attempted to read or write protected memory. This is often an indication...

    I receive the following error when debugging, but not when running the release version of my .NET 2.0 program:
    "Attempted to read or write protected memory. This is often an indication that other memory is corrupt"
    It's quite bizarre! I dont really know what else would be needed, but I can provide DLL versions etc if someone asks. Ive posted this in Ora/MTS forum because it only seems to happen when using a transaction on the client side

    Hi I have similar issue. Like others, it seems that the error returned by oracle make ASP.NET (w3wp.exe) to have runtime error.
    In my case, it occurs about once every day, consistently. The ASP still work even after runtime error but start to take up high cpu usage after 2nd and 3rd time of error, and totally crash (no reponse to the client request) after 3 or 4 times of errors. It recovers back after the server is restarted.
    The following is from event log of my server.
    Event Type:     Error
    Event Source:     ASP.NET 2.0.50727.0
    Event Category:     None
    Event ID:     1334
    Date:          1/15/2009
    Time:          10:10:02 AM
    User:          N/A
    Computer:     AXMAN
    Description:
    An unhandled exception occurred and the process was terminated.
    Application ID: /LM/W3SVC/1/Root/rais
    Process ID: 5984
    Exception: System.AccessViolationException
    Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    StackTrace: at System.Data.Common.UnsafeNativeMethods.OCIServerAttach(OciHandle srvhp, OciHandle errhp, Byte[] dblink, Int32 dblink_len, MODE mode)
    at System.Data.OracleClient.TracedNativeMethods.OCIServerAttach(OciHandle srvhp, OciHandle errhp, String dblink, Int32 dblink_len, MODE mode)
    at System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName)
    at System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions)
    at System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
    at System.Data.ProviderBase.DbConnectionPool.PoolCreateRequest(Object state)
    at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
    at System.Threading.ExecutionContext.runTryCode(Object userData)
    at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    -------------------------------------------------------------------------------

  • SharePoint crashing - Attempted to read or write protected memory

    Hey,
    My corporate intranet keeps crashing and becoming unresponsive. This is resolved by running an IISReset.
    The error reported is the standard SharePoint 2010 error page with a correlation id, an using ULS Deobfuscator the actual exception, which is:
    System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    Microsoft.SharePoint.Portal.WebControls.LocStringIdLookupTable..cctor()
    Could this be caused by custom code on the server? We have a lot of customizations, so it could be painful to track down. If I need to, are there any tools out there I could use to trace the source of the exception?
    Any help with this would be much appreciated as this is happening a lot and disrupting the companies function.
    Cheers
    M

    Hi All,
    i've been experiencing similar issues on some customer's sharepoint 2010 WFE's. Every few days, sometimes multiple times a day, one of the app pools somehow crashed, with the effect that every attempt to use the foundation search resulted in an unexpected
    error. In the ULS logs, we had the same AccessViolationException at the LocStringIdLookupTable static constructor. After an app pool recycle, the error was gone for a few hours/days and reappeared then.
    We've had another issue that seemed to occur on another farm with similar frequency: Suddenly, all list forms were empty and some (sharepoint internal) ribbon controls like "View Item", "Edit Item", "New Item" and several others. It turned out that several
    type instantiations failed for these ribbon controls (seen in ULS logs).
    After some investigation there seemed to be no real reason why these types couldn't be found, as all sharepoint assemblies have been in place, and after an app pool recycle, everything was running fine again.
    Then i had a look at the certificate revocation list check for authenticode assemblies, and this is what seemed to be the root cause of all my problems. All our servers have no internet connection, and all authenticode signed assemblies are trying to validate
    against the CRL over internet, which leads to long loading delays for all these assemblies (See
    http://support.microsoft.com/kb/936707/en-us).
    I can't prove it, but i suppose that it somehow happens that assemblies sometimes fail to load due to the lack of the internet connection during CRL check.
    After disabling the CRL check for all sharepoint servers (as described in the hotfix), the issues with the AccessViolationException never occured again (environment running fine for more than 6 weeks without any issues).
    I disabled the CRL check for the other environment (where the ribbon issues occured) last weekend, and i hope this will fix it, too.
    As we got a huge amount of servers at different stages, i wrote a powershell script to remotely implement the changes to the machine.config. If someone needs it, i will post it here, too.
    These issues seemed to start with some security patches, but i haven't been able to figure out which one, yet.

  • Attempted to read or write protected memory problems

    Hi there, we are having some issues with ODP.net. every few days after our system has been used quite a lot we get the "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." errors.
    I can reproduce this just by launching some threads that all make some DB calls, and after a while (took over an hour in the case) we encounter the error. It it not just one DB call causing it, looking at the logs it does appear to only be calls to 'Get' data, but just about all of them have failed at some point.
    Yes we have upgraded to the latest version 11.1.0.6.20 and it still happens. Here are some stack traces, Oracle.DataAccess.Client.OpsSql.AllocSqlValCtx seems to be the most common in the stack traces though, others do occur.
    at Oracle.DataAccess.Client.OpsSql.AllocSqlValCtx(OpoSqlValCtx*& pOpoSqlValCtx) at Oracle.DataAccess.Client.OracleCommand.BuildCommandText() at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior) at Oracle.DataAccess.Client.OracleCommand.ExecuteReader() at BUPA.HUGO.Common.DataAccessLayer.Database.StoredProcedures.ProspectSP.GetPersonProspectStoredProcedure.GetFullPersonDetailsDataReader(Int64 personId) in c:\Projects\CC.NETbuild_Hugo_Prod\Server\RF_Hugo_Services\Common\DataAccessLayer\Database\StoredProcedures\ProspectSP\GetPersonProspectStoredProcedure.cs:line 43
    Sometime the top of the stack is
    at Oracle.DataAccess.Client.OpsSql.CopySqlValCtx(OpoSqlValCtx* pOpoSqlValCtxSrc, OpoSqlValCtx*& pOpoSqlValCtxDst) at Oracle.DataAccess.Client.OracleParameter.PostBind_RefCursor(OracleConnection conn, OpoSqlValCtx* pOpoSqlValCtx) at Oracle.DataAccess.Client.OracleParameter.PostBind(OracleConnection conn, OpoSqlValCtx* pOpoSqlValCtx, Int32 arraySize) at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior) at
    or
    at Oracle.DataAccess.Client.OpsDac.Read(IntPtr opsConCtx, IntPtr opsErrCtx, IntPtr opsSqlCtx, IntPtr& opsDacCtx, OpoSqlValCtx* pOpoSqlValCtx, OpoMetValCtx* pOpoMetValCtx, OpoDacValCtx* pOpoDacValCtx) at Oracle.DataAccess.Client.OracleDataReader.Read()
    Does anyone have any ideas? I saw some older post just asking people to try the new version (which we have). Any help on this matter would be great. We are having trouble figuring out if it is something we are not doing correctly or if there is a bug in ODP.NET.
    Thank you,
    Luke

    Hello,
    I've got exactly the same problem. We're using ODP.NET 10g R2 10.2.0.3.02 with RAC database. I found that this error only occurs after a Failover event.
    My application is .NET 3.0 WPF app.
    I'm able to reproduce this error at any time.
    Please have a look at some source code:
    //opening OracleConnection:
    theConn.Open();
    theConn.Failover += new OracleFailoverEventHandler(theConn_Failover);
    // handling the Failover event as stated in the docs:
    static FailoverReturnCode theConn_Failover(object sender, OracleFailoverEventArgs eventArgs)
    Logging.LogInfo("DB-FailoverEvent: " + eventArgs.FailoverEvent.ToString() + " - Type: " + eventArgs.FailoverType.ToString());
    switch (eventArgs.FailoverEvent)
    case FailoverEvent.Begin:
    Logging.LogInfo("FailoverEvent.Begin - Failover is starting");
    Logging.LogInfo("FailoverType = " + eventArgs.FailoverType.ToString());
    break; // TODO: might not be correct. Was : Exit Select
    case FailoverEvent.End:
    Logging.LogInfo("FailoverEvent.End - Failover was successful");
    break; // TODO: might not be correct. Was : Exit Select
    case FailoverEvent.Reauth:
    Logging.LogInfo("FailoverEvent.Reauth - User reauthenticated");
    break; // TODO: might not be correct. Was : Exit Select
    case FailoverEvent.Error:
    Logging.LogInfo("FailoverEvent.Error - Failover was unsuccessful");
    // Sleep for 3 sec and Retry
    Thread.Sleep(3000);
    return FailoverReturnCode.Retry;
    case FailoverEvent.Abort:
    Logging.LogInfo("FailoverEvent.Abort - Failover was unsuccessful");
    break; // TODO: might not be correct. Was : Exit Select
    default:
    Logging.LogInfo("Invalid FailoverEvent : " + eventArgs.FailoverEvent.ToString());
    break; // TODO: might not be correct. Was : Exit Select
    // comment following lines will not raise an error
    if (connect2DB())
    return FailoverReturnCode.Success;
    else
    return FailoverReturnCode.Retry;
    And here's the source for checking DB-connection:
    private static bool connect2DB()
    if (null == myConn)
    myConn = openOracleConnection();
    if (null == myConn)
    Thread.Sleep(5000);
    return false;
    try
    if ((myConn.State == ConnectionState.Broken) || (myConn.State == ConnectionState.Closed))
    myConn = openOracleConnection();
    String sql = "SELECT 1 FROM dual";
    using (OracleCommand cmd = new OracleCommand())
    cmd.Connection = myConn;
    cmd.CommandText = sql;
    cmd.CommandTimeout = 2;
    using (OracleDataReader dr = cmd.ExecuteReader())
    dr.Read();
    catch (Exception ex)
    Logging.LogError(ex);
    closeOracleConnection(myConn);
    myConn = openOracleConnection();
    setDBConnState();
    if (null != myConn)
    if ((myConn.State == ConnectionState.Broken) || (myConn.State == ConnectionState.Closed))
    return false;
    else
    return true;
    else
    return false;
    When I don't call "connect2DB()" in the failover event handler then everything is fine - otherwise oops the error occurs after approx. 14 hours after application runtime.
    Regards
    Sven

  • "Attempted to read or write protected memory" error in loading a report.

    Development Environment
    ===
    Windows XP
    Visual Studio 2008 Pro; with Crystal Reports 2008 for Visual Studio
    TagetCPU: 'AnyCPU'
    VB.net 3.5
    Windows dll
    Crystal Reports Runtime SP2 (12.2.0.290)
    Deployment Environment
    ===
    Windows XP
    .net3.5
    Crystal Reports Runtime SP3 (no be confirmed)
    I have created a windows dll with a form with a reportdocument, that loads a report (CrystalDecisions.CrystalReports.Engine.ReportDocument).
    Then we circle through the report setting every table location to point at a specific ODBC and database.
    The Dll can do this process several hundred reports in a day. However a small number (less than 10) of these have the following error:
    "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
    This is normally occurring when the reportDocument.Load function is called. But also happens when going through the setting of table locations: [myTable.ApplyLogOnInfo(TmpTableLogOnInfo)
    The dll is called via COM interop and so i have checked "Register for COM interop".
    Simon@Sanderson

    1) Get to SP 3:
    for dev computer:
    https://smpdl.sap-ag.de/~sapidp/012002523100007123572010E/cr2008_sp3.exe
    Recompile the app after SP3 is applied.
    for SP3 runtime:
    MSI
    https://smpdl.sap-ag.de/~sapidp/012002523100007123592010E/cr2008sp3_redist.zip
    MSM
    https://smpdl.sap-ag.de/~sapidp/012002523100007123582010E/cr2008sp3_mm.zip
    (You will have to uninstall SP 2 runtime before installing SP 3 runtime)
    2) Do not use "Any CPU". CR2008 is only 32 bit anyhow so use 32 bit.
    3) Make sure you are using .Close and .Dispose once you are done with each report object
    - Ludek

  • PInvoke - Issue while calling DJVU function from C# Code - Attempted to read or write protected memory

    Hi,
    I know there are many questions in this subject but none of them help to resolve the issue I am currently facing.
    Below is the signature of C Function from DJVULibre added in .NET code
    [DllImport("C:\\Program Files\\DJVULIBRE\\LIBDJVULIBRE.dll", CharSet=CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
    private unsafe static extern int ddjvu_page_render(IntPtr page, ddjvu_render_mode_t mode, IntPtr pagerect,
    IntPtr renderrect,
    IntPtr pixelformat,
    ulong rowsize,
    [Out][MarshalAs(UnmanagedType.LPArray)]byte[] imagebuffer);Below is how I am calling this function in the c# codebyte* buffer = (byte *)Memory.Alloc(nSize);
    try
    IntPtr ptr1 = (IntPtr)Memory.Alloc(Marshal.SizeOf(prect));
    Marshal.StructureToPtr(prect, ptr1, false);
    IntPtr ptr2 = (IntPtr)Memory.Alloc(Marshal.SizeOf(rrect));
    Marshal.StructureToPtr(rrect, ptr2, false);
    byte[] array = new byte[nSize];
    fixed (byte* p = array) Memory.Copy(buffer, p, nSize);
    ddjvu_page_render(page, ddjvu_render_mode_t.DDJVU_RENDER_MASKONLY, ptr1, ptr2, fmt, (ulong)stride, array);
    finally
    Memory.Free(buffer);
    }call to ddjvu_page_render in above code is throwing "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
    Prior to this post I must have tried all the option could find in various blogs.
    Appreciate any help, is almost a day I am clueless, your timely help could save my job

    Thanks Viorel, below is the definition of original C function
    DDJVUAPI int
    ddjvu_page_render(ddjvu_page_t *page,
    const ddjvu_render_mode_t mode,
    const ddjvu_rect_t *pagerect,
    const ddjvu_rect_t *renderrect,
    const ddjvu_format_t *pixelformat,
    unsigned long rowsize,
    char *imagebuffer );below is how the code is calling this function in C#, the in pointers are all valid pointer I checked in debugging window byte* buffer = (byte *)Memory.Alloc(nSize);
    try
    IntPtr ptr1 = (IntPtr)Memory.Alloc(Marshal.SizeOf(prect));
    Marshal.StructureToPtr(prect, ptr1, false);
    IntPtr ptr2 = (IntPtr)Memory.Alloc(Marshal.SizeOf(rrect));
    Marshal.StructureToPtr(rrect, ptr2, false);
    byte[] array = new byte[nSize];
    fixed (byte* p = array) Memory.Copy(buffer, p, nSize);
    ddjvu_page_render(page, ddjvu_render_mode_t.DDJVU_RENDER_MASKONLY, ptr1, ptr2, fmt, (ulong)stride, array);
    finally
    Memory.Free(buffer);

  • AccessViolationException: Attempted to read or write protected memory.

    Hello all.
    The application that I am working on has a Oracle DB 10g and we want to migrate the DB to 11g (11.2.0.2). The client OS is a Windows 7 x64 and the application (which is an x86 app) is a hybrid between .NET and C++(COM components). The .NET part is using ODP.NET components and the C++ part is using ODBC drivers (oraclient 11.2.0.1 - x86 version).
    The problem is that the application works without any problems with the 10g DB but when switching to 11g we get an exception. Basically, we have a try { call COM component } catch(Ex ex) {...} and the Exception ex is a AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. I debugged the C++ part and this strange thing happens: the component opens the connection (using a connection string like this : "driver={Oracle in OraClient}; uid=... pwd=.. "), executes some queries, and on one query (which is the same as the last ones - just some selects), when the data is processed (by data I mean a integer ID), the exception is thrown in .NET code. I was able to enter in afxdb.cpp and it looks like the exception is thrown when GetData method is called. I looked over the ID's from previous queries and the data passed to GetData method is about the same (I mean the fieldtype, index, len, SQL type).
    As solutions I tried:
    -set "Statement Cache Purge=true" => same effect
    - install a instantclient11_2 basic and ODBC drivers (for 11.2.0.2) but I could not connect to the DB (I could find the new drivers in registry WoW64Node/ODBC Drivers, put the location in PATH in front of the other OraClient and replace the OraClient with the name in registry in conn string) => Specified driver could not be loaded due to system error 127.
    - tried to see the Marshal.GetLastWin32Error() => returns 0.
    Any ideas? :D
    Edited by: 917334 on Feb 27, 2012 12:57 PM

    The select clause that causes the problem is actually a select over a view. I replaced the select * from MYView with the actual select clause (with inner join) and the issue disappeared.
    Any ideas? :)
    Solution:
    Looks like the view was written using INNER JOIN stuff. I replaced the code from the view with a simple select like this (inner join free):
    select table1.col1, table2.col2, table3.col2, from table1, table2, table3 where table1.col1 = table2.col1 and table1.col1 = table3.col1
    Some questions still remain (even if my issue is partially solved):
    - why was it working on 10g?
    - why this particular view crashed? (there are other views that use inner join and don't cause this)
    - why was it working when using the full select (with inner join) and not working when selecting over the view?
    Edited by: 917334 on 28.02.2012 08:33

  • SSRS 2008 R2 - on Preview report in report builder itself, getting an error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt". Any Suggestions please to resolve it?

    Hi,
    I am working on SSRS 2008 R2. On Preview report in report builder itself, i am getting an error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt".
    See my below screen shoot.
    Any Suggestions please  to resolve it? 
    thank you in advance !
    best regards,
    Venkat,
    [email protected]

    Hi Venkat,
    According to the error message, I guess that the error occurred when you previewed the report in Business Intelligence Development Studio (BIDS).
    Based on my research, I think it may be a Window Layout issue of Visual Studio. Please try the steps below:
    Click “Window” button from the toolbar ribbon.
    Click “Reset Windows Layout” option.
    Click “Yes” to finish the operation.
    The following thread is for your reference:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/90949d68-a611-467c-b438-be97b8ab250b/attempted-to-read-or-write-protected-memory-this-is-often-an-indication-that-other-memory-is
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Attempted to read or write protected memory error

    Hello,
    I am using the .Net library and occasionally I get a System.AccessViolationException,"Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Currently it is occurring when trying to initialize a TypedTPINIT object (this has happened in other places before and we just retry the request as a work-around). I set the size equal to the password length + 2 and the constructor for TypedTPINIT throws the exception after making the call to tpaloc. I have code that catches the exception and tries again up to 5 times before bubbling the exception up the chain. Once this exception occurs, no calls can be made to tux, they all throw the same exception. Once the application is closed and restarted (restarting the win32 process), everything works fine with the same data. It will work for a day or two and then fowl up again, seemingly at random. I am unable to reproduce the error at will, we just see it popup now and again, but closing the process and restarting it makes it go away for a while.
    Any idea why this exception is happening?
    I tried taking the .Net library out of the question and make the call to tpalloc myself using p/invoke and the same thing happens, but not every time.
    I appreciate any help you can provide.
    ~Jason

    Hi Jason,
    I would suggest using a memory access checking tool like bounds checker, electric fence, or the like, although I don't know what's available in a .NET environment.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Attempted to read or write protected memory error on reportdocument.load

    Reportdocument.load causes "System.AccessViolationException: Attempted to read or write protected memory" error.
    The error is not consistent. Sometimes a report will print. Sometimes a report will error.
    I am at a loss as to what to try.
    I have uninstall the app, reinstalled the app, uninstall and reinstalled .NET frameworks, Visual C++ runtime, etc.,
    reworked the code to try to capture the error. Nothing helps. Application crashes with Unhandled exception.
    Attempted to read or write to protected memory.
    Has anyone been able to resolve this issue?

    Hi Mary,
    What happens if you set your project to use 4.0 framework?
    Anything else in the Event Viewer to show an access violation?
    Have you tried updating the printer driver to one that is supported in the Framework? I find most legacy printers tend to use the old DEVMODE structure and not the Framework. Try using the printer off the Window CD rather than the Manufacturers driver.
    Is your app doing "Report Bursting"? In other words sending multiple reports one right after the other with no time between?
    Are you using any legacy UFL's? Try renaming u2lcom.dll if you are not using them. If you do you'll get an error in formula.
    Are you using try/catch in your code around each CR API? It may catch something more for you also.
    AND, can you try a C# project, some thing very simple also. I've of issues in VS VB that do not show up in other dev languages. Neither Microsoft or SAP can figure out what the cause is.
    Thank you
    Don
    Edited by: Don Williams on Feb 11, 2011 2:34 PM

  • System.AccessViolationException:Attempted to read or write protected memory

    Hi,
    I am using Asp.net with oracle 10 g in my application , it is working perfectly in my machine. i have installed Oracle 10 g in my machine. but i did not installed oracle 10 g in server
    but i am running an application from the server. i got this Error:
    Attempted to read or write protected memory.This is often an indication that other memory is corrupt.
    Please Help me.
    Thanks.

    Hi,
    try to set the
    ProxyCreationEnabled property of dbContext is set to true.

  • Attempted to read or write protected memory

    Imports Axzkemkeeper
    Imports zkemkeeper
    Public Class Form11
    Dim q As New Axzkemkeeper.AxCZKEM
    Dim con As Boolean = False
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    'Try
    ' q.CreateControl()
    ' con = q.Connect_Net("192.168.0.202", CInt(4370))
    ' If con Then
    ' MsgBox("yes")
    ' Else
    ' MsgBox("fuck!")
    ' End If
    'Catch ex As Exception
    ' MsgBox(ex.Message)
    'End Try
    q.CreateControl()
    'q.SkinAllThreads()
    con = q.Connect_Net("192.168.0.202", CInt(4370))
    If con Then
    MsgBox("yes")
    Else
    MsgBox("oh shoot!")
    End If
    End Sub
    End Class
    i try to connect biometric device from vb using axzkemkeeper.dll but i comes with error:
    An unhandled exception of type 'System.AccessViolationException' occurred in AxInterop.zkemkeeper.dll
    Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    i really thanksful with any advice you give....
    best regards...
    Exception is:
    An unhandled exception of type 'System.AccessViolationException' occurred in AxInterop.zkemkeeper.dll  Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    Please refrain from the profanity.
    The problem appears to be from inside Axzkemkeeper.AxCZKEM. Whatever that is... I am unable to help with the code you provided.
    “If you want something you've never had, you need to do something you've never done.”
    Don't forget to mark
    helpful posts and answers
    ! Answer an interesting question? Write a
    new article
    about it! My Articles
    *This post does not reflect the opinion of Microsoft, or its employees.

  • Attempted to read or write protected memory in SAP 8.81 PL5

    Hi
    I seem to be suddenly getting lots of 'attempted to read or write protected memory' in an application I am writing using the B1DE
    It seems to fail either when connecting to SAP or when initialising a recordset command
    I have tried the usual tricks -
    delete SM_OBS_DLL folder
    reinstall client
    reinstall DI API
    I am on SAP 8.81 PL5
    It's causing me real problems as I can hardly run my vb.net application
    Can anyone help please ?
    Many Thanks
    Regards Andy

    Hi all
    Thanks for your answers.
    At the moment I have found if I turn off all breakpoints the code runs fine.
    I will try your answers but I have lost a lot of time on this and I have a deadline looming
    Thanks again
    Regards Andy

  • Attempted to read or write protected memory. This is often an indication that other memory is corrupt SAP B1

    Dear All,
    While adding customization addon, the below error shows.
    The below credentials ,
    SAP B1 -- 9.0 Version
    Patch level -- PL 06
    DIAPI -- 32 bit (x86)
    "Attempted to read or write protected memory. This is often an indication that other memory is corrupt".
    Please fix this issue ASAP.
    Thanks & Regards,
    Bowya S S

    Hi,
    Please check SAP note:
    1988581 - Unable to update UDT
    Thanks & Regards,
    Nagarajan

Maybe you are looking for

  • Need help in transformation

    Hi All,     I need a help in transformation.  There are 5 Key figures : KF1, KF2,KF3, KF4 , KF5 in my target. Requirement is  KF3 should be KF1 * KF2 and if KF4 >0 ,  KF5 = KF4.   else         KF5 = KF3. I am not able to see these key figures when im

  • Design...where to start

    I am sure everyone asks this, but where or how is the best way to get started with website design. I am competent with HTML/CSS and server side development, but would like to be able to create my own graphics, logos, background etc. I am gone through

  • Problem in cost distribution

    Hi all, I am trying to fetch the data from 27 infotype using provide statement ( e.g provide * from p0027 between pn-begda and pn-endda where pernr = l_pernr ). like this .... but i am getting error in where part can any one give idea for this ,,,, t

  • Cascading drop down

    Hi, I want to create a cascading drop down. The view object for the drop down contains two bind variables. In the JHeadstart application definition I fill one bind variabele with text (this is for finding the correct domain in the underlying table) a

  • Exchange/Outlook 2010 Server Side Rule

    Hi guys, Does anyone know what happens with regards to rule that forwards email received to a new destination (in this case a contact) but the outbound message size limit is breached.  In normal operation Outlook would pop-up a message indicating but