?
Solved

Error when closing Application

Posted on 2003-03-18
5
Medium Priority
?
141 Views
Last Modified: 2010-05-19
When my application exits I get the following error message

The instruction at "0x5189156b0" referenced memory at "0x5189156b0". The memory could not be "read".
Click on OK to terminate the program.


The error messages title bar reads "MyprogramName - Application Error"

This only happens when I am running the compiled application - not in the IDE. The application appears to be running correctly

Can anybody advise me what is happening
0
Comment
Question by:mutrus
[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
  • 2
  • 2
5 Comments
 
LVL 30

Expert Comment

by:Mayank S
ID: 8164629
Please re-compile fully and then run. What application is it? Does it use any database?

Mayank.
0
 
LVL 5

Accepted Solution

by:
Cimperiali earned 500 total points
ID: 8165098
That error usually rises when something in program interface (methods, events, properties which are public) is not as expected.
I think, if you do not have components (dll, ocx) made by yourself which you compiled forcing preserving binary compatibility even when you should have borken it and reassign references, matter is in some vb library. What may be happened is:
you installed some component with wrong language (ie: servicepack in -say- English Uk while your Vb is -say- English USA, or you installed Mdac_Typ (=ado components) or jet components following Vb language instead of Os language (if different).
Another known matter is with MSComCtl32 libray, which seems to be updated quite by any Microsoft software (from Office to  Explorer).
What I suggest you as first try (if you do not have played with your dll and Ocx) is to download and reinstall latest servicepacks for Os and Visual Studio, minding about language to be matched, and then recompile your project after you've checked references in it to be properly setted to last components you can detatch.

0
 

Author Comment

by:mutrus
ID: 8165735
Yes - I think you may be on to something. I have created my own control that uses another already compiled control. this is the ccrp statusbar ocx. The problem goes away when I remove the statusbar ocx. I will recompile the statusbar control and add it again to my control and let you know how it goes
0
 
LVL 5

Expert Comment

by:Cimperiali
ID: 8166478
You may also try looking for  ccrp sintax as for methods and properties...I guess something may be slightly different somewhere (like say a method returning an integer instead of a variant, or having some more parameters, say added as optional after they released the interface you registered...Solution to this last matter is to askk the ccrp people to rebuild their object, or to download a previous version of it)
0
 

Author Comment

by:mutrus
ID: 8171000
Further research of the ccrp statusbar control reveals that it is still in beta and only for VB5. I am using VB6. Strange that it worked in the IDE but not compiled.

Guess I'll look around for another status bar control that will allow panel backcolor

Thanks for support
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

770 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