mmscg
April 20th, 2005, 08:20 PM
I get the following run-time error when I run my app:
The instruction at "0x0041256a" referenced memory at "0x04473c38". The memory could not be "read".
Firstly, what does it mean?
Also, any ideas as to how I might resolve this?
wildfrog
April 20th, 2005, 09:20 PM
It means that somewhere in your application there is a snippet of code that attempts to read something (from memory) that it shouldn't read.
It could be anything. Maybe you're trying to read data from a buffer thats not allocated, maybe you're trying to execute a member-function on a non-initialized/deleted object, anything really...
I would suggest that you start your application in "debug mode", and then when the application crashes you can pinpoint the "exact" location of the bug.
Then, when you know where the bug is, examine the variables used.
For instance, if it is a function call:
aObject->aFunction(a, b, c);
Does aObject, a, b and c have meaningful values?
or
byte b = myBuf[x];
Did you remember to allocate memory for 'myBuf', and is x in the range 0 and the size of myBuf - 1?
or if you're using threads. Did you remember to stop it before you went on and freed alt it resources...
But again, it could be anything. Normally you'll see it right away (and think 'arg.. stupid me'), and sometimes you'll be searching for 6 weeks (and think 'arg... stupid M$').
Good luck.
- petter
mmscg
April 20th, 2005, 09:43 PM
Thank you very much for the informative answer...
I will use your suggestion to run app in "debug" mode to see if I can find the offending line.
mmscg
April 21st, 2005, 08:57 PM
Fixed it... thanks again. :D