473,414 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

A VC2005 bug report

PLS
I don't know where else to report bugs, so maybe someone from Microsoft
is reading this group

Application crashed on a library thread. The stack is below (most recent
at top).

I think is a *REALLY* bad idea for the function that is used to report
memory allocation errors to allocate memory.

++PLS

msvcr80d.dll!__malloc_dbg() + 0x1f bytes
msvcr80d.dll!__calloc_dbg() + 0x96 bytes
msvcr80d.dll!__getptd_noexit() + 0x3d bytes
msvcr80d.dll!__errno() + 0x9 bytes
msvcr80d.dll!__VCrtDbgReportA() + 0x1bb bytes
msvcr80d.dll!__CrtDbgReportV() + 0x20 bytes
msvcr80d.dll!__CrtDbgReport() + 0x29 bytes
msvcr80d.dll!__CrtCheckMemory() + 0x2bb bytes
msvcr80d.dll!__heap_alloc_dbg() + 0x6d bytes
msvcr80d.dll!__nh_malloc_dbg() + 0x19 bytes
msvcr80d.dll!__malloc_dbg() + 0x1f bytes
msvcr80d.dll!__calloc_dbg() + 0x96 bytes
msvcr80d.dll!__getptd_noexit() + 0x3d bytes
msvcr80d.dll!__errno() + 0x9 bytes
msvcr80d.dll!__VCrtDbgReportA() + 0x1bb bytes
msvcr80d.dll!__CrtDbgReportV() + 0x20 bytes
msvcr80d.dll!__CrtDbgReport() + 0x29 bytes
msvcr80d.dll!__CrtCheckMemory() + 0x2bb bytes
msvcr80d.dll!__heap_alloc_dbg() + 0x6d bytes
msvcr80d.dll!__nh_malloc_dbg() + 0x19 bytes
msvcr80d.dll!__malloc_dbg() + 0x1f bytes
msvcr80d.dll!__calloc_dbg() + 0x96 bytes
msvcr80d.dll!__getptd_noexit() + 0x3d bytes
msvcr80d.dll!__errno() + 0x9 bytes
msvcr80d.dll!__VCrtDbgReportA() + 0x1bb bytes
msvcr80d.dll!__CrtDbgReportV() + 0x20 bytes
msvcr80d.dll!__CrtDbgReport() + 0x29 bytes
msvcr80d.dll!__CrtCheckMemory() + 0x2bb bytes
msvcr80d.dll!__heap_alloc_dbg() + 0x6d bytes
msvcr80d.dll!__nh_malloc_dbg() + 0x19 bytes
msvcr80d.dll!__malloc_dbg() + 0x1f bytes
msvcr80d.dll!__calloc_dbg() + 0x96 bytes
msvcr80d.dll!__getptd_noexit() + 0x3d bytes
msvcr80d.dll!__errno() + 0x9 bytes
msvcr80d.dll!__VCrtDbgReportA() + 0x1bb bytes
msvcr80d.dll!__CrtDbgReportV() + 0x20 bytes
msvcr80d.dll!__CrtDbgReport() + 0x29 bytes
msvcr80d.dll!__CrtCheckMemory() + 0x2bb bytes
msvcr80d.dll!__heap_alloc_dbg() + 0x6d bytes
msvcr80d.dll!__nh_malloc_dbg() + 0x19 bytes
msvcr80d.dll!__malloc_dbg() + 0x1f bytes
msvcr80d.dll!__calloc_dbg() + 0x96 bytes
msvcr80d.dll!__getptd_noexit() + 0x3d bytes
msvcr80d.dll!__errno() + 0x9 bytes
msvcr80d.dll!__VCrtDbgReportA() + 0x1bb bytes
msvcr80d.dll!__CrtDbgReportV() + 0x20 bytes
msvcr80d.dll!__CrtDbgReport() + 0x29 bytes
msvcr80d.dll!__CrtCheckMemory() + 0x2bb bytes
msvcr80d.dll!__heap_alloc_dbg() + 0x6d bytes
msvcr80d.dll!__nh_malloc_dbg() + 0x19 bytes
msvcr80d.dll!__malloc_dbg() + 0x1f bytes
msvcr80d.dll!__calloc_dbg() + 0x96 bytes
msvcr80d.dll!__getptd_noexit() + 0x3d bytes
msvcr80d.dll!__errno() + 0x9 bytes
msvcr80d.dll!__VCrtDbgReportA() + 0x1bb bytes
msvcr80d.dll!__CrtDbgReportV() + 0x20 bytes
msvcr80d.dll!__CrtDbgReport() + 0x29 bytes
msvcr80d.dll!__CrtCheckMemory() + 0x2bb bytes
msvcr80d.dll!__heap_alloc_dbg() + 0x6d bytes
msvcr80d.dll!__nh_malloc_dbg() + 0x19 bytes
msvcr80d.dll!__malloc_dbg() + 0x1f bytes
msvcr80d.dll!__calloc_dbg() + 0x96 bytes
msvcr80d.dll!__getptd_noexit() + 0x3d bytes
msvcr80d.dll!__errno() + 0x9 bytes
msvcr80d.dll!__VCrtDbgReportA() + 0x1bb bytes
msvcr80d.dll!__CrtDbgReportV() + 0x20 bytes
msvcr80d.dll!__CrtDbgReport() + 0x29 bytes
msvcr80d.dll!__CrtCheckMemory() + 0x2bb bytes
msvcr80d.dll!__heap_alloc_dbg() + 0x6d bytes
msvcr80d.dll!__nh_malloc_dbg() + 0x19 bytes
msvcr80d.dll!__malloc_dbg() + 0x1f bytes
msvcr80d.dll!__calloc_dbg() + 0x96 bytes
msvcr80d.dll!__getptd_noexit() + 0x3d bytes
msvcr80d.dll!__errno() + 0x9 bytes
msvcr80d.dll!__VCrtDbgReportA() + 0x1bb bytes
msvcr80d.dll!__CrtDbgReportV() + 0x20 bytes
msvcr80d.dll!__CrtDbgReport() + 0x29 bytes
msvcr80d.dll!__CrtCheckMemory() + 0x2bb bytes
msvcr80d.dll!__heap_alloc_dbg() + 0x6d bytes
msvcr80d.dll!__nh_malloc_dbg() + 0x19 bytes
msvcr80d.dll!__malloc_dbg() + 0x1f bytes
> msvcr80d.dll!__calloc_dbg() + 0x96 bytes
msvcr80d.dll!__getptd_noexit() + 0x3d bytes
msvcr80d.dll!__errno() + 0x9 bytes
msvcr80d.dll!__VCrtDbgReportA() + 0x1bb bytes
msvcr80d.dll!__CrtDbgReportV() + 0x20 bytes
msvcr80d.dll!__CrtDbgReport() + 0x29 bytes
msvcr80d.dll!__CrtCheckMemory() + 0x2bb bytes
msvcr80d.dll!__free_dbg_nolock() + 0x22 bytes
msvcr80d.dll!__free_dbg() + 0x4e bytes
msvcr80d.dll!__freefls@4() + 0x1cf bytes
msvcr80d.dll!__freeptd() + 0x5d bytes
msvcr80d.dll!__CRTDLL_INIT@12() + 0x3c9 bytes
msvcr80d.dll!__CRTDLL_INIT@12() + 0x1f bytes
ntdll.dll!_LdrpCallInitRoutine@16() + 0x14 bytes
ntdll.dll!_LdrShutdownThread@0() + 0xed bytes
kernel32.dll!_ExitThread@4() + 0x3e bytes
kernel32.dll!_FreeLibraryAndExitThread@8() + 0x1d bytes
ole32.dll!CRpcThreadCache::RpcWorkerThreadEntry() + 0x34 bytes
kernel32.dll!_BaseThreadStart@8() + 0x37 bytes
Mar 14 '07 #1
12 2259

