Skip navigation
This discussion is archived

Bonjour client for Windows version 2.0.2 is crashing and outputting heap corruption messages.

886 Views 0 Replies Latest reply: Jan 31, 2013 12:40 PM by wp416 RSS
wp416 Calculating status...
Currently Being Moderated
Jan 31, 2013 12:40 PM

The bonjour client on Windows is shipped as Bonjour Print Services for windows, and consists of two services, one printing specific, and one a general

bonjour zeroconf "mdnssd"  implementation.

 

Since there is no other standard Windows implementation of zeroconf/bonjour on Windows, some third party software vendors including RemObjects Software, that supports zeroconf discovery, uses the Bonjour Client for Windows dll (dnssd.dll) in order to provide zeroconf service discovery features.

 

I am using this RemObjects software, and I am finding that when I run inside any debug environment, that at DLL unload time, the dnssd.dll is reporting heap corruption.  What I am confused by is that such heap corruption checks are even being done.  (It seems like maybe Apple's developers shipped a debug build instead of a release build?)

 

here is the message I'm seeing:

 

HEAP: Free Heap block 028E12C0 modified at 028E12F0 after it was freed

 

There is also an INT3 (breakpoint) happening, which would cause the application to crash out (if not inside a debugger) or stop (if run inside a debuggger).

This is happening on Windows 8, which might be the underlying issue. There may be some problem in using the currently shipping Bonjour Print Services for Windows which were released in the year 2010, supporting Windows 7, Vista, and XP, when run on Windows 8.

 

Here is the output if I run in the Visual Studio Debugger, and capture the output, which seems to indicate that there is a race condition between a blocking background thread, and the DLL unloading in the main thread:

 

The thread 'Win32 Thread' (0x16dc) has exited with code 0 (0x0).

dnssd_clientstub read_all(464) failed -1/28 10038 An operation was attempted on something that is not a socket.The thread 'Win32 Thread' (0x245c) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0x130c) has exited with code 0 (0x0).

First-chance exception at 0x74b64b32 in Server.exe: 0x0EEDFADE: 0xeedfade.

First-chance exception at 0x74b64b32 in Server.exe: 0x0000071A: The remote procedure call was cancelled.

The thread 'Win32 Thread' (0x1d98) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xfe4) has exited with code 0 (0x0).

'Server.exe': Unloaded 'C:\Windows\SysWOW64\dnssd.dll'

'Server.exe': Unloaded 'C:\Windows\SysWOW64\FWPUCLNT.DLL'

'Server.exe': Unloaded 'C:\Windows\SysWOW64\wtsapi32.dll'

 

I also see indications of heap corruption like this:

 

HEAP: Free Heap block 036712C0 modified at 036712F0 after it was freed

 

Usually one or the other happens, and so, I suspect that we are dealing with a race condition in the code. I am unable to reproduce this on Windows 7, but it always reproduces on Windows 8.

 

I can provide a small client and server EXE that are simply "demos" of using dnssd.dll on Windows.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.