PDA

View Full Version : Memory could not be read? (runtime) [solved]



DrDonut
27th February 2009, 08:47
Hi all,

So, I've just compiled a new version of a program that I've written earlier and that used to work just fine.

In this new version however, I've changed a lot of stuff.

It compiles just fine, the only warnings I get are "/* withing comment", so nothing critical.

When I try to run the program, I get the following error:
"The instruction at "0x6a340388" referenced memory at "0x00000001". The memory could not be "read". Click Ok to terminate the program, click cancel to debug the program."

Do you know what I did wrong?

The code is not too complex, it's just one window, no multiple threads, no file access whatsoever.

Here some info:
QT: 4.4.3
compiling: commandline
OS: Microsoft Windows XP Professional SP2

Thanks in advance

DrDonut

^NyAw^
27th February 2009, 09:21
Hi,

Compile it as debug and debug it. You will see where is the problem.
We can't tell you where is the problem without the code.
A memory access error refers to a bad pointer access.

DrDonut
27th February 2009, 10:15
Hi, ^NyAw^

Thank you for your reply, and for pointing out that it probably had to do something with pointers, you where right.

Thing was that I tried to add widgets to a grid but had not used the line:

grid = new QGridLayout;

And I also found a connect statement for a timer that didn't exist.

Thanks for your help!

DrDonut