3
Vote

Microsoft .Net Framework Issue

description

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 **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)

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

Ghostbuster
Assembly Version: 1.0.5.0
Win32 Version: 1.0.5.0

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

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

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

WindowsBase
Assembly Version: 3.0.0.0
Win32 Version: 3.0.6920.5453 built by: Win7SP1GDR

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/WindowsBase/3.0.0.0__31bf3856ad364e35/WindowsBase.dll

Microsoft.Win32.TaskScheduler
Assembly Version: 1.7.4378.16959
Win32 Version: 1.7.1.0

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

System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

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

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Core
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.5420 built by: Win7SP1

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll

IniFile
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0

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

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

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

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

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

WaitCursor
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0

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 system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

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?

Regards,

Antoni.

file attachments

comments

wvd_vegt wrote Jan 14, 2015 at 11:45 AM

Hi,

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

Hi

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

Best Regards
wvdv

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

Hi

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
wvdv

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: 1.0.8.0
Problem Signature 03: 56ed7db4
Problem Signature 04: mscorlib
Problem Signature 05: 4.0.0.0
Problem Signature 06: 4ba22001
Problem Signature 07: 11cd
Problem Signature 08: 9f
Problem Signature 09: System.TypeLoadException
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: 38ae
Additional Information 2: 38ae73072f92fad5b2ee980184065306
Additional Information 3: 29ea
Additional Information 4: 29ea11eb5763afd0ffa8485ab1eaf733

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt

wvd_vegt wrote Mar 19, 2016 at 11:50 PM

Hi
Hmm will do some further testing tomorrow.

Best regards
wvdv

wvd_vegt wrote Mar 20, 2016 at 11:50 AM

Hi

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
wvdv

wvd_vegt wrote Mar 20, 2016 at 12:48 PM

Hi

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
wvdv

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.

Z~

wvd_vegt wrote Jun 1, 2016 at 5:22 PM

Thanks

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

Best regards
wvdv