access-violation

Sporadic Access Violation after porting from D2006 to XE5, doesn't happen in XP compatibility mode

青春壹個敷衍的年華 提交于 2020-06-27 18:03:57
问题 We have a large application that works fine in Delphi 2006. We've moved it to XE5 and are experiencing frequent sporadic Access Violations. We're using VCL forms and a number of DevExpress and other third party components. We're working in Windows 7 Professional with Delphi XE Enterprise, Version 19.0.14356.6604. We've looked on line, here and elsewhere, for postings about A/Vs after porting to XE5 but haven't found anything that seems relevant to our problem. Here's what we know about the A

Windows Common Item Dialog: ctypes + COM access violation

前提是你 提交于 2020-06-24 12:12:55
问题 I am trying to use the ctypes module to make calls to Windows' Common Item Dialog API. The code shown below is roughly based on the steps outlined in the MSDN documentation. Its only dependency is the comtypes.GUID module. import ctypes from ctypes import byref, POINTER, c_int, c_long from ctypes.wintypes import HWND, HRESULT from comtypes import GUID CLSID_FileOpenDialog = '{DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7}' IID_IFileDialog = '{42F85136-DB7E-439C-85F1-E4075D135FC8}' #IID_IFileOpenDialog

Windows Common Item Dialog: ctypes + COM access violation

你离开我真会死。 提交于 2020-06-24 12:08:02
问题 I am trying to use the ctypes module to make calls to Windows' Common Item Dialog API. The code shown below is roughly based on the steps outlined in the MSDN documentation. Its only dependency is the comtypes.GUID module. import ctypes from ctypes import byref, POINTER, c_int, c_long from ctypes.wintypes import HWND, HRESULT from comtypes import GUID CLSID_FileOpenDialog = '{DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7}' IID_IFileDialog = '{42F85136-DB7E-439C-85F1-E4075D135FC8}' #IID_IFileOpenDialog

System.AccessViolationException error when stored callback is executed

孤街浪徒 提交于 2020-05-17 06:49:13
问题 I have passed as callback a C++ member function to a C# project through a C++/CLI wrapper (this works fine). The C# project is going to call this delegate when receiving data from another .exe process: an event will be raised and a method will call this callback. So, I needed to "save" this Action delegate using an static instance of a C# class already created. I got the following code: // C++ unmanaged function WRAPPER_API void dispatchEvent(std::function<void(int)> processEvent) { Iface:

System.AccessViolationException error when stored callback is executed

你说的曾经没有我的故事 提交于 2020-05-17 06:49:05
问题 I have passed as callback a C++ member function to a C# project through a C++/CLI wrapper (this works fine). The C# project is going to call this delegate when receiving data from another .exe process: an event will be raised and a method will call this callback. So, I needed to "save" this Action delegate using an static instance of a C# class already created. I got the following code: // C++ unmanaged function WRAPPER_API void dispatchEvent(std::function<void(int)> processEvent) { Iface:

AccessViolationException when PInvoking C++ DLL (cdecl calling convention problem?) [closed]

…衆ロ難τιáo~ 提交于 2020-05-14 18:17:12
问题 Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I've spent all day researching this, and I'm none the wiser: I have a C# DLL which PInvokes a method in a C++ DLL. I have had no problems doing this when compiling in Debug mode, but when compiling in Release mode I get an AccessViolationException. Googling this problem tells me

AccessViolationException when PInvoking C++ DLL (cdecl calling convention problem?) [closed]

泄露秘密 提交于 2020-05-14 18:15:24
问题 Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I've spent all day researching this, and I'm none the wiser: I have a C# DLL which PInvokes a method in a C++ DLL. I have had no problems doing this when compiling in Debug mode, but when compiling in Release mode I get an AccessViolationException. Googling this problem tells me

Is using the `Marshal` static class in otherwise normal C# code unwise?

血红的双手。 提交于 2020-03-10 04:40:48
问题 I have a whole sequence of interlinked questions. I would like to know answers for all of them independantly, so *yes*, some of them appear to be X-Y questions; but I do want to know the solution to them anyway!. See end of question for list of other questions in this set. For reasons that aren't relevant to this specific question I've ended up in an event handler, triggered by a catch block in some library code. I want to know why my EventHandler triggered, but I don't seem to get told that

Expression illegal in evaluator (& Access Violation)

流过昼夜 提交于 2020-02-16 13:20:15
问题 Im trying to process a plain text file (loaded into a StringList), by using class Tbb2uc but getting AV at calling function GetAddress. TArrayQuotePositions = array[1..4] of integer; Tbb2uc = class(TObject) private Farrayquotes: TArrayQuotePositions; SlInput: TStringList; Inputfilename: TFileName; SlOutput: TStringList; function GetQuotePositions( aLine: string ): TArrayQuotePositions; function GetInvoice( aLine: string ): string; function GetName( aLine: string ): string; function GetAddress

Access violation writing location 0xfdfdfdfd

£可爱£侵袭症+ 提交于 2020-01-30 13:29:46
问题 I have been having this problem for a few days now and I can find nothing on how to fix it. I have never had an error like this one : Unhandled exception at 0x00511e0e (msvcr100d.dll) in myproject.exe: 0xC0000005: Access violation writing location 0xfdfdfdfd. I really am at a loss of what to do. Any help? 回答1: 0xfdfdfdfd is a magic value in the MSVC debug heap implementation (details here) that's put as a canary directly before and behind an allocated region of storage. Somehow you're using