Discussion:
Crash in urlmon.dll - CInet::ReleaseTransAndBindInfo() - how prevent/handle?
(too old to reply)
Chris Shearer Cooper
2008-08-13 16:37:07 UTC
Permalink
I've got an application running, it creates a few threads, each thread
creates a COM object, each COM object creates some threads, each
thread downloads some web pages. That structure is, unfortunately,
not something I am allowed to make major changes to.

The problem is that every once in a while, it crashes. The latest
crash I got a minidump file from the QA folks, and by enabling the
symbol server in Visual Studio 2005, I was able to find out why.

The crash is in urlmon.dll, in CINet::ReleaseTransAndBindInfo() + 0x21
bytes.
The entire rest of the stack (going up) is
urlmon.dll!CINet::Callback() + 0x47b bytes
wininet.dll!***@12() + 0x1ab03 bytes
wininet.dll!HANDLE_OBJECT::~HANDLE_OBJECT() + 0x12be2 bytes
winnet.dll!HTTP_REQUEST_HANDLE_OBJECT::`scalar destructing
destructor'() + 0xd bytes
wininet.dll!HANDLE_OBJECT::Dereference() + 0x8c6f bytes
wininet.dll!***@4() + 0x21 bytes
wininet.dll!CFsm::RunWorkItem() + 0xc3 bytes
shlwapi.dll!ExecuteWorkItem() + 0x1d bytes
ntdll.dll!***@16() + 0x65 bytes
ntdll.dll!***@12() + 0x1a bytes
ntdll.dll!***@16() + 0x11 bytes
ntdll.dll!***@4() + 0x16ebc bytes
kernel32.dll!***@8() + 0x37 bytes

So I'm guessing this is some thread that I didn't directly create,
that is performing some Internet function for me.

1) Any ideas how to prevent this from happening?
2) Is this a known issue?
3) Any way to catch this when it does happen and not let it crash my
whole program? Or at least have the program die quietly - it has no
GUI, it's a worker program running "in the background", my main
program has the GUI.

Thanks,
Chris
Pat [MSFT]
2008-08-13 18:32:54 UTC
Permalink
The thread below looks like a thread pool thread, that is doing the work
pass to it - an Internet call and is in the process of cleaning up. The
fundamental problem is that WinInet based APIs are not supprted running in a
multi-threaded service. It is tough to tell from a single thread stack but
my guess is that you are running into an issue related to that.

http://support.microsoft.com/kb/238425


The recommended (i.e. safer/supported) method is to use WinHTTP. The APIs
are very similar.


http://msdn.microsoft.com/en-us/library/aa384068(VS.85).aspx



Pat
Post by Chris Shearer Cooper
I've got an application running, it creates a few threads, each thread
creates a COM object, each COM object creates some threads, each
thread downloads some web pages. That structure is, unfortunately,
not something I am allowed to make major changes to.
The problem is that every once in a while, it crashes. The latest
crash I got a minidump file from the QA folks, and by enabling the
symbol server in Visual Studio 2005, I was able to find out why.
The crash is in urlmon.dll, in CINet::ReleaseTransAndBindInfo() + 0x21
bytes.
The entire rest of the stack (going up) is
urlmon.dll!CINet::Callback() + 0x47b bytes
wininet.dll!HANDLE_OBJECT::~HANDLE_OBJECT() + 0x12be2 bytes
winnet.dll!HTTP_REQUEST_HANDLE_OBJECT::`scalar destructing
destructor'() + 0xd bytes
wininet.dll!HANDLE_OBJECT::Dereference() + 0x8c6f bytes
wininet.dll!CFsm::RunWorkItem() + 0xc3 bytes
shlwapi.dll!ExecuteWorkItem() + 0x1d bytes
So I'm guessing this is some thread that I didn't directly create,
that is performing some Internet function for me.
1) Any ideas how to prevent this from happening?
2) Is this a known issue?
3) Any way to catch this when it does happen and not let it crash my
whole program? Or at least have the program die quietly - it has no
GUI, it's a worker program running "in the background", my main
program has the GUI.
Thanks,
Chris
Loading...