"PLS" <no****@nowhere.comwrote in message
news:MP************************@msnews.microsoft.c om...
>I don't know where else to report bugs, so maybe someone from Microsoft
is reading this group

Application crashed on a library thread. The stack is below (most recent
at top).

I think is a *REALLY* bad idea for the function that is used to report
memory allocation errors to allocate memory.

++PLS
<snip>

Here's how to report your issue:

http://msdn2.microsoft.com/en-us/lib...he(VS.80).aspx
Mar 14 '07 #2
"PLS" <no****@nowhere.comwrote in message
news:MP************************@msnews.microsoft.c om...
>I don't know where else to report bugs, so maybe someone from Microsoft
is reading this group
http://connect.microsoft.com/feedback?SiteID=210
>
Application crashed on a library thread. The stack is below (most recent
at top).

I think is a *REALLY* bad idea for the function that is used to report
memory allocation errors to allocate memory.
That is annoying (and then some), isn't it?

It's odd that __getptd_noexit is allocating memory. To me, that suggests
that it's running in a thread that wasn't created with _beginthread{ex}.

Are you linking with the static runtime library, by chance? (If you're
linking with the DLL runtime library, you don't need to worrk about using
_beginthread, but using the static runtime, you do).

-cd
Mar 14 '07 #3
Hi Carl!
It's odd that __getptd_noexit is allocating memory. To me, that suggests
that it's running in a thread that wasn't created with _beginthread{ex}.
From the callstack it lloks like a thread has exited and the DLL-CRT
now tries to free the thread-local-memory (__freeptd).
This is fine...

