access-violation

System.AccessViolationException when copying data to portable device after installing windows 10 creators update 1703

放肆的年华 提交于 2019-12-22 06:37:08
问题 I am attempting to transfer content to portable device using this code snippet IPortableDeviceValues values = GetRequiredPropertiesForContentType(fileName, parentObjectId); IStream tempStream; uint optimalTransferSizeBytes = 0; content.CreateObjectWithPropertiesAndData( values, out tempStream, ref optimalTransferSizeBytes, null); System.Runtime.InteropServices.ComTypes.IStream targetStream = (System.Runtime.InteropServices.ComTypes.IStream)tempStream; try { using (var sourceStream = new

Allocating more than 4GB memory in a 64 bit system

旧城冷巷雨未停 提交于 2019-12-22 05:04:13
问题 I'm running this code, compiled on 64 bits vc++ 2005, on Windows Server 2008 R2 with 32GB. There is an access violation inside the for loop. #include <iostream> using namespace std; int main(int argc, char* argv[]) { double *x = new double[536870912]; cout << "memory allocated" << endl; for(long int i = 0; i < 536870912; i++) { cout << i << endl; x[i] = 0; } delete [] x; return 0; } So if there is no exception in new double[536870912], why am I getting an access violation when doing an

Allocating more than 4GB memory in a 64 bit system

淺唱寂寞╮ 提交于 2019-12-22 05:04:04
问题 I'm running this code, compiled on 64 bits vc++ 2005, on Windows Server 2008 R2 with 32GB. There is an access violation inside the for loop. #include <iostream> using namespace std; int main(int argc, char* argv[]) { double *x = new double[536870912]; cout << "memory allocated" << endl; for(long int i = 0; i < 536870912; i++) { cout << i << endl; x[i] = 0; } delete [] x; return 0; } So if there is no exception in new double[536870912], why am I getting an access violation when doing an

Weird Access Violation Exception

送分小仙女□ 提交于 2019-12-22 01:57:58
问题 I'm puzzled with an occurance of AccessViolationException . It's quite im possible (see answer) to have a clean reproduction but here goes the general idea: class MyClass { public List<SomeType> MyMethod(List<string> arg) { // BREAKPOINT here // Simple stuff here, nothing fancy, no external libs used } } delegate List<SomeType> MyDelegate(List<string> arg); ... var myObject = new MyClass(); Func<List<string>, List<SomeType>> myFunc = myObject.MyMethod; MyDelegate myDelegate = myObject

Weird Access Violation Exception

我只是一个虾纸丫 提交于 2019-12-22 01:54:06
问题 I'm puzzled with an occurance of AccessViolationException . It's quite im possible (see answer) to have a clean reproduction but here goes the general idea: class MyClass { public List<SomeType> MyMethod(List<string> arg) { // BREAKPOINT here // Simple stuff here, nothing fancy, no external libs used } } delegate List<SomeType> MyDelegate(List<string> arg); ... var myObject = new MyClass(); Func<List<string>, List<SomeType>> myFunc = myObject.MyMethod; MyDelegate myDelegate = myObject

Access violation exception when calling a method

筅森魡賤 提交于 2019-12-21 14:34:42
问题 I've got a strange problem here. Assume that I have a class with some virtual methods. Under a certain circumstances an instance of this class should call one of those methods. Most of the time no problems occur on that stage, but sometimes it turns out that virtual method cannot be called, because the pointer to that method is NULL (as shown in VS), so memory access violation exception occurs. How could that happen? Application is pretty large and complicated, so I don't really know what low

Access violation in native code with hardware accelerated Android MediaCodec decoder

时光总嘲笑我的痴心妄想 提交于 2019-12-21 02:14:06
问题 I aim to use the Android MediaCodec for decoding a video stream, then use the output images for further image processing in native code. Platform: ASUS tf700t android 4.1.1. Test stream: H.264 full HD @ 24 frm/s With the Tegra-3 SoC inside, I am counting on hardware support for the video decoding. Functionally, my application behaves as expected: I indeed can access the decoder images and process them properly. However, I experience a very high decoder cpu load. In following experiments,

Why doesn't *(int*)0=0 cause an access violation?

和自甴很熟 提交于 2019-12-20 16:29:27
问题 For educational purposes, I'm writing a set of methods that cause runtime exceptions in C# to understand what all the exceptions are and what causes them. Right now, I'm tinkering with programs that cause an AccessViolationException . The most obvious way (to me) to do this was to write to a protected memory location, like this: System.Runtime.InteropServices.Marshal.WriteInt32(IntPtr.Zero, 0); Just as I had hoped, this threw an AccessViolationException . I wanted to do it more concisely, so

Help deciphering this Fatal Error (Java)

江枫思渺然 提交于 2019-12-20 05:22:47
问题 A fatal error has been detected by the Java Runtime Environment: EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x762a76d0, pid=4072, tid=2984 JRE version: 6.0_26-b03 Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode, sharing windows-x86 ) Problematic frame: C [ole32.dll+0x376d0] Error Log: http://pastebin.com/zpBst6W1 回答1: Line 3 says your program failed in the AWT-EventQueue-0 thread, also called the event dispatch thread (EDT). The execution stack trace starts in line 111, and builds

Delphi Access Violation when moving button on form

旧街凉风 提交于 2019-12-19 11:54:25
问题 I am trying to move 2 buttons on the form using a while loop checking for the buttons left property, but I have an Access Violation. I am exeting the procedure with CreateThread() The code: procedure AnimButton1(); var ImageCount: integer; var b1, b2: integer; begin try while (b2 <> 187) do begin b2 := frmNotification.btnBuzina2.Left; frmNotification.btnBuzina2.Left := b2 - 1; end; while (b1 <> 256) do begin b1 := frmNotification.btnBuzina.Left; frmNotification.btnBuzina.Left := b1 - 1; end;