An application crashes only under debugging

Hi,
I'm using VC++ 6.0.
 I have a Win32 Application (I will call it "EXE") which is linked with a
Win32 DLL and I don't have the source files of the DLL;
When I execute the EXE by double-clicking on the icon reprsenting it , there
are no problems;
On the contrary, if I try to debug the EXE the program crashes: in fact, the
debugger shows an "Access Violation" error message and informs that an
istruction of the DLL attempts to read a memory location which cannot be
read.
Does someone know a possible cause of this problem?
Thanks.
M



0
1/13/2005 7:59:02 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
644 Views

Similar Articles

[PageSpeed] 10

If the DLL is an MFC DLL (it is not sufficient to just call it a "Win32 DLL"; that doesn't
tell us anything), you would be mixing debug and release environments, never a healthy
situation. An access fault crash would be well within the expected failures to see.

More importantly, you need to look at the call stack, and work back. It is always possible
that the debug version is passing a bogus pointer. Note that in a release version, you
might be passing a legitimate address from an uninitialized variable, but in the debug
version a distinctly bogus pointer will always be passed. You did not state the address of
the access violation, nor give anything useful by which we could begin to give you useful
help.
				joe

On Thu, 13 Jan 2005 08:59:02 +0100, "Micheles"
<NOTVALIDmichele.perozziNOTVALID@virgilio.it> wrote:

>Hi,
>I'm using VC++ 6.0.
> I have a Win32 Application (I will call it "EXE") which is linked with a
>Win32 DLL and I don't have the source files of the DLL;
>When I execute the EXE by double-clicking on the icon reprsenting it , there
>are no problems;
>On the contrary, if I try to debug the EXE the program crashes: in fact, the
>debugger shows an "Access Violation" error message and informs that an
>istruction of the DLL attempts to read a memory location which cannot be
>read.
>Does someone know a possible cause of this problem?
>Thanks.
>M
>
>

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
1/14/2005 9:17:43 PM
Reply:

Similar Artilces:

Clicking one application's buttons from another application
Hello, I'd like to write an application that can click the buttons of another application running on the same machine. All my application knows about the target application is its name, the name of the window containing the buttons, and the name of the buttons. Can someone further my education in this matter in some way. Thanks, Ray Mitchell This is tricky, but possible. I actually do it in a little utility I wrote to move Outlook filters down, since the "Move Down" button doesn't autorepeat and when you have 850 anti-spam filters it becomes a bit unwieldy. What yo...

Pivot Table Memory Issue
Pivot Table Memory Issue - Excel crashes Excel crashes when a save is perform just after a pivot table refresh. Source data for the pivot table is on another worksheet within the same workbook. Data on that page is dragged in from a database. Pivot table has to have a few columns and rows. Data is not saved when saved. No other apps are running and a PC reboot had just been done before opening the workbook. Can any advise be given? -- ---------------------------- Regards, Richard Sterling Senior Software Engineer Tel : +44 (0)1707 392200 ext 4815 Avaya ECS Ltd, United Kingdom mailto:r...

running another application from my application
Hello, I have an MDI application that on a specific case runs a 3rd party application. I use PeekMessage so my application will be drawn corretly while working on the 3rd party app. I want to prevent the user from doing anything in my application while te 3rd party app is running, until the user closes the 3rd party application. Also I want my application to be shown correctly (handle WM_PAINT, WM_DRAW etc.). Currently my application is displayed very well, but the user may do things in my application while the 3rd party app is running. I use the following code (pseuo): BOOL bRetVal = CreateP...

Application exiting with return Code 3 and ExitInstance not called neither destructors
Hey Friends It seems that i have done something very mysterious as my Application is exiting with return Code 3 and ExitInstance is not not called neither destructors. Plz Help "Vikrant_kpr" <bhatia.manish@netsity.com> wrote in message news:f62362ec.0307170549.7af528cf@posting.google.com... > Hey Friends > It seems that i have done something very mysterious as my Application > is exiting with return Code 3 and ExitInstance is not not called > neither access violation? Dear Antonio Mazzeo I have corrected the problem,it was causing due to Splash Screen Compone...

Ideas for a Dept Level Application Support
We have an IT group that supports 50 applications and they wish to capture support time by application during course of the year. During the course of a week, any application or combination of applications can have support requests, so it is different week to week and not predictable. Essentially we are looking to park the time with appropriate application after the work is complete. We are using Project Server 2007 and have investigated the following: 1. Created a Annual Support workplan with a task per application in Project Pro with the IT group added as Enterprise resourc...

Word 2007 Crashing
My Word 2007 keeps crashing. I can use very basic functions (eg 'save') but not the majority of functions (eg 'save as' and almost all editing functions). I can type text, but anything else sends Word into 'not responding' mode, which basically renders the programme useless. I have tried: a) Running office diagnostics (no problem identified) b) Re-installing Office 2007 (same problems persist) Does anyone else have these problems? Any proven resolutions or ideas? Thoughts would be much appreciated MB PS - I have also tried: - More memory ...

Reinstall after hard drive crash?
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I recently had to replace my hard drive, and lost all of the data on it. I still have the product key I used to install office the first time, but I am wondering if I can still use it? Microsoft support is no help (they want me to pay 49$ just to call them!) Thanks In article <59b7379c.-1@webcrossing.caR9absDaxw>, mork@officeformac.com wrote: > I recently had to replace my hard drive, and lost all of the data on it. I > still have the product key I used to install office the first time, but I am > wo...

Help in creating dialog based application
Hi, I am creating a dialog based application which has a main dialog with 3 buttons. 1. Address Book 2. Student List 3. Course List with which i can go to any one of the screens(which is again the dialog). when i click address book button my main dialog should be hidden/closed and i should open the address book dialog which has again some button to navigate back to main dialog/student list/course list. same kind of functionality for other two dialogs(student/course list). i thought of creating all the 3 dialogs as modeless and main dialog as parent but how i will inform the parent window to ...

DLLs being loaded for all applications
I get the following warning at system startup: "Custom dynamic link libraries are being loaded for every application. The system administrator should review the list of libraries to ensure they are related to trusted applications." How do I review the list of libraries and how do I eliminate any that should be removed? ...

Converting Console Application to win32 application
I have created an MFC console application. When I run it from Windows Explorer it opens a dos box and closes the box when it terminates it logic. Is it possible to convert it so it won't open the dos box - just run without any display? If positive, please help me regarding the steps. Thanks Kalish I am not sure if you can compile MFC with a standard win32 application, but if you can, then you can simply change your main to a WinMain, and you will have the result you want. Create a Win32 Project using the Wizard, and selection Windows Application, to see an example. Remove everthing ...

MSMQ ... authenticating application
A number of application stores messages in MSMQ. One of the server application needs to read messages that was created/stored by specific applications not to read all the messages in MSMQ. Is there any workarounds? Thank you Regards Raj "Raj" <Raj@discussions.microsoft.com> wrote in message news:6917708E-88B1-497B-A888-5038ACEA17CE@microsoft.com... >A number of application stores messages in MSMQ. One of the server > application needs to read messages that was created/stored by specific > applications not to read all the messages in MSMQ. > ...

is there a hotel management excel application?
The subject says is all... TIA Martyn Hi Martyn, See response to your thread in Programming. --- Regards, Norman "Cheker" <zoomer@gmail.com> wrote in message news:eNJLsRRqEHA.348@TK2MSFTNGP15.phx.gbl... > The subject says is all... > TIA > Martyn > > > ...

DLL
Is there any way to detect when an application that is calling my dll is about to be destroyed? I need to close several files if the calling application has not done so, therefore I need to detect when the calling application is about to be destroyed and clean up the files and variables I have used in the dll. You need to implement DllMain, the handle your cleanup tasks when you receive a PROCESS_DETACH notification. Check out: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_initialize_non.2d.mfc_dlls.asp "Joe Estock" <jestock@NOSPAMnutexto...

PowerPoint keeps crashing, over and over and over and over
This happens occasionally with presos in a template I use. If it is the preso, how do I determine if it is corrupt, and how do I fix it? Should I paste the stuff into a new presentation? Thaks Which version of PPT d'you use? "MB" <MB@discussions.microsoft.com> a �crit dans le message de news: 867EB35B-3FDD-440B-8B20-24F3408E2B6F@microsoft.com... > This happens occasionally with presos in a template I use. > > If it is the preso, how do I determine if it is corrupt, and how do I fix > it? Should I paste the stuff into a new presentation? > &...

MFC applications and Visual C++'s newer editions
Hello. When it comes to Win32, Visual Studio .NET 2005 Express Edition Beta 2 only allows the creation of console-based applications. What if one wanted to create MFC-based applications and, at the same time, be able to take advantage of the powerful and conforming C++ compiler that comes with the package? I hope that resorting to Visual C++ 6.0 is not the only option. Thank you, -- Ney Andr� de Mello Zunino "Ney Andr� de Mello Zunino" <zunino@inf.ufsc.br> wrote in message news:%23FuRyAcXFHA.584@TK2MSFTNGP15.phx.gbl... > Hello. > > When it comes to Win32, Vi...

Telnet application
Greets, Quick question.... If I was to write a VB6 app for configuring an IP device using Telnet, would it be more advantageous to use the Winsock control, or the INet control for the telnet session ? The device has the telnet server, I just need to write a GUI that uses telnet as a client to communicate with the device, and then present the configuration info in a typical GUI way. TIA, DanS "DanS" <t.h.i.s.n.t.h.a.t@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message news:Xns9CEA5E17494CEthisnthatroadrunnern@216.196.97.131... > Greets, > > Quick...

Hiding application
Hello, How can I hide my application from the user? I don't want him to see it in Task Manager, Task Bar, etc. Regards, Vladimir. "Vladimir" <genisoft@ufacom.ru> wrote in message news:ueUr72idDHA.736@TK2MSFTNGP09.phx.gbl... > Hello, > > How can I hide my application from the user? I don't want him to see it > in > Task Manager, Task Bar, etc. Make it a service. -- -GJC -Software Consultant (Embedded systems and Real Time Controls) -gchanson@mvps.org -Abolish public schools It'll be still visibled, and killable by administrator - li...

Using MABLE logic engine with existing .NET applications.
Using MABLE logic engine with existing .NET applications. MABLE web services provide an interface to MABLE business objects and logic. Let us review some technical details of the MABLE web services. � MABLE utilizes SOAP 1.2 protocol. � MABLE uses AXIS 1.4 as a web service transport. � MABLE support state-full conversations by implementing a conversation session. In this small article we will create a client application that use the MABLE 'Store' application MABLE Web Service client has to maintain a state-full conversation with the MABLE engine. The best way to handle this is...

Excel crash while tring to add a chart
Hi, I have a user (on windows 2000 and excel 2000 sp3) who is trying to create a chart in excel and every time he attempts it excel crashes. The application log entry is: - The application, , generated an application error The error occurred on 01/28/2005 @ 15:53:45.243 The exception generated was c0000005 at address 3003DCC8 (<nosymbols>) For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. When i log in as myself i can create charts perfectly, any ideas where to start? (I have already uninstalled and reinstalled/patched office) Many Tha...

Excel 2008 crashes, generally infuriating
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I have decided to release some anger about Excel 2008 here... <br><br>I often make figures with large datasets. This sorry excuse for a program is a shadow of its former self and I have not yet been able to bend it to my needs. <br><br>Any modification to a figure via the toolbox brings the pinwheel up for minutes at a time. I do not need shadows and gradients on every damned chart. I can depend on the program to crash at least once a day. Btw, my macbook pro has respectable components and c...

Change 1 dialog application to 2 dialogs applications?
Hi, I have made a mfc dialog based application. Now I want to change it to 2 dialogs, one wizzard and one classic, and i want the 2 dialog can call each other. So I change the codes in App::InitInstance() { ..... while (CGlobal::Get()->m_eView!=CGlobal::Quit) { WizzardDlg dlg0; CClassicDialog dlg1; CDialog *pdlg=0; if (CGlobal::Get()->m_eView==CGlobal::Wizzard) { pdlg = &dlg0; } else if (CGlobal::Get()->m_eView==CGlobal::Classic) { pdlg = &dlg1; } m_pMainWnd = pdlg; int nResponse = pdlg->DoModal(); } I found DoModal() only launch the dialog s...

Cannot start SBS Web Applications
2008 SBS Server Migrated from 2003 SBS Server SBS Web Applications will not start, "This website cannot be started. Another web site may be using the same port" Goal: get OWA working without needed to trick IIS This problem has been ongoing since the install of 2008 SBS server. Currently IIS will not automatically start SBS Web Applications due to the Default Web Site and SBS Web Applications using the same HTTPS bindings. The only way I have managed to get them to work is change the bindings to 444, start it, then change it back to 443. This only works until IIS is re...

Spontaneous application exit
We have an MFC dialog based application that has up to 100 threads reading data from different sources over TCP/IP and then storing the data into an oracle database. Database updates are realtively infrequent (maybe once or twice a scond overall). We are having problems with the application just exiting. Sometimes it will run for days, sometimes for just a few hours. The user is definitely not exiting the application. We have try/catch sections around most code and around each thread which isn't getting triggered and we detect memory allocation failures (which aren't happenin...

Access Form event doesn't work and crashes Access
I have a basic form which I have previously discussed. However, after reading further on Access I decided against storing calculated values in my tables so changed the form. The short version, 3 bound fields minutes seconds and hundredths return value to their table. Minutes input mask is 0;;_ and sec & hun 00;;#, as minutes will never be double digits. I had an unbound form field to display final input in a "nice" sports format 0:00:00 (never to be calc or used) just for readability. The format in the unbound field is =Format(([TimeMinutes],"0") &...

Application crashes at start-up
Hi A new framework 3.5 Winform db app that works fine on two pcs, crashes on one particular pc at start-up. The app has application framework enabled and I have assigned a splash form and a main form. The splash form appears for around 20 second but then app crashes with message "<app name> has encountered a problem and need top close..." and wants to send a report to MS. I have trapped the MyApplication_UnhandledException but it does not get triggered as far as I can tell. Older framework 1.1/vs2003 apps work fine on this pc. The only obvious difference I can see...