Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C++ Libraries / February 2004

Tip: Looking for answers? Try searching our database.

incompatibilites between run-time dll's?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pete Hodgson @thepete.net> - 03 Feb 2004 02:21 GMT
Hi all

Are there any possible problems if an application is using multiple versions of the shared C++ runtime dlls - e.g. msvcp60.dll, msvcp70d.dll /and/ msvcp71.dll?

The reason I ask is, the app I'm developing suddenly decided yesterday to refuse to start up, throwing up a dialog titled "Microsoft Visual C++ Runtime Library" with the text "Runtime Error!... This application has requested the Runtime to terminate it in an unusual way....". When I try to debug the app it won't even reach a breakpoint set in the constructor of the CWinApp class. The debug output is as follows (abridged

<-------------SNIP----------------------
'Capture.exe': Loaded 'D:\...\Capture\Debug\Capture.exe', Symbols loaded
..
'Capture.exe': Loaded 'D:\...\Capture\Debug\Correspondence.dll', Symbols loaded
..
'Capture.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded
..
..
..
'Capture.exe': Loaded 'D:\...\Capture\msvcp71.dll', No symbols loaded
'Capture.exe': Loaded 'D:\...\Capture\msvcr71.dll', No symbols loaded
'Capture.exe': Loaded 'D:\...\Capture\Debug\Photogram.dll', Symbols loaded
..
..
'Capture.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\glu32.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\mfc70d.dll', Symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\msvcr70d.dll', Symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\oleacc.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\msvcp60.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\msvcp70d.dll', Symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\ifc18.dll', No symbols loaded
..
..
'Capture.exe': Loaded 'C:\WINDOWS\system32\msacm32.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\msvfw32.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\ifcdsp18.dll', No symbols loaded
..
'Capture.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded
'Capture.exe': Loaded 'D:\Program Files\ObjectDock\DockShellHook.dll', No symbols loaded
'Capture.exe': Loaded 'C:\WINDOWS\system32\msctf.dll', No symbols loaded
First-chance exception at 0x77123c2d in Capture.exe: 0xC0000005: Access violation reading location 0x0000000c
First-chance exception at 0x77123c2d in Capture.exe: 0xC0000005: Access violation reading location 0x0000000c
First-chance exception at 0x77123c2d in Capture.exe: 0xC0000005: Access violation reading location 0x0000000c
First-chance exception at 0x77123c2d in Capture.exe: 0xC0000005: Access violation reading location 0x0000000c
First-chance exception at 0x77123c2d in Capture.exe: 0xC0000005: Access violation reading location 0x0000000c
First-chance exception at 0x77123c2d in Capture.exe: 0xC0000005: Access violation reading location 0x0000000c
First-chance exception at 0x77123c2d in Capture.exe: 0xC0000005: Access violation reading location 0x0000000c
<-------------------------------------SNIP-------------------------------

Now I have /no/ idea why this has suddenly started happening. The only hint I can find on MSDN is a vague warning about running both msvcrt.dll and msvcr71.dll (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt
_c_run.2d.time_libraries.asp

.

/Any/ advise that anyone can offer would be greatly appreciated

TIA

Pete
Mihajlo Cvetanovic - 04 Feb 2004 10:18 GMT
Pete Hodgson @thepete.net>
> Are there any possible problems if an application is using multiple
> versions of the shared C++ runtime dlls - e.g. msvcp60.dll,
> msvcp70d.dll /and/ msvcp71.dll?

I think there most certainly are...

> The reason I ask is, the app I'm developing suddenly decided
> yesterday to refuse to start up, throwing up a dialog titled
[quoted text clipped - 3 lines]
> even reach a breakpoint set in the constructor of the CWinApp
> class. The debug output is as follows (abridged)

What's changed in the project to cause this behavior?
Pete Hodgson - 04 Feb 2004 10:58 GMT
> Pete Hodgson @thepete.net>
>
[quoted text clipped - 13 lines]
>
> What's changed in the project to cause this behavior?

I have no idea! I know it sounds ridiculous, but as far as I know
nothing has changed that has anything to do with this.

I've been doing some more research into this, and something very strange
is going on. I'm going to post details in a seperate message.
Rajeev - 19 Feb 2004 18:19 GMT
I have a similar problem. Batch job generating Crystal reports causes
AVs on msvcrt.dll on random reports.
"Access violation at address 7801012B in module 'msvcrt.dll'"
I am using Crystal Reports 8.5 with a VCL 8.5 on Delphi 5.0  
Both dev and production PCs are W2K with SP 4.0

Any feedback would be much appreciated.
Thanks!

> > Pete Hodgson @thepete.net>
> >
[quoted text clipped - 19 lines]
> I've been doing some more research into this, and something very strange
> is going on. I'm going to post details in a seperate message.
Pete Hodgson - 04 Feb 2004 11:14 GMT
Ok, now this is getting really wierd.

It turns out that the reason things aren't working is that msvcr71.dll
is trying to access some Fiber APIs in Kernel32.dll. The procedures it's
trying to access (FlsAlloc, FlsFree, FlsGetValue, FlsSetValue) are ONLY
available in Windows Server 2003[1]. Is that really bizarre, or is it
just me?

So I guess either I need to get a 2003 Server version of Kernel32.dll,
or a fixed version of msvcr71.dll, or.... what?

Please, can anyone give me a clue as to what is going on here. Have I
unearthed a bug in the new C runtime?

Oh, and I'm running VS .NET 2002, and .NET 1.1 SDK. The copy of
msvcr71.dll is version 7.10.3052.4, and included with .NET framework
v1.1.4322.

Please, can anyone give me a clue as to what is going on here. Have I
unearthed a bug in the new C runtime?

Cheers,

Pete

[1]
Windows Server 2003: Discover Improved System Info, New Kernel,
Debugging, Security, and UI APIs
[http://msdn.microsoft.com/msdnmag/issues/03/06/WindowsServer2003/default.aspx]
Search in the page for 'Fiber APIs'.
Mihajlo Cvetanovic - 04 Feb 2004 16:14 GMT
> It turns out that the reason things aren't working is that msvcr71.dll
> is trying to access some Fiber APIs in Kernel32.dll. The procedures it's
> trying to access (FlsAlloc, FlsFree, FlsGetValue, FlsSetValue) are ONLY
> available in Windows Server 2003[1]. Is that really bizarre, or is it
> just me?

Maybe this internal code is protected with exception handling and you
don't really need to worry about it (that is, the problem is somewhere
else)?

Do you have old backups of your project? Try to back trace the changes
(both in source files and project settings) and find the last good
version of your project.

Try to create dummy project and compare your project options with
dummy project options. Or copy all files in new project and recompile.

> Oh, and I'm running VS .NET 2002, and .NET 1.1 SDK. The copy of
> msvcr71.dll is version 7.10.3052.4, and included with .NET framework
> v1.1.4322.

Sometimes the problems vanish when the order of directories is changed
in Tools > Options in section Projects > VC++ Directories, especially
under items Include files and Library files. SDK directories should be
first.
Pete Hodgson - 04 Feb 2004 18:05 GMT
First off, thanks a lot for your help Mihajlo.

> Try to create dummy project and compare your project options with dummy
> project options. Or copy all files in new project and recompile.

I created a 10 line (literally) Win32 Console app, which indirectly uses
msvcr71.dll and I'm still getting the same issues. Pretty much the
entirety of this app is:

<-----------------------------SNIP------------------------------->
#include "stdafx.h"
#include <LEDA\ugraph.h>
int _tmain(int argc, _TCHAR* argv[])
{
    printf( "Hello World" );
    leda::graph testGraph();

    return 0;
}
<-----------------------------SNIP------------------------------->

The problem seems to stem from the LEDA library which I'm linking into
my app as a DLL. It's leda.dll which is dependent on msvcr71.dll, and
therefore indirectly (I guess) is the root of the problem. Is it
possible that it is in fact leda.dll that's attempting to access these
Fiber APIs? I assumed that it wasn't LEDA, because of the following
output from Dependency Walker:

<-----------------------------SNIP------------------------------->
00:00:00.781: GetProcAddress(0x77E60000 [KERNEL32.DLL], "FlsAlloc")
called from "MSVCR71.DLL" at address 0x7C341950 and returned NULL by
thread 1. Error: The specified procedure could not be found (127).
00:00:00.781: GetProcAddress(0x77E60000 [KERNEL32.DLL], "FlsGetValue")
called from "MSVCR71.DLL" at address 0x7C34195D and returned NULL by
thread 1. Error: The specified procedure could not be found (127).
00:00:00.781: GetProcAddress(0x77E60000 [KERNEL32.DLL], "FlsSetValue")
called from "MSVCR71.DLL" at address 0x7C34196A and returned NULL by
thread 1. Error: The specified procedure could not be found (127).
00:00:00.781: GetProcAddress(0x77E60000 [KERNEL32.DLL], "FlsFree")
called from "MSVCR71.DLL" at address 0x7C341977 and returned NULL by
thread 1. Error: The specified procedure could not be found (127).
<-----------------------------SNIP------------------------------->

DLLs and linking are not topics I know much about, but I assumed that if
LEDA.dll was the problem then it'd be LEDA.dll that called
GetProcAddress(), rather than msvcr71.dll. But then again, the more I
look into this the more it looks like an issue with LEDA.

I've been in contact with the LEDA developers and they say that they
don't support applications compiled in VS.NET 2002. Is it possible that
this is the cause of this problem?

Sorry to be so full of questions, I'm learning here!

>> Oh, and I'm running VS .NET 2002, and .NET 1.1 SDK. The copy of
>> msvcr71.dll is version 7.10.3052.4, and included with .NET framework
[quoted text clipped - 4 lines]
> under items Include files and Library files. SDK directories should be
> first.
Mihajlo Cvetanovic - 05 Feb 2004 09:32 GMT
> I've been in contact with the LEDA developers and they say that they
> don't support applications compiled in VS.NET 2002. Is it possible that
> this is the cause of this problem?

It sounds like you're on to something here. I would bother them a
little bit more with questions like "why they don't support it", "will
they support it in near future", and "do they know someone who's using
their library with VS2002". If you get a generally negative response,
well you better purchase VS2003 (or some other LEDA alike library
which does support VS2002). As a side note, VS2003 is considered as a
significant improvement worth its price...
Pete Hodgson - 05 Feb 2004 18:40 GMT
>> I've been in contact with the LEDA developers and they say that they
>> don't support applications compiled in VS.NET 2002. Is it possible
[quoted text clipped - 7 lines]
> support VS2002). As a side note, VS2003 is considered as a significant
> improvement worth its price...

Yeah, these were my thoughts too. Unfortunately they are politely saying
"2002 ain't supported, it won't be in the future, why don't you just get
2003?". They also say that they arn't doing anything with the Fiber
APIs, so who knows what's going on there.

Unfortunately, I missed the September 2003 deadline for a cheap upgrade,
so now I'm looking at a /lot/ of money for VS.NET 2003. Ah well.

Thanks for all your help Mihajlo.

Pete
Mihajlo Cvetanovic - 06 Feb 2004 09:45 GMT
> 2003?". They also say that they arn't doing anything with the Fiber
> APIs, so who knows what's going on there.

Ah, maybe you should compile your code with somebody else's 2003, JIC.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.