delphi,constructor,control,access-violation
Do not assign Parent of control in your constructor (or in any part inside your control code). Setting parent inside control itself interferes with the way VCL framework works in both design and run-time. Instead you can override SetParent method, and do your initialization there. procedure SetParent(AParent: TWinControl); override; procedure...
c++,memory,cuda,access-violation,heap-memory
Problem was solved by installing CUDA 7.0 release.
c++,access-violation,callstack,exception-code
It's the offset in bytes from the start of the MintDIB constructor. Primary suspects for causing the crash: calling an uninitialised or corrupted function pointer or calling a virtual member function in an uninitialised or corrupted object....
delphi,access-violation,c-strings
StrPas(PAnsiChar('x')); I posit that 'x' is treated as a character literal rather than a string literal. And so the cast is not valid. If so then this will work as you would expect StrPas('x'); due to an implicit conversion. Or StrPas(PAnsiChar(AnsiString('x'))); thanks to the explicit conversion. I think the former...
assembly,x86,access-violation,masm,cpu-registers
Not sure what you are doing, but since it looks like you want dereference a mem address, you must use addr for local vars to get/pass that address. main PROC LOCAL thesize:DWORD mov thesize, 3 ; INVOKE compare, thesize, thesize ; same as: ; push 3 ; push 3 ;...
vb.net,visual-studio,access-violation,memory-corruption,protected-resource
The error was due to a Windows Update. Because it does not show any errors on non-updated Windows 7. The error only appears after updating Windows 7 It was difficult to find which update was the reason for the issue. The solution was to install Windows 7 and Visual Studio...
c#,asp.net,.net,iis,access-violation
It is atypical to have these types of access violation errors from managed code. They come from memory corruption which can indicate faulty hardware - in extremely rare cases this indicates a bug in the CLR itself. The most likely cause of this type of error comes from elsewhere, e.g....
c++,class,object,access-violation
The code you posted compiles, links (once the missing destructor is defined), and runs without any problems. I see nothing wrong with the portion of the code you posted. Your problem lies in the parts of the class that you left out. Based on the names of the other class...
c++,multithreading,access-violation,glfw
The variable being pointed to was dying before it could be used. So, when the thread tried to use it, it threw a runtime error.
c++,opengl,access-violation,gldrawarrays
I suspect your problem is due to the size of GLsizeiptr. This is the data type used to represent sizes in OpenGL buffer objects, and it is typically 32-bit. 700 million vertices * 4-bytes per-component * 3-components = 8,400,000,000 bytes There is a serious issue with trying to allocate that...
c++,exception,memory,c++11,access-violation
Multiple things : Don't call a destructor by yourself unless used with a placement new. By the C++ Standard, this can't be equal to nullptr. If it is, you have more serious problems. delete already calls the destructor automatically. delete can be passed a nullptr without problem. Your destructor should...
c++,arrays,pointers,access-violation
for (int i = 0; i < (new_size < size) ? new_size : size; i++) should read for (int i = 0; (i < (new_size < size)) ? new_size : size; i++) So, for (int i = 0; i < ((new_size < size) ? new_size : size); i++) should correct...
.net,windbg,access-violation,il,memory-dump
This is not exactly an answer yet, but too long for a comment. In the order of appearance: "when the windows error reporting dialog was open." Taking a crash dump while Windows Error Reporting is already working with the process does not work very well. Instead, run the application using...
c,debugging,winapi,access-violation
If I paste your code into an editor line 75 is the UpdateWindow call. In that case it is a bad sign that hwnd1 is 0. The UpdateWindow call needs a valid window handle (ShowWindow as well by the way). You need to figure out why the CreateWindowW call is...
c++,exception,visual-studio-2013,access-violation,sdl-2
You are calling windowSurface = SDL_GetWindowSurface(window); before window = SDL_CreateWindow("Pong", SDL_WINDOWPOS_CENTERED, so window will still be NULL, causing windowSurface to be NULL, causing windowSurface->format to cause a crash....
c,windows,multithreading,access-violation,release-mode
Wrong sized allocation I find this line to be highly suspicious: buffer->buffer = (uint64_t *)calloc(buffer->size, sizeof(unsigned int)); If buffer->buffer is an array of uint64_t, why are you using sizeof(unsigned int) to allocate it? I don't know if that is your problem, but it's at least one thing that should be...
c,exception,access-violation,memory-access
This leads to disaster: extern LS_Led** LS_vol_leds; You should try this instead: extern LS_Led *LS_vol_leds[]; If you really want to know why, you should read Expert C Programming - Deep C Secrets, by Peter Van Der Linden (amazing book!), especially chapter 4, but the quick answer is that this is...
scene->mMeshes[0]->mTextureCoords[i][0]; is first texture coordinates for set i. What you wanted is to get first set of texture coordinates - so it should be scene->mMeshes[0]->mTextureCoords[0][i];
c++,string,dll,access-violation
This is wrong: std::string buffer(szDestination, sizeof(szDestination)); szDestination is a pointer, thus sizeof(szDestination) will return the pointer size, in bytes, not the number of characters. If szDestination is a null terminated string, use strlen or similar function to determine the number of characters. If it isn't null terminated, then you need...
c++,windows,visual-c++,audio,access-violation
Your code as posted does not crash, not even without unregistering the callback. Checked by copy-pasting what you have and adding what you didn't. The IUnknown methods are missing, but pretty unlikely to have anything to do with it. Just make sure that your Release() function doesn't get called too...
The scanf family requires you to supply a pointer to the value you want populated: if ((sscanf(input, "%lf", &grade)) == 1) // problem is no longer on this line The way you have it, you set grade to zero then use that as the pointer. The relevant part of the...
delphi,button,access-violation
I am executing the procedure with CreateThread(). That is your problem. VCL code must only be called from the main UI thread. Use TThread.Synchronize to invoke the VCL code on the main thread. That said, a timer might be a more appropriate solution to you problem than a thread....
Per Raymond Chen's blog at http://blogs.msdn.com/b/oldnewthing/archive/2011/02/02/10123392.aspx It's quite possible that I/O hasn't completed after a call to CancelIO and you are breaking the cardinal rule stated in the blog. Namely, "the OVERLAPPED structure must remain valid until I/O completes". Try adding WaitForSingleObject(eventObject, 0xFFFFFFFF) (or whatever const you use for INFINITE)...
wcf,com,garbage-collection,access-violation,clarion
OK. Looks like I'm on it. It's the bloody hidden singleton objects or, rather, a runtime library of the platform the COM is written on (SoftVelocity Clarion). It got deallocated for some reason when the startup COM got killed, probably because the reference count went down and it was time...
c#,zip,clipboard,access-violation
After searching for quite a while I finally found the problem thanks to this helpful comment. As it turns out the FILEGROUPDESCRIPTORA and FILEGROUPDESCRIPTORW declarations in the original code we used are wrong which can cause an AccessViolation Exception in some cases. So I did change the declarations like the...
exception-handling,access-violation,google-text-to-speech
For this moment I've to solve it to use this code: string textToRead = new TextRange(rtbTextEditor.Document.ContentStart,rtbTextEditor.Document.ContentEnd).Text.Trim(); if (textToRead.Length < 100) { try { wbbWebBrowser.Navigate("http://translate.google.com/translate_tts?tl=nl&q=" + textToRead); } catch (AccessViolationException ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); } else { MessageBox.Show("The text is to long to read by the Google voice", "Warning",...
If this is the line the code breaks: this->name = new char[strlen(name) + 1]; then name must be a null pointer, since nothing else is being dereferenced. name is being dereferenced inside the strlen function. Just print the variable value in your debugger and you will be sure. Also, using...
Found the answer myself. Accidentally deleted the guiElement.
c#,exception,try-catch,sybase,access-violation
ExecuteNonQuery() can throw an AccessViolationException if an underlying driver crashes in native mode. Starting with the .NET Framework 4, managed code no longer catches these types of exceptions in catch blocks. You can read more about this here. The solution is to either set the <legacyCorruptedStateExceptionsPolicy> element's enabled attribute to...
c,visual-studio,malloc,access-violation
The array index is not indexing bytes but array elements, in your case ints: int *address = &(pointer_to_allocated_memory)[i]; valid values for i are 0 and 1...
delphi,c++builder,access-violation,teechart,docking
Like David said, the question is answered for now. I think any new updates on this issue will be seen at QC. https://quality.embarcadero.com/i#browse/RSP-11239...
If Format('%s', [SelectedItem.History.OperationOn.TargetStr]) leads to an access violation inside Format then the only reasonable conclusion to draw is that SelectedItem.History.OperationOn.TargetStr is invalid. So, perhaps SelectedItem.History.OperationOn are all valid, but TargetStr is invalid. That's perhaps not so likely because I presume that TargetStr is a string and you have to work...
Foo1 something(int size){ Foo1 obj(size); return obj; } You create a object obj and return it. Lets check your copy constructor whether it takes care of copying the data: Foo1(const Foo1& foo): array(foo.array), size(foo.size){} That's a shallow copy: the array's contents aren't copied, instead, both the temporary object and Foo1...
c++,winapi,visual-studio-2008,access-violation,writefile
The documentation for lpNumberOfBytesWritten says: This parameter can be NULL only when the lpOverlapped parameter is not NULL. In other words, the lpNumberOfBytesWritten parameter is only optional when you are using overlapped IO. You are passing NULL for lpOverlapped, and therefore not using overlapped IO, the lpNumberOfBytesWritten is not optional...
visual-c++,access-violation,argv
argv is a pointer to the first element of an array containing argc+1 elements. The first argc elements of this array contain pointers to first elements of null terminated strings representing the arguments given to the program by the environment (commonly the first of these strings is the name of...
You did not initialize GLEW. Without doing that all the entry points provided by GLEW (which is everything beyond OpenGL-1.1) are left uninitialized and calling them crashes your program. Add if( GLEW_OK != glewInit() ) { return 1; } while( GL_NO_ERROR != glGetError() ); /* glewInit may cause some OpenGL...
delphi,listbox,delphi-xe2,access-violation
You have a memory leak, as you are not freeing the TPngImage objects you create. But worse, you should NOT be loading image files during a drawing operation to begin with. You should instead load the images once beforehand and then reuse them each time an item need to be...
c#,opencv,access-violation,opencvsharp
I reported a bug at github. It seems to be fixed by now, but I can't test it atm. https://github.com/shimat/opencvsharp/issues/106...
c++,arrays,directx,access-violation,directx-11
The access violation exception comes when you are trying to access a location of memory which is not allocated by your program. I looked at your project and found that in function InitDevice you are allocating an array and assigning it to pieces vertices line no 747 pieces[counter].vertices = new...
delphi,access-violation,tadoquery
The AV only (and always) appears when debugging, it does never appear if I execute the application directly through its ".exe". .... The insert works after all the AVs appeared on the screen. I just want to understand why am I getting this error when everything looks fine. The...