I am running a program that takes several iterations to compute some results.
The iterations occur in a seperate function that returns some points that are
then plotted. If my number of iterations is limited (for ex. <100), the vgui
properly displays the returned points. However, if the number of iterations
is too much, when I call:
which will then refresh the screen, drawing my item, I get the following
The instruction at "0x004b8591" referenced memory at "0x8c9440e2". The memory
could not be "read". Click on OK to terminate. Click on CANCEL to debug the
When I attempt to debug the program, I get the error (using Visual Studio .Net
2003 debugger), where main.exe is the name of my program:
"Unhandled exception at 0x004b8591 in main.exe: 0xC0000005: Access violation
reading location 0x8c9440e2."
When I attempt to break, it points to the file, "vgui_tableau.cxx" and the
++ const_cast... line:
//: Increase the reference count by one (for smart-pointers).
void vgui_tableau::ref() const
++ const_cast<int &>(references);
Can anyone please help, this problem is presisting, and its not with my
function, as I can save the returned coordinate values, however, when I try to
display them, or do anything with the gui (ie. even move my mouse over the
gui), it gives me that error.
I am not sure if some location in memory is being overwritten or if there is
some other cause.