Now the problem is that the CRT wants to output the memory-leaks with
"__CrtDbgReport".
And now some of those functions tries to set the "errno" which is stored
in TLS, which was previously freed ;-)
And now it allocated again memory for this TLS... therefor it calls
__getptd_noexit.

;-)))

Nice Bug!

Greetings
Jochen
Mar 14 '07 #4

"Jochen Kalmbach [MVP]" <no********************@holzma.dewrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi Carl!
>It's odd that __getptd_noexit is allocating memory. To me, that suggests
that it's running in a thread that wasn't created with _beginthread{ex}.

From the callstack it lloks like a thread has exited and the DLL-CRT now
tries to free the thread-local-memory (__freeptd).
This is fine...
Ah yes - I didn't look far enough down the stack!
>
Now the problem is that the CRT wants to output the memory-leaks with
"__CrtDbgReport".
And now some of those functions tries to set the "errno" which is stored
in TLS, which was previously freed ;-)
And now it allocated again memory for this TLS... therefor it calls
__getptd_noexit.

;-)))

Nice Bug!
Indeed!

-cd
Mar 14 '07 #5
PLS
No, linking with the DLLs. My setting is /MDd. I have set flags to check
memory on each alloc/free and to report leaks on exit.

The thread this error occurs on is not from my program. Mine is single
threaded. It is, however, a COM server and I know from experience that
COM creates extra threads.

++PLS

In article <#K**************@TK2MSFTNGP02.phx.gbl>,
cp*****************************@mvps.org.nospam says...
"PLS" <no****@nowhere.comwrote in message
news:MP************************@msnews.microsoft.c om...
I don't know where else to report bugs, so maybe someone from Microsoft
is reading this group

http://connect.microsoft.com/feedback?SiteID=210

Application crashed on a library thread. The stack is below (most recent
at top).

I think is a *REALLY* bad idea for the function that is used to report
memory allocation errors to allocate memory.

That is annoying (and then some), isn't it?

It's odd that __getptd_noexit is allocating memory. To me, that suggests
that it's running in a thread that wasn't created with _beginthread{ex}.

Are you linking with the static runtime library, by chance? (If you're
linking with the DLL runtime library, you don't need to worrk about using
_beginthread, but using the static runtime, you do).

-cd
Mar 16 '07 #6

"PLS" <no****@nowhere.comwrote in message
news:MP************************@msnews.microsoft.c om...
No, linking with the DLLs. My setting is /MDd. I have set flags to check
memory on each alloc/free and to report leaks on exit.

The thread this error occurs on is not from my program. Mine is single
threaded. It is, however, a COM server and I know from experience that
COM creates extra threads.
Well the CRT got loaded on that thread somehow, probably by DllMain, but
possibly by some of your code calling CRT functions. COM doesn't link to
the CRT, doesn't use CRT allocators, and definitely not the debug version.
Mar 16 '07 #7
Ben Voigt schrieb:
"PLS" <no****@nowhere.comwrote in message
news:MP************************@msnews.microsoft.c om...
>>No, linking with the DLLs. My setting is /MDd. I have set flags to check
memory on each alloc/free and to report leaks on exit.

The thread this error occurs on is not from my program. Mine is single
threaded. It is, however, a COM server and I know from experience that
COM creates extra threads.


Well the CRT got loaded on that thread somehow, probably by DllMain, but
possibly by some of your code calling CRT functions. COM doesn't link to
the CRT, doesn't use CRT allocators, and definitely not the debug version.


--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Mar 17 '07 #8
Hi Ben!
>>The thread this error occurs on is not from my program. Mine is single
threaded. It is, however, a COM server and I know from experience that
COM creates extra threads.

Well the CRT got loaded on that thread somehow, probably by DllMain, but
possibly by some of your code calling CRT functions. COM doesn't link to
the CRT, doesn't use CRT allocators, and definitely not the debug version.
The CRT always initialises the TLS for *each* thread which was created
and calling DllMain with THREAD_ATTACH.

So every COM thread will trigger the CRT and allocate the TLS for this
thread (even if it is not used). Therefor every COM thread uses the CRT
if the app (or any DLL in the app) are using the DLL version of the DLL.
And if you use severay different CRT DLLs, every single CRT version will
be triggered and will allocate TLS storage.
(For example your app uses msvcrt80, one dll uses msvcrt71 an other
msvcrt70 and an other msvcrt; now you have 4 different CRTs and each
will allocate TLS for each COM thread which never uses the CRT ;) )

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Mar 17 '07 #9
So every COM thread will trigger the CRT and allocate the TLS for this
thread (even if it is not used). Therefor every COM thread uses the CRT if
the app (or any DLL in the app) are using the DLL version of the DLL.
And if you use severay different CRT DLLs, every single CRT version will
be triggered and will allocate TLS storage.
(For example your app uses msvcrt80, one dll uses msvcrt71 an other
msvcrt70 and an other msvcrt; now you have 4 different CRTs and each will
allocate TLS for each COM thread which never uses the CRT ;) )
That's certainly true when linking the CRT dynamically, it has a chance to
initialize on every thread in the process.
--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/

Mar 18 '07 #10
PLS
I enter this bug on Microsoft Connect. The response from Micrsoft is
that it isn't worth fixing.

++PLS

In article <#I**************@TK2MSFTNGP05.phx.gbl>,
cp*****************************@mvps.org.nospam says...
>
"Jochen Kalmbach [MVP]" <no********************@holzma.dewrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi Carl!
It's odd that __getptd_noexit is allocating memory. To me, that suggests
that it's running in a thread that wasn't created with _beginthread{ex}.
From the callstack it lloks like a thread has exited and the DLL-CRT now
tries to free the thread-local-memory (__freeptd).
This is fine...

Ah yes - I didn't look far enough down the stack!

Now the problem is that the CRT wants to output the memory-leaks with
"__CrtDbgReport".
And now some of those functions tries to set the "errno" which is stored
in TLS, which was previously freed ;-)
And now it allocated again memory for this TLS... therefor it calls
__getptd_noexit.

;-)))

Nice Bug!

Indeed!

-cd
Mar 20 '07 #11
PLS wrote:
I enter this bug on Microsoft Connect. The response from Micrsoft is
that it isn't worth fixing.
If you could post a link to the bug report on Connect, other people can vote
on it.

If your bug was closed as "won't fix", that means that it won't be fixed in
Orcas (the next release of VS), but that doesn't mean that it won't be fixed
ever- especially if more people validate it/vote on it.

-cd
Mar 20 '07 #12
PLS
Sure. The link is

http://connect.microsoft.com/VisualS...Feedback.aspx?
FeedbackID=263647

++PLS

In article <Ob**************@TK2MSFTNGP04.phx.gbl>,
cp*****************************@mvps.org.nospam says...
If you could post a link to the bug report on Connect, other people can vote
on it.

-cd
Mar 20 '07 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: indiana | last post by:
Thanks in advance. I have a vc6 dll that is currently called by a vc6 exe and want to call it from a vc2005 dll. The vc6 exe using the following header extern "C" __declspec(dllimport) int...
2
by: adebaene | last post by:
Hello all, I just checked that the following did compile with VC2005 b2, and I think it shouldn't: template <typename T> struct A { typedef int Foo; };
2
by: ClydeL | last post by:
Compling a legacy VC6.0 program with the VC2005 compiler used mfc80 dlls. Do these get installed with the .NET runtime or do they need to be installed separately.
2
by: adebaene | last post by:
Hello group, There seems to be a bug int the interop layer in VC2005 when dealing with certain pointer types (or values?) Here is a repro case using Boost version 1.32 and C++/CLI : using...
7
by: Yuanfei | last post by:
Hi There, I just found that there is a problem in vc2005 regarding to time_t and localtime. See code snippets belows. Using this code segment, I found that when ut is 86200, the corresponding...
2
by: kittymaguire | last post by:
When I tried to use the IAxWinHostWindow interface in a MFC project I get the following An assert in CComTypeInfoHolder::GetTI(LCID lcid) at ATLASSUME(!InlineIsEqualGUID(*m_plibid, GUID_NULL)...
0
by: =?GB2312?B?zPC5zw==?= | last post by:
Howdy, This problem have puzzled me for a long time. I usually use python2.5 in Windows, while VC2005 is installed. However python25.lib is compiled by VC2003. When I use disutil to build some C...
0
by: Christian Heimes | last post by:
甜瓜 schrieb: It's possible but ill-advised. The free mingw32 compiler can build Python extensions just fine. I'm using it all the time to build Python 2.5 extensions for Windows. In the...
1
by: Yoavo | last post by:
Hi, I have the following code: class AA { public int Width { get; set; } } this compiles ok on VC2008 but fails in VC2005. What is the reason and how can I build it ok in VC2005 ?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.