Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Hi there, I'm having a weird issue when I try to connect to my DB server from the machine in which is located.
I am using SSMS to connect to the DB. When i use the name of the sql server, I can connect without issues, but when I replace the name with an IP address and a port, i always get this error:
===================================
Cannot connect to 192.168.1.215,1433.
===================================
Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (System.Data)
Program Location:
at SNINativeMethodWrapper.SNIClose(IntPtr pConn)
at System.Data.SqlClient.SNIHandle.ReleaseHandle()
at System.Runtime.InteropServices.SafeHandle.InternalDispose()
at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing)
at System.Runtime.InteropServices.SafeHandle.Dispose()
at System.Data.SqlClient.TdsParserStateObject.Dispose()
at System.Data.SqlClient.TdsParser.Disconnect()
at System.Data.SqlClient.SqlInternalConnectionTds.LoginFailure()
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance,
SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
But this only happens when I try to connect from the PC in which the sql server is, when I try to connect by TCP/IP from another machine on the same network, I can login without problems.
Any help will be appreciated.
Hello,
Lot of similar issues related to your post please check if any one is of any help
Attempt to read write protected memory
Similar issue answered here
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
My TechNet Wiki Articles
Similar Messages
-
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 -
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 SHi,
Please check SAP note:
1988581 - Unable to update UDT
Thanks & Regards,
Nagarajan -
Any idea where this error might come from? Thank you,
Error Message:
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory
is corrupt.
Record Starts at UTC 04/29/2015 15:26:51:
Run the job:"/dll "Microsoft.Analytics.Modules.ScoreGeneric.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.Analytics.Modules.ScoreGeneric.Dll.ScoreGenericModule;ScoreGeneric" /Output0 "..\..\Scored dataset\Scored dataset.dataset" /learner "..\..\Trained model\Trained model.ilearner" /testData "..\..\Dataset\Dataset.dataset" "
Starting Process 'C:\Resources\directory\275cc759e61f4dbf889cde5e5cba0835.SingleNodeRuntimeCompute.Packages\AFx\6.3\DllModuleHost.exe' with arguments ' /dll "Microsoft.Analytics.Modules.ScoreGeneric.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.Analytics.Modules.ScoreGeneric.Dll.ScoreGenericModule;ScoreGeneric" /Output0 "..\..\Scored dataset\Scored dataset.dataset" /learner "..\..\Trained model\Trained model.ilearner" /testData "..\..\Dataset\Dataset.dataset" '
[ModuleOutput] DllModuleHost Start: 1 : Program::Main
[ModuleOutput] DllModuleHost Start: 1 : DataLabModuleDescriptionParser::ParseModuleDescriptionString
[ModuleOutput] DllModuleHost Stop: 1 : DataLabModuleDescriptionParser::ParseModuleDescriptionString. Duration: 00:00:00.0051299
[ModuleOutput] DllModuleHost Start: 1 : DllModuleMethod::DllModuleMethod
[ModuleOutput] DllModuleHost Stop: 1 : DllModuleMethod::DllModuleMethod. Duration: 00:00:00.0000603
[ModuleOutput] DllModuleHost Start: 1 : DllModuleMethod::Execute
[ModuleOutput] DllModuleHost Start: 1 : DataLabModuleBinder::BindModuleMethod
[ModuleOutput] DllModuleHost Verbose: 1 : moduleMethodDescription Microsoft.Analytics.Modules.ScoreGeneric.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.Analytics.Modules.ScoreGeneric.Dll.ScoreGenericModule;ScoreGeneric
[ModuleOutput] DllModuleHost Verbose: 1 : assemblyFullName Microsoft.Analytics.Modules.ScoreGeneric.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca
[ModuleOutput] DllModuleHost Start: 1 : DataLabModuleBinder::LoadModuleAssembly
[ModuleOutput] DllModuleHost Verbose: 1 : Trying to resolve assembly : Microsoft.Analytics.Modules.ScoreGeneric.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca
[ModuleOutput] DllModuleHost Verbose: 1 : Loaded moduleAssembly Microsoft.Analytics.Modules.ScoreGeneric.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca
[ModuleOutput] DllModuleHost Stop: 1 : DataLabModuleBinder::LoadModuleAssembly. Duration: 00:00:00.0085356
[ModuleOutput] DllModuleHost Verbose: 1 : moduleTypeName Microsoft.Analytics.Modules.ScoreGeneric.Dll.ScoreGenericModule
[ModuleOutput] DllModuleHost Verbose: 1 : moduleMethodName ScoreGeneric
[ModuleOutput] DllModuleHost Information: 1 : Module FriendlyName : Score Model
[ModuleOutput] DllModuleHost Information: 1 : Module Release Status : Release
[ModuleOutput] DllModuleHost Stop: 1 : DataLabModuleBinder::BindModuleMethod. Duration: 00:00:00.0124750
[ModuleOutput] DllModuleHost Start: 1 : ParameterArgumentBinder::InitializeParameterValues
[ModuleOutput] DllModuleHost Verbose: 1 : parameterInfos count = 2
[ModuleOutput] DllModuleHost Verbose: 1 : parameterInfos[0] name = learner , type = Microsoft.Analytics.MachineLearning.ILearner
[ModuleOutput] DllModuleHost Start: 1 : DotNetSerializationHandler::HandleArgumentString
[ModuleOutput] DllModuleHost Stop: 1 : DotNetSerializationHandler::HandleArgumentString. Duration: 00:00:01.2145753
[ModuleOutput] DllModuleHost Verbose: 1 : parameterInfos[1] name = testData , type = Microsoft.Numerics.Data.Local.DataTable
[ModuleOutput] DllModuleHost Start: 1 : DataTableDatasetHandler::HandleArgumentString
[ModuleOutput] DllModuleHost Stop: 1 : DataTableDatasetHandler::HandleArgumentString. Duration: 00:00:00.3674436
[ModuleOutput] DllModuleHost Stop: 1 : ParameterArgumentBinder::InitializeParameterValues. Duration: 00:00:01.5928818
[ModuleOutput] DllModuleHost Verbose: 1 : Begin invoking method ScoreGeneric ...
[ModuleOutput] LearnerDetails
[ModuleOutput]
[ModuleOutput] {
[ModuleOutput] "InputName":Trained model
[ModuleOutput] "LearnerKind":Microsoft.Analytics.Modules.Gemini.Dll.MulticlassGeminiDecisionJungleClassifier
[ModuleOutput] }
[ModuleOutput] InputDataStructure
[ModuleOutput]
[ModuleOutput] {
[ModuleOutput] "InputName":Dataset
[ModuleOutput] "Rows":1578
[ModuleOutput] "Cols":217
[ModuleOutput] "ColumnTypes":System.Double,193,System.Nullable`1[System.Double],23,System.Int32,1
[ModuleOutput] }
Module finished after a runtime of 00:00:13.5754381 with exit code 255
Record Ends at UTC 04/29/2015 15:27:05.
URL:
https://studio.azureml.net/Home/ViewWorkspace/ffac4490b5e448fa8778ceadc74a0b97?#Workspaces/Experiments/Experiment/ffac4490b5e448fa8778ceadc74a0b97.f-id.976a41a0051c4cda8ad21b0005a64599/ViewExperimentDear Sudarshan:
(1) I am already getting rid of missing values
(2) Currently using Jungles model. I just tried with random forests and got the same result though with a different error message (see below). However with Neural and Logistic regression (multiclass) it works.
Also please note that I reduced the number of features from 250 to just 5 and still getting this issue.
The error message is now different:
Process is terminated due to StackOverflowException.
Record Starts at UTC 04/29/2015 18:12:43:
Run the job:"/dll "Microsoft.Analytics.Modules.ScoreGeneric.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.Analytics.Modules.ScoreGeneric.Dll.ScoreGenericModule;ScoreGeneric" /Output0 "..\..\Scored dataset\Scored dataset.dataset" /learner "..\..\Trained model\Trained model.ilearner" /testData "..\..\Dataset\Dataset.dataset" "
Starting Process 'C:\Resources\directory\870595a63cd0452da2f3767b831099d7.SingleNodeRuntimeCompute.Packages\AFx\6.3\DllModuleHost.exe' with arguments ' /dll "Microsoft.Analytics.Modules.ScoreGeneric.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.Analytics.Modules.ScoreGeneric.Dll.ScoreGenericModule;ScoreGeneric" /Output0 "..\..\Scored dataset\Scored dataset.dataset" /learner "..\..\Trained model\Trained model.ilearner" /testData "..\..\Dataset\Dataset.dataset" '
[ModuleOutput] DllModuleHost Start: 1 : Program::Main
[ModuleOutput] DllModuleHost Start: 1 : DataLabModuleDescriptionParser::ParseModuleDescriptionString
[ModuleOutput] DllModuleHost Stop: 1 : DataLabModuleDescriptionParser::ParseModuleDescriptionString. Duration: 00:00:00.0051111
[ModuleOutput] DllModuleHost Start: 1 : DllModuleMethod::DllModuleMethod
[ModuleOutput] DllModuleHost Stop: 1 : DllModuleMethod::DllModuleMethod. Duration: 00:00:00.0000621
[ModuleOutput] DllModuleHost Start: 1 : DllModuleMethod::Execute
[ModuleOutput] DllModuleHost Start: 1 : DataLabModuleBinder::BindModuleMethod
[ModuleOutput] DllModuleHost Verbose: 1 : moduleMethodDescription Microsoft.Analytics.Modules.ScoreGeneric.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.Analytics.Modules.ScoreGeneric.Dll.ScoreGenericModule;ScoreGeneric
[ModuleOutput] DllModuleHost Verbose: 1 : assemblyFullName Microsoft.Analytics.Modules.ScoreGeneric.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca
[ModuleOutput] DllModuleHost Start: 1 : DataLabModuleBinder::LoadModuleAssembly
[ModuleOutput] DllModuleHost Verbose: 1 : Trying to resolve assembly : Microsoft.Analytics.Modules.ScoreGeneric.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca
[ModuleOutput] DllModuleHost Verbose: 1 : Loaded moduleAssembly Microsoft.Analytics.Modules.ScoreGeneric.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca
[ModuleOutput] DllModuleHost Stop: 1 : DataLabModuleBinder::LoadModuleAssembly. Duration: 00:00:00.0077555
[ModuleOutput] DllModuleHost Verbose: 1 : moduleTypeName Microsoft.Analytics.Modules.ScoreGeneric.Dll.ScoreGenericModule
[ModuleOutput] DllModuleHost Verbose: 1 : moduleMethodName ScoreGeneric
[ModuleOutput] DllModuleHost Information: 1 : Module FriendlyName : Score Model
[ModuleOutput] DllModuleHost Information: 1 : Module Release Status : Release
[ModuleOutput] DllModuleHost Stop: 1 : DataLabModuleBinder::BindModuleMethod. Duration: 00:00:00.0117509
[ModuleOutput] DllModuleHost Start: 1 : ParameterArgumentBinder::InitializeParameterValues
[ModuleOutput] DllModuleHost Verbose: 1 : parameterInfos count = 2
[ModuleOutput] DllModuleHost Verbose: 1 : parameterInfos[0] name = learner , type = Microsoft.Analytics.MachineLearning.ILearner
[ModuleOutput] DllModuleHost Start: 1 : DotNetSerializationHandler::HandleArgumentString
Module finished after a runtime of 00:00:58.7028002 with exit code 255
Record Ends at UTC 04/29/2015 18:13:42.
Thanks -
Hi,
In our company we have a very large application that has thousands of compiled queries, and we've been getting randomly AccessViolation exceptions randomly that crashes our process.
This error happens randomly in several locations, always with the same top stack trace (data and queries are always different). do you know what could be causing this issue? or what we can do to trace the problem?,
I have collected memory dumps of the error to get the stack trace and next are the stack lines that always show at the top of it:
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
System.Delegate.DynamicInvokeImpl(System.Object[])
System.Data.Objects.ELinq.QueryParameterExpression.EvaluateParameter(System.Object[])
System.Data.Objects.ELinq.CompiledELinqQueryState.GetExecutionPlan(System.Nullable`1<System.Data.Objects.MergeOption>)
System.Data.Objects.ObjectQuery`1[[System.__Canon, mscorlib]].GetResults(System.Nullable`1<System.Data.Objects.MergeOption>)
System.Data.Objects.ObjectQuery`1[[System.__Canon, mscorlib]].System.Collections.Generic.IEnumerable<T>.GetEnumerator()
System.Linq.Enumerable.FirstOrDefault[[System.__Canon, mscorlib]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
System.Data.Objects.CompiledQuery.ExecuteQuery[[System.__Canon, mscorlib]](System.Data.Objects.ObjectContext, System.Object[])
System.Data.Objects.CompiledQuery.Invoke[[System.__Canon, mscorlib],[System.Guid, mscorlib],[System.__Canon, mscorlib]](System.__Canon, System.Guid)
The following is the windows version data:
0:222> vertarget
Windows 8 Version 9600 MP (64 procs) Free x64
Product: Server, suite: TerminalServer SingleUserTS
kernel32.dll version: 6.3.9600.16656 (winblue_gdr_pres14.140305-1700)
Machine Name:
Debug session time: Wed Feb 11 14:24:12.000 2015 (UTC - 6:00)
System Uptime: 79 days 11:26:23.395
Process Uptime: 2 days 3:21:31.000
Kernel time: 0 days 0:46:05.000
User time: 0 days 17:09:10.000
.Net version: 4.0.30319.34011
Thanks in advance,
IsraelHi,
try to set the
ProxyCreationEnabled property of dbContext is set to true. -
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. -
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 sideHi 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.
------------------------------------------------------------------------------- -
Unknow error message: Attempted to read or write protected memory. This is
Hi,
I am using 2007B PL08. The following are my coding:
Dim oCompanyService As SAPbobsCOM.CompanyService
Dim oCompanyAdminInfo As SAPbobsCOM.AdminInfo
Pub.User.Company.NameEng=oCompany.CompanyName
I can run the above coding properly yesterday but there is no reason that i got the following message suddenly today
Interop.SAPbobsCOM:Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
1. I try to re-boot the machine
2. I try to connect the program to another testing database
3. I try to re-install the DIAPI
I did all the above steps but the message still coming out. Anyone can help??
Regards,
AnnaI have experienced this same error, and also found that reinstalling the DIAPI or deleting the temporary folder did not work.
However, I was eventually able to fix the problem by removing removing the reference to the DIAPI from my .NET project, removing the associated Interop file, and adding the reference again, thereby forcing .NET to re-create the COM wrapper. This fixed the problem, and I suspect that my code was calling a method that, although it existed in the Interop file, did not map correctly to the actual DIAPI COM object that was installed on the machine.
Hope this helps someone - I know I was happy to find a solution to this very frustrating problem! -
"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@Sanderson1) 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 -
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 jobThanks 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 PMThe 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 -
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.
~JasonHi 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
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 followed by Load Report Failed
After running OK for some time ASP.NET web application (VS 2008 .NET 3.5 with Crystal Reports included) running on MS WIN 2003 R2, SP2) will throw error when trying to create PDF crystal report. Error reads as follow:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt. - at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Close() at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.InternalClose(Boolean bSetupForNextReport, Boolean bAutoClose) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Dispose(Boolean bDisposeManaged) at System.ComponentModel.Component.Dispose() at CrystalDecisions.CrystalReports.Engine.ReportDocument.InternalClose(Boolean bSetupForNextReport) at CrystalDecisions.CrystalReports.Engine.ReportDocument.Close()
After that every consecutive attempt to create another PDF crystal report will fail with fallowing error:
Load report failed. - at ... at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Once Application pool is recycled, error goes away but comes back after while. It seems that recently the uptime is getting shorter.
Anyone had similar experience, posible solution?
Thanks in advance,
MiroHi Miro,
Clean Temp folder of that machine.
For testing export report to PDF format from designer do you face any issue?
Try to export the report with following line of code :
CrystalDecisions.CrystalReports.Engine.ReportDocument boReportDocument;
CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument reportClientDoc;
boReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
boReportDocument.Load(Server.MapPath("FinalActivityRpt.rpt"));
reportClientDoc = boReportDocument.ReportClientDocument;
boReportDocument.SetDatabaseLogon("sa", "sa");
CrystalReportViewer1.ReportSource = boReportDocument;
ExportOptions exportOptions = new ExportOptions();
exportOptions.ExportFormatType = CrReportExportFormatEnum.crReportExportFormatPDF;
PDFExportFormatOptions pdfOptions = new PDFExportFormatOptions();
pdfOptions.StartPageNumber = 1;
pdfOptions.EndPageNumber = 3;
exportOptions.FormatOptions = pdfOptions;
Response.AddHeader("Content-Disposition", "filename=" + "untiteled" + ".pdf");
Response.ContentType = "application/pdf";
Response.BinaryWrite((Byte[])reportClientDoc.ReportSource.Export(exportOptions, new RequestContext()));
Response.End();
Regards,
Shweta -
Attempted to read or write protected memory, VS2008.
Development Environment
===
Windows XP (32bit)
Visual Studio 2008 Pro; with Crystal Reports 2008 for Visual Studio
TagetCPU: 'x86'
VB.net 3.5
Windows dll
Crystal Reports Runtime SP3 (12.3.0.601)
Deployment Environment
===
Windows XP (32bit)
.net3.5
Crystal Reports Runtime SP3 (12.3.0.601)
We have a dll that prints a batch of reports. There are only three different reports but each is repeatedly printed with different parameters. The first time each report is called it is loaded (myReport.Load) and each table location is set. (myTable.Location = "mydb.dbo.mytable")
A few hundred of these can be printed every day. Approximately once a day we can get the following error:
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
This only happens on the deployment machine. It might be hard to run the Process Manager on the deployment machine as this error varies the time it occurs and seems quite intermittent.
Once all the reports have printed we call a '.close' and '.dispose' on each report.
This error was also happening when we had the runtime 12.0.(SP1).
The error seems to happen mostly at:
myReportDocument.PrintToPrinter(1, False, 0, 0)Hello Simon
A few suggestions.
Get SP4:
SP4
https://smpdl.sap-ag.de/~sapidp/012002523100008782452011E/cr2008sp4.exe
SP4 MSI
https://smpdl.sap-ag.de/~sapidp/012002523100008782532011E/cr2008sp4_redist.zip
SP4 MSM
https://smpdl.sap-ag.de/~sapidp/012002523100008782522011E/cr2008sp4_mm.zip
See if there are any updates for the printer driver.
Try a different printer driver.
See if there are updates for the DB client (e.g.; it may actaully be the DB client eating up the memory).
Check the Event Log for any warnings \ errors.
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]
Maybe you are looking for
-
How to use multiple slideBar in swf
when swf started 2 different audio plays directly at background, I need to control both of them by different audio controle slider bar, it is possible for single only. can any 1 tell me how we can procceed in the same regards Bipin N.
-
Error while executing WDA with PDf form
Hi, when i'm executing WDA with PDF form i'm getting the following error message. i've checked for Reader credential properties from Basis, they say evething is okay. http://help.sap.com/saphelp_nw2004s/helpdata/en/56/f2c94a069f44a785b85748e11f82a0/c
-
Open Items Selection - Error Message 5593
Hi Freinds, While clearing the open items using the T Code F-03, the items are initially selected. However, when the users try to deselect the items using the 'Deselect' option, the system gives the error message "Check Marks were removed" Message No
-
Wow ... How to edit Event Browser Clips in Your Events
Maybe it's just me, but this seems very useful. I recently saw a discusson on the "Open in Timeline" command. There's not a lot of documentation on it, but if you can use it to open an event browser clip in the timeline. The video and audio of the
-
First of all, it wasn't letting me post in the App store section, so this is my best bet. Basically the title says it all I went to download Infinity blade which update its icon upon the release of ios7 to look like this But, Once downloaded it looke