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)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

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