This project has moved and is read-only. For the latest updates, please go here.

Microsoft .Net Framework Issue


When i start Ghostbuster i get the following issue appear in a pop up box.

Microsoft .NET Framework

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

An item with the same key has already been added.

If I expand the details box this is what is included:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary
2.Add(TKey key, TValue value)
at Ghostbuster.HwEntry..ctor(IntPtr aDeviceInfoSet, DeviceInfo aDeviceInfo, SP_DEVINFO_DATA aDeviceInfoData, String FriendlyName)
at Ghostbuster.Buster.Enumerate()
at Ghostbuster.Mainform.Enumerate(Boolean RemoveGhosts, Boolean HideUnfiltered)
at Ghostbuster.Mainform.Form1_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
Assembly Version:
Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll

Assembly Version:
Win32 Version:

CodeBase: file:///C:/Program%20Files%20(x86)/Swiss/Ghostbuster/Ghostbuster.exe

Assembly Version:
Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/

Assembly Version:
Win32 Version: 3.0.6920.5453 built by: Win7SP1GDR

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/WindowsBase/

Assembly Version: 1.7.4378.16959
Win32 Version:

CodeBase: file:///C:/Program%20Files%20(x86)/Swiss/Ghostbuster/Microsoft.Win32.TaskScheduler.DLL

Assembly Version:
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/

Assembly Version:
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/

Assembly Version:
Win32 Version: 3.5.30729.5420 built by: Win7SP1

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/

Assembly Version:
Win32 Version:

CodeBase: file:///C:/Program%20Files%20(x86)/Swiss/Ghostbuster/IniFile.DLL

Assembly Version:
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/

Assembly Version:
Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/

Assembly Version:
Win32 Version:

CodeBase: file:///C:/Program%20Files%20(x86)/Swiss/Ghostbuster/WaitCursor.DLL

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the section.
The application must also be compiled with debugging

For example:

< jitDebugging="true" />

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

If I click continue Ghostbuster starts and can see the devices as it lists the number in the bottom left hand corner. But the table is just blank so is unusable.

Installed on 5 laptops this occurs on 3 out of the 5. All are running Windows 7 SP1

Any ideas?



file attachments


wvd_vegt wrote Jan 14, 2015 at 11:45 AM


Strange, the offending line should be in Buster.Enumerate

HwEntries.Add(new HwEntry(DevInfoSet, aDeviceInfo, aDeviceInfoData, sb.ToString()));

and that's probably leading to one of Properties.Add statements in the HwEntries constructor.

in which case a property would occur twice (and I'm unsure of that is normally the case or even allowed).

Another candidate is the SerialPorts.Add statement in the same constructor, but again duplicates keys would not be unusual and probably an error on your machine.

If you like I can create a version that does some extra checks and logs the devices to a file so name of the offending device is known. For this, please send me a private message with your e-mail address.

regardsWim van der Vegt

richiricherd wrote Jan 21, 2016 at 11:31 PM

Hi, I'm facing exactly same problem.. Is there any solution yet?

Thanks in advance..

gtwiss wrote Mar 9, 2016 at 5:52 PM

I am also experiencing the problem. See attached.

wvd_vegt wrote Mar 9, 2016 at 6:27 PM


I'm a bit busy at the moment, but will look into it asap. Still a strange error, duplicate properties.

Best Regards

nigelmercier wrote Mar 19, 2016 at 3:57 PM

Me too.

I had version 1.0.5 so I installed 1.0.7, same error.

wvd_vegt wrote Mar 19, 2016 at 5:29 PM


Can you please test the following test version for me?

Ghostbuster_Portable v1.0.8 Test.exe

I added some extra tests to the two dictionaries inside HWEntry class. It seems like the registry somehow contains duplicate (property) keys.

Best Regards

richiricherd wrote Mar 19, 2016 at 9:49 PM

Hello sir I just try your last test version Ghostbuster_Portable v1.0.8 Test.exe but it just crashes and doesnt open.

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: ghostbuster_portable v1.0.8 test
Problem Signature 02:
Problem Signature 03: 56ed7db4
Problem Signature 04: mscorlib
Problem Signature 05:
Problem Signature 06: 4ba22001
Problem Signature 07: 11cd
Problem Signature 08: 9f
Problem Signature 09: System.TypeLoadException
OS Version: 6.1.7601.
Locale ID: 1033
Additional Information 1: 38ae
Additional Information 2: 38ae73072f92fad5b2ee980184065306
Additional Information 3: 29ea
Additional Information 4: 29ea11eb5763afd0ffa8485ab1eaf733

Read our privacy statement online:

If the online privacy statement is not available, please read our privacy statement offline:

wvd_vegt wrote Mar 19, 2016 at 11:50 PM

Hmm will do some further testing tomorrow.

Best regards

wvd_vegt wrote Mar 20, 2016 at 11:50 AM


Seems more like a problem with the merging of assemblies.

I've uploaded a standalone version at
dropbox. It includes debug symbols so should give a decent stackdump.

If you could test it for me, I would be grateful as I can reproduce none of the issues.

Best Regards

wvd_vegt wrote Mar 20, 2016 at 12:48 PM


I made some further modifications and re-uploaded the archive (including finally getting rid of some far-east text that turned out to be a binary stored GUID).

Best regards

Zigadeboo wrote Jun 1, 2016 at 3:51 PM

I too am having the same issues. I did download the standalone from Dropbox and that appears to be working.


wvd_vegt wrote Jun 1, 2016 at 5:22 PM


Finally someone who confirms the fix works. I'll upload a new release in a week of two.

Best regards