access-violation

Pinning a DLL in memory (increase reference count)

放肆的年华 提交于 2019-12-10 19:07:22
问题 I am trying to run an application, but the application exits due to an access violation. Running the application in the debugger I can see that this is caused by an unloaded library. I can not wait for the next release of the application, so I'm trying to workaround the problem. I wonder whether WinDbg provides a way of increasing the reference count of a loaded module, similar to the C++ LoadLibrary() call. I could then break on module loads and increase the reference count on the affected

delphi timer ticks faster than timer service interrupt routine

落爺英雄遲暮 提交于 2019-12-10 15:51:29
问题 Hi I have been asked to maintain a Delphi 5 based program for someone, and the program is using a timer object to tick every 50 milli-seconds and upon each time-up it runs the block of single threaded code. I am just wondering, what would happen if the time taken to execute this block of code is longer than the timer tick interval, would this be bad? For example could it cause problems like access violation? How does Delphi handle this kind of situation by default? Thanks a lot. 回答1: The

Attempted to read or write protected memory in a .NET application

天涯浪子 提交于 2019-12-10 13:35:50
问题 I'm having troubles at implementing and ASP .Net Application in IIS 6 Server. When the user tries to open a web page that access the database, iis server throws "Attempted to read or write protected memory" this is the StackTrace: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at Oracle.DataAccess.Client.OpsPrm.ResetValCtx(OpoPrmValCtx* pOpoPrmValCtx, Int32 ctxSize) at Oracle.DataAccess.Client

C++/CLI noob: System.AccessViolationException

耗尽温柔 提交于 2019-12-10 10:57:55
问题 I'm trying to put together a "cool demo" for a career day at my daughter's jr. high in 5 days and so I'm trying to use the echoprint library to perform over the air (OTA) audio recognition. I've never really gone much farther than "hello world" in C++ and I am trying to use C++/CLI to wrap the echoprint codegen library so I can call it from C#. Here's my header file: // echoprint-cli.h #pragma once #include "Codegen.h"; using namespace System; namespace echoprintcli { public ref class

0xC0000005: Access violation executing location 0x00000000. (OpenGL)

寵の児 提交于 2019-12-10 10:38:45
问题 I have looked at several other questions on stack about this and it mentions de-referencing null pointers but I don't understand if that applies to my code. The code crashes at line 33 in the World.cpp when trying to generate a VAO: glGenVertexArrays(1, &vao); giving me the error shown in the title. If I comment out that line the program runs fine. PhaseEngineMain.cpp #include "PhaseEngineMain.h" #include "PhaseEngineController.h" int main(int argc, char *argv[]) { PhaseEngineController

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

十年热恋 提交于 2019-12-10 03:43:45
问题 I really do not understand how is this error happening at this code. Please check the code yourself void dispatcherTimer_Tick(object sender, EventArgs e) { string srUrl = lstLocalIndex[irLocalIndex] + lstMainIndex[irMainIndex].Replace("0;",""); Task.Factory.StartNew(() => { startNewWindow(srUrl); }); } void startNewWindow(string srUrl) { NewWindowThread<TitleWindow, string>(c => new TitleWindow(c), srUrl); } Now this code is where the error happening. I will also attach screenshot private

Writefile causes crash, with access violation

假如想象 提交于 2019-12-10 02:51:56
问题 So basically I wish to write a byte array to a file, however the program crashes. Unhandled exception at 0x7766DEE1 (KernelBase.dll) in append.exe: 0xC0000005: Access violation writing location 0x00000000. BYTE *image ; BYTE *bigMem; #define REASONABLY_LARGE_BUFFER 16777216 file = CreateFile(fileName, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); fileSize = GetFileSize(file, NULL); bigMem = (BYTE *)HeapCreate(NULL, REASONABLY_LARGE_BUFFER, 0); image =

Occasional access violation in FastMM4, DebugGetMem

允我心安 提交于 2019-12-10 02:39:52
问题 I'm trying to track down an access violation. Reproducibility seems non-deterministic, and rare, so I want to check a few of my assumptions before I go any further. The access violation is raised in FastMM4, version 4.991, in the function DebugGetMem , in the following code: if (ASize > (MaximumMediumBlockSize - BlockHeaderSize - FullDebugBlockOverhead)) or CheckFreeBlockUnmodified(Result, GetAvailableSpaceInBlock(Result) + BlockHeaderSize, boGetMem) then begin {Set the allocation call stack}

Catching access violations on Windows

与世无争的帅哥 提交于 2019-12-08 21:57:37
问题 I am trying to catch all unhandled exceptions in my application so I can save a log file when they occurr. This is a 64-bit Windows application compiled using Visual Studio 2013, written in C++. For testing I am using the default C++ Win32 project generated by VS. I am catching all exceptions by registering a handler using SetUnhandledExceptionFilter. This works fine for /most/ cases, but not all. All throw()-n exceptions are caught, and most hardware exceptions like floating point or access

AccessViolationException when accessing a mustoverride property in a class library

隐身守侯 提交于 2019-12-08 16:37:29
问题 This is a little complex, but I'll try and explain clearly. I have a class library for common code components; and I tried to make some common ConfigurationHandler base classes, to simplify creating custom configuration sections, collections and elements. What I've ended up with is: The ConfigurationSectionBase class is generic, taking TConfElementCollection As {ConfigurationElementCollection, New} as a type constraint. This ConfigurationSectionBase class contains a Public MustOverride