[Mono-bugs] [Bug 72649][Wis] New - Error in attribute on a gmcs compiled program

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 16 Feb 2005 15:22:53 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gonzalo@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=72649

--- shadow/72649	2005-02-16 15:22:53.000000000 -0500
+++ shadow/72649.tmp.14517	2005-02-16 15:22:53.000000000 -0500
@@ -0,0 +1,85 @@
+Bug#: 72649
+Product: Mono: Compilers
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gonzalo@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Error in attribute on a gmcs compiled program
+
+Compile the attached source files as:
+gmcs main.cs uno.cs
+
+On linux it runs (it might throw some exception).
+
+Copy the exe to windows and run it. you'll get:
+Unhandled Exception: System.Configuration.ConfigurationException: Exception
+in configuration section handler  Binary format of the specified custom
+attribute was invalid.. --->
+System.Reflection.CustomAttributeFormatException: Binary format of the
+specified custom attribute was invalid.
+
+   at System.Reflection.CustomAttribute.GetDataForPropertyOrField(Boolean&
+isProperty, Object& value, Type& type, Boolean isLast)
+
+   at System.Reflection.CustomAttribute.GetObject()
+
+   at
+System.Reflection.CustomAttribute.CheckConsistencyAndCreateArray(CustomAttribute
+caItem, RuntimeType caType, Int32 pcaCount, Attribute[] pca)
+
+   at
+System.Reflection.CustomAttribute.GetCustomAttributes(RuntimePropertyInfo
+property, RuntimeType caType)
+
+   at System.Reflection.RuntimePropertyInfo.GetCustomAttributes(Type
+attributeType, Boolean inherit)
+
+   at System.Attribute.InternalGetCustomAttributes(PropertyInfo element,
+Type type, Boolean inherit)
+
+   at System.Attribute.GetCustomAttributes(MemberInfo element, Boolean inherit)
+
+   at System.Configuration.ConfigurationElement.PropertiesFromType(Type type)
+
+   at System.Configuration.ConfigurationElement.get_Properties()
+
+   at
+System.Configuration.ConfigurationElement.UnMerge(ConfigurationElement
+sourceElement, ConfigurationElement parentElement, Boolean
+serializeCollectionKey, Object context, ConfigurationUpdateMode updateMode)
+
+   at
+System.Configuration.ConfigurationElement.WriteXml(ConfigurationElement
+parentElement, Object context, String name, ConfigurationUpdateMode updateMode)
+
+   at
+System.Configuration.MgmtConfigurationRecord.GetConfigDefinitionUpdates(ConfigDefinitionUpdates&
+definitionUpdates, ArrayList& configSourceUpdates, ConfigurationUpdateMode
+updateMode, Boolean forceUpdateAll)
+
+   --- End of inner exception stack trace ---
+
+   at
+System.Configuration.MgmtConfigurationRecord.GetConfigDefinitionUpdates(ConfigDefinitionUpdates&
+definitionUpdates, ArrayList& configSourceUpdates, ConfigurationUpdateMode
+updateMode, Boolean forceUpdateAll)
+
+   at
+System.Configuration.MgmtConfigurationRecord.Update(ConfigurationUpdateMode
+updateMode, Boolean forceUpdateAll)
+
+   at System.Configuration.Configuration.Update()
+
+   at App.Main(String[] args)
+
+If you compile it with csc 2.0, the program works just fine.