Re: Nasty Problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



No globals are defined; there are 2 static mdthods, but other than that no
static variables either. Commenting new code is not simple beause the change
represents the merging of 2 libraries and there are dependancies through out
the main application which is some 50K+ lines of code. Any other thoughts?

"Maksim Libenson" <Maksim.Libenson@xxxxxxxxx> wrote in message
news:1160133300.577170.294230@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

Do you have any global variables defined in your code? That would be
first thing that I will check. Otherwise just comment all new code and
start uncommenting gradually untill you will hit the problem.

Max
http://ceeplusplus.com

S Wheeler wrote:
I have a REALLY nasty problem and could use some expert help.

I have two mixed mode apps. Each uses a mixed mode DLL that exports a
couple
of classes. There is no dll main as it is not needed. This was working
fine
until a couple of days ago when I added some (a lot of) new code to the
dll.
The apps generally do not run at the same time. Every thing compiles and
links OK. But at run time I now immediately get :

The application failed to initialize properly (0xc0000005). Click on OK
to
terminate the application.

I have to click OK twice and then get:

Unhandled exceptionat 0x7c964ed1 (ntdll.dll) in myApp.exe: 0xC0000005:
Access violation.

This occurs very earily in the app loading and I can not even hit a break
point.

I have read all the google stuff about permissions and viruses but I am
sure
that is not the problem here. After exhaustive debugging, I noted that in
one of my GUI apps (the simpler one) I had some MessageBox calls that
would
be called if certain error conditions occured. I was able to determine
that
the presence of these calls was enough to cause the problem - so I
removed
them and that application started working fine. I had already been
suspecting some sort of run time library mismatch and this seems to
confirm
that. I have removed all MessageBox calls in my other app but it still
crash
immediately after starting.

My first question: what libraries would MessageBox require (implicitly
linked) and what might be some other library calls that may be causing
similar problems in my other application. I am using /clr and
Multi-threaded
Debug (/MTd) for the application and /clr and Multi-threaded Debug DLL
(/MDd) for the DLL. This is such a subttle problem, it must be some sort
of
run time mismatch deep under the covers and the error messaages and
posted
articles are missleading at best. Could this be related to the app
Message
Loop?

Kindly Experts, I could use your help!



.



Relevant Pages

  • Re: /MT and /MD
    ... for Multi Threaded Apps) and MSVCRT (MS Visual C++ Run Time DLL). ... To link libs with debug info just add another 'd' at the end of the option: ... Any other libraries are your ...
    (microsoft.public.vc.language)
  • Re: Nasty Problem
    ... There is no dll main as it is not needed. ... The apps generally do not run at the same time. ... I have removed all MessageBox calls in my other app but it still crash ... what libraries would MessageBox require (implicitly ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Visual Basic for Autorun?
    ... > Realistically the point is preventing other coders mucking things up ... This is ok but it requires a bit of effort to keep everything in sync between the apps. ... If you don't use ocxs or dll then all of the code has to be loaded all of the time. ... You can move libraries in and out of the IDE just by simply adding and removing them, you get the best of both worlds. ...
    (microsoft.public.vb.general.discussion)
  • Nasty Problem
    ... Each uses a mixed mode DLL that exports a couple ... There is no dll main as it is not needed. ... The apps generally do not run at the same time. ... I have removed all MessageBox calls in my other app but it still crash ...
    (microsoft.public.dotnet.languages.vc)
  • Re: /MT and /MD
    ... and MSVCRT (MS Visual C++ Run Time DLL). ... between apps - makes your apps smaller!)... ... To link libs with debug info just add another 'd' at the end of the ... Any other libraries are your ...
    (microsoft.public.vc.language)