How about getting a Dr. Watson dump and looking at the stack when it crashes. This might help determine what is causing the problem. Or turn on the system crash dump. I don't know if the dump file is only created on a BSOD, or if a "normal" crash/reboot would also cause a memory dump to be created.
Thank you, David Barnish Senior Software Engineer Research And Development -----Original Message----- From: G�ran Backlund [mailto:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 10:51 PM To: winpcap-list Subject: [WinPcap-users] NPF crashes under strange circumstances Hello I'm writing a windows service using the ATL. I'm using packet.dll for reception (3.1 Beta 3). I experienced some crashes, and after a while I narrowed it down to this: The only thing the app does right now is creating a XMLDOMDocument object MSXML2::IXMLDOMDocumentPtr docInput = NULL; HRESULT res = docInput.CreateInstance(__uuidof(DOMDocument40)); and then call PacketOpenAdapter for two different adapters LPADAPTER lpAdapter1, lpAdapter2; lpAdapter1 = PacketOpenAdapter("\\Device\\NPF_{5DFB42C9-8B6E-46AF-A422-93125BFA132B}"); lpAdapter2 = PacketOpenAdapter("\\Device\\NPF_{FFB5C62D-7865-41BB-BC0A-3EFD2A6A175B}"); It then enters a infinite loop while(true); So far so good.... If a then fire up the taskmanager and kill the process, THE COMPUTER REBOOTS. No BSOD no nothing, just instantly reboots. This doesn't happen If I remove call to docInput.CreateInstanceXML. If I start the application in the debugger everything looks perfectly ok (createInstance returns OK, packetOpenAdapter returns a LPADAPTER object) and I can exit the application without crash. It only krashes when I kill it in the taskmanager. Curios to see what happens on earlier versions of winpcap, I installed winpcap 3.0 Using this version the reboots doesn't appear. I can kill the app from the taskmanager without any problems. So, I installed 3.1 Beta which also worked fine... ... I moved on to 3.1 Beta 2 and suddenly the reboots appeared again. So, something has changed between beta 1 and beta 2. I now tested different combinations between npf.sys and packet.dll and found out the following: Beta2 NPF, Beta 1 packet.dll : this combination works fine. Beta2 packet.dll, Beta2 NPF : this combination crashes when app is killed. Beta 1 NPF, Beta 2 packet.dll: this combination crashes when app is killed. Beta 1 driver, beta 1 packet.dll: this combination works fine. My conclusion: Since beta 2 seems to work using beta 1 packet.dll, one might suspect that a bug has been born in beta 2 packet.dll, which causes the NPF driver to reboot under these circumstances. The strange this is that it all depends on wheater a create the com-object or not. And it only crashes when app is killed, which would suggest that a app is killed in a different way if a COM-instance has been created. Any thoughts? Best regards, G�ran ====================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/[EMAIL PROTECTED]/ To unsubscribe use mailto: [EMAIL PROTECTED] ====================== ================================================================= This is the WinPcap users list. It is archived at http://www.mail-archive.com/[EMAIL PROTECTED]/ To unsubscribe use mailto: [EMAIL PROTECTED] =================================================================
