This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 2505 - Internal compiler error: An element with the same key already exists in the dictionary
Summary: Internal compiler error: An element with the same key already exists in the d...
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2011-12-14 17:54 UTC by Timotheus Pokorra
Modified: 2012-02-01 05:10 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Timotheus Pokorra 2011-12-14 17:54:08 UTC
this is related to https://bugzilla.novell.com/show_bug.cgi?id=672969
The test case from that bug now works fine in Mono 2.10.6.

When you use the same test case, but add the simple line
ComboBox c = new ComboBox();
to the Page_Load method in test.aspx.cs
then you get the same compiler error again. I tested it with Mono 2.10.6.

I tried to debug the mcs/mcs/Import.cs file, but got lost :-)
The error happens in CreateGenericParameters (MetaType type, TypeSpec declaringType), declaringType is Ext.Net.ComboBoxBase<T>

Thanks for looking into this!
Comment 1 Marek Safar 2011-12-15 04:10:44 UTC
Already fixed in master
Comment 2 Timotheus Pokorra 2012-02-01 04:12:02 UTC
I am able to confirm that it is fixed in master.

May I ask which commit did fix this issue?

I might need to apply the fix to the 2.10 branch, since I have problems with fastcgi in master at the moment (see #2876).
Comment 3 Marek Safar 2012-02-01 04:34:31 UTC
It wasn't single fix, master mcs has different internals but you should be able to grab master mcs.exe and use it with 2.10
Comment 4 Timotheus Pokorra 2012-02-01 04:52:29 UTC
Thanks for the quick reply!

I only found one mcs.exe in the build of my master, and have copied that:
cp /opt/mono-master/lib/mono/4.5/mcs.exe /opt/mono-2.10/lib/mono/4.0/dmcs.exe

but then I get these error messages:
dmcs /target:library /lib:"/usr/local/openpetraorg/YourOrganisation/webserver/bin" /debug+ /optimize- /warn:4 /out:"../tmp/App_Web_79cd229d.dll" /r:"/opt/mono-2.10/lib/mono/4.0/mscorlib.dll" /r:"/opt/mono-2.10/lib/mono/gac/Microsoft.CSharp/4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll" /r:"/opt/mono-2.10/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll" /r:"/opt/mono-2.10/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll" 
[...]
 /nowarn:0169 /d:DEBUG  -- "../tmp/App_Web_79cd229d_0.cs" "../tmp/App_Web_79cd229d_1.cs" "../tmp/App_Web_79cd229d_2.cs" 

warning CS8001: SDK path could not be resolved
../tmp/App_Web_79cd229d_0.cs(33,86): error CS0012: The type `System.ComponentModel.IComponent' is defined in an assembly that is not referenced. Consider adding a reference to assembly `System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

So I guess just too much has changed since 2.10?
Or is there an easy way to point to the right SDK path again?
Comment 5 Marek Safar 2012-02-01 05:10:56 UTC
yes, there has been some other changes all over mono sources code

Note You need to log in before you can comment on or make changes to this bug.