Jump to content
Compatible Support Forums
Sign in to follow this  
ancker

"memory cannot be read" error. programmers pleas

Recommended Posts

What i'm doing is writing a program in VB 6 that will call on the API to list the names and positions of all windows/processes running.

The purpose of this is to store positions of windows that way after a change of resolution i can restore each window to it's original position.

 

It all works great and fine in 95 and 98...but when i call on the API in win2k CRASH "Application popup: windows.exe - Application Error : The instruction at "0x00000000" referenced memory at "0x00000000". The memory could not be "read"." and the program closes.

 

Why would this run in 95 and 98 but not 2k? I've tried using the application compatibility programs and none work...Is there a different API for windows2000?

 

please help out

 

Ancker Jade

Share this post


Link to post

I can't tell you exactly why you are getting this message, but of all the Win2k machines I've seen I can say this isn't an uncommon message to get.

If you seach knowledge base for this error message you'll only find one result - if you are using NetFolders and a fix is available from MS.

I've seen this error on user's PC's whilst they are running Say Word 2000.

When browsing the Internet.

I've had it at home when exiting games.

I can't find anything common to the times I've seen it except it has always been under Win2k.

It has never plagued any of the PC's I've worked on, just very occasionally appears.

I'm hoping SP2 sorts it out.

Share this post


Link to post

I wish it were random...

 

It happens on both 2k boxes i've tried on...

 

1 Pro

1 server..

 

odd...

 

Yes let us HOPE SP2 fixes it

 

Ancker

Share this post


Link to post

I get it fairly regularly on my home PC and occaisionaly on my work PC (both Win2k), but I get it a whole shed load on another machine at work which is NT 4 Workstation confused.

Share this post


Link to post

I got this problem because I had a bad ram module. It never showed up while running a 9x OS but as soon as I switched to 2k and later XP the error was constant. I replaced the faulty modeule and everything worked great after.

Share this post


Link to post

It cant be faulty ram. The addressing code is just incorrect. When the instruction sets itself to look at the address for further instructions, it just loops....horribly. The memory could not be "read" because its looping on itself. Wouldnt faulty ram just fail to work, as opposed to giving a addressing error. Monitor the cpu usage at this point and see if it spikes.

Share this post


Link to post

Are you returning any ints in your vb code? If you are change them to longs and see if that helps. I forgot where I read it, but I remember reading something about how since W2K is a 32 bit operating system, it does not handle 16 bit number being returned properly. It tries to read them as a 32 bit number, thus possibly the "memory cannot be read" error.

Share this post


Link to post

I did a find...replace from Integer to Long. No good. Still the error.

 

Ancker

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×