Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

incompatibilites between run-time dll's?

14 views
Skip to first unread message

@thepete.net > <msdn_ng<NO_SPAM_PURLEASE>

unread,
Feb 2, 2004, 9:21:08 PM2/2/04
to
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

Pete Hodgson

unread,
Feb 3, 2004, 4:46:09 PM2/3/04
to
I now have some more details on the problem, in case it's any help. I used Dependency Walker (http://www.dependencywalker.com/) to profile my app as it starts up - here's an extract of the output:

<-------------------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).
00:00:00.781: GetProcAddress(0x77E60000 [KERNEL32.DLL],
...
...
<-------------------SNIP---------------------------->

So it seems that the C Runtime dll is trying to call some of the fibre threading routines in Kernel32.dll, but can't. This is really confusing me now. Is it possible that my Kernel32.dll has been corrupted somehow?

Any ideas anyone?

TIA,

Pete

Mihajlo Cvetanovic

unread,
Feb 4, 2004, 5:18:07 AM2/4/04
to
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
> "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)

What's changed in the project to cause this behavior?

Pete Hodgson

unread,
Feb 4, 2004, 5:58:08 AM2/4/04
to

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.

Pete Hodgson

unread,
Feb 4, 2004, 6:14:31 AM2/4/04
to
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

unread,
Feb 4, 2004, 11:14:28 AM2/4/04
to
Pete Hodgson wrote:
> 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

unread,
Feb 4, 2004, 1:05:31 PM2/4/04
to
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!

Mihajlo Cvetanovic

unread,
Feb 5, 2004, 4:32:31 AM2/5/04
to
Pete Hodgson wrote:
> 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

unread,
Feb 5, 2004, 1:40:16 PM2/5/04
to

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

unread,
Feb 6, 2004, 4:45:10 AM2/6/04
to
Pete Hodgson wrote:
> 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.

Rajeev

unread,
Feb 19, 2004, 1:19:28 PM2/19/04
to
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 <msdn_ng@REMOVE_CAPSthepeteFROB.net> wrote in message news:<OiGnG3w6...@TK2MSFTNGP10.phx.gbl>...

0 new messages