?
Solved

Instruction at "0x00000001" referenced memory at "0x00000001". The memory could not be "read".

Posted on 2001-07-09
16
Medium Priority
?
2,981 Views
Last Modified: 2008-03-03
This is the error that I get when I try to compile my project.

Instruction at "0x00000001" referenced memory at "0x00000001". The memory could not be "read".

Then when I hit OK, it gives the following additional messagebox.

The instruction at "0x76338dc9" referenced memory at "0x0000009c". The memory could not be "written".

The title of both messages boxes is:
VB6.EXE  - Application Error.

I copied the entire directory to a different location and get the same message.

When I copied the files, I noticed many .OBJ files with the description "Intermediate File" - I imagine that this is what VB was using to build the exe when I tried to compile it.

Points are not an issue - I need help!!
0
Comment
Question by:wileecoy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
  • +4
16 Comments
 
LVL 2

Expert Comment

by:santhoshx
ID: 6267786
Is this problem occurs when you compile the project to exe Are you able to run the application with the option "Start with Full compile" from Run menu.

If VB6 throws exception while building to exe , it is problem with your VB installation. Try reinstalling VB
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6268532
Check your RAM also. To check for, you could try compiling your project in another VB installed system.

yes, OBJ files are created by VB when compiling takes place.

Cheers
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6268926
Do you have plenty of free space on your TEMP drive?

Is there any files with the ReadOnly attributes set?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 8

Expert Comment

by:glass_cookie
ID: 6269128
Try setting your project options to compile using p-code rather than N-code and see if it works or not.

Another method would be to close any VB applications including VB6., go to your temp drive and delete all the VB****.TMp files even if their attributes are read-only (which is usually the case).  Then, run VB and compile the whole thingy.  (This may not help anything at all.)

Could it also be that your vbp file was corrupted somehow?  Create a new vbp (project) file and include all the *.frm and *.bas (and whatever that you've used) files and try running the whole thing again.

The last resort would be to renstall VB6.

That's it!

glass cookie : )
0
 
LVL 3

Expert Comment

by:jrspano
ID: 6269249
i got that a lot on a w2k machine.  I tried everything I could think of to fix it including reinstalling vb. nothing worked.  I finally redid the cpu and it fixed it.  now I am on a different cpu.  I haven't had any of the compile errors, but ever once and a while i get the error when closing a project.
0
 
LVL 4

Author Comment

by:wileecoy
ID: 6269286
I am using w2k.

After posting this message, I created a new project and added all the forms from the old project.  That didn't work.

I will try the other suggestions and see if I get anywhere.

Thanks for the help!
0
 
LVL 4

Author Comment

by:wileecoy
ID: 6269368
Ok - I have completed testing:

None of the following worked -

1. I WAS, yes was able to run the app with - "Start with Full compile"
2. Clear Temp Drive (WinNT\Temp on w2k)
3. Enough memory - I have 256 MG, should be enough.
4. Read-Only files - the only ones were safesource - deleted.
5. I was able to compile other projects.
6. I was NOT able to compile to P-code.

I will try to reinstall VB, however, since I am able to complile other projects, this does not seem real promising.

jrspano - were you able to get it to work on w2k, if so - what exactly did you do?

Thanks again for the help.  This is (was) supposed to go on the market soon (... my ulcer is acting up).
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6269461
Add your forms and modules one after the other compiling between each to find which one gives you problem.
0
 
LVL 3

Expert Comment

by:jrspano
ID: 6269485
I redid the whole cpu from scratch. format drives and redo etc.  the project worked fine after that.  That should tell us that your project is ok.  You should be able to compile it on another cpu for the time being if you need the compiled object right now.
0
 
LVL 4

Author Comment

by:wileecoy
ID: 6269731
emoreau,

I did try doing that, however, I have forms that are dependent on modules and I get compile errors as functions and procedures aren't defined.  So, I wasn't able to specifically identify (without commenting out a LOT of code) if there was one form, module or class that was giving me the problems.

Also - One thing that I didn't consider.  I have McAfee Uninstaller.  Every 30 days it asks me if I want to clean up old temp file, cached internet files... etc.  Well - I did that a couple of days ago.  I usually don't (just been to lazy to reset the option to ask me to "no").  Maybe something happened there.  I am going to see if I can restore that.  A long-shot, but I'll try anything.

Also - I was just creating a new spreadsheet in Excel 2000.  I got a memory address error similar to the one I described above.  May not be VB at all, but may be my w2k or bad memory or hard drive or motherboard or ....

I'll keep posting progress.
0
 
LVL 4

Author Comment

by:wileecoy
ID: 6270494
Well - the McAfee Unistaller didn't work.

I was wondering, if I have the address, isn't there some way that I can identify what would be in that address?

I have c++ and spy++ and all that - isn't there some way to log an error of this type so I can try to hone in on the problem?
0
 
LVL 4

Author Comment

by:wileecoy
ID: 6270815
OK -

All is well.  I have found the problem.

fyi - if you are interested.

First - I re-istalled Visual Studio.  I couldn't figure out why my c++ wasn't allowing me to debug like it usually does.  Well - it allowed me to debug after I re-installed it.

So - I debugged VB6.exe - stepped through all of what looks like cryptic code to me.

I compiled the app and it told me what ocx was having the problem.

I removed the ocx from my application - everything is fine.

Spy++ didn't work, by the way.

So - I am going to split the points up evenly amoung all who responded as each comment was useful.

Please look for a question posted as 'For yourname - Instruction at "0x00000001" referenced memory at "0x00000001". The memory could not be "read".'

Thanks to all for the assistance.
0
 
LVL 3

Expert Comment

by:jrspano
ID: 6270844
what ocx was it?
0
 
LVL 4

Author Comment

by:wileecoy
ID: 6270944
rbutton.ocx - it was a custom control that I downloaded from a vb website.

It was unnecessary, and definately not worth the problem.
0
 
LVL 2

Accepted Solution

by:
Lunchy earned 0 total points
ID: 6271135
0
 
LVL 2

Expert Comment

by:Lunchy
ID: 6271141
wileecoy, I also deleted a duplicate Q for jrspano.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 21 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question