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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=77494 --- shadow/77494 2006-02-07 18:40:24.000000000 -0500 +++ shadow/77494.tmp.2824 2006-02-07 20:22:22.000000000 -0500 @@ -1,15 +1,15 @@ Bug#: 77494 Product: Mono: Runtime Version: 1.1 OS: Mandrake 9.0 OS Details: x86, glibc 2.2.5 -Status: NEW +Status: NEEDINFO Resolution: Severity: Unknown -Priority: Major +Priority: Minor Component: JIT AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] TargetMilestone: --- URL: @@ -210,6 +210,150 @@ } } ------- Additional Comments From [EMAIL PROTECTED] 2006-02-07 18:40 ------- I am unable to reproduce this failure. + +------- Additional Comments From [EMAIL PROTECTED] 2006-02-07 20:22 ------- +I also obtained the code for this one directly. + +The code sample that is producing the problem in your code is this +line in method get_StartID of class IPMEPreferences: + + IL_0001: call instance string class +[MAAD.Simulator]MAAD.Simulator.Utilities.IPreferences::get_StartID() + +While both MCS and CSC produce this code for the sample you pasted above: + + IL_0001: call instance string class +DefaultPreferences::get_StartID() + +I suspect that the source code on your system does something along the +lines of: + + ((Preferences) this).StartID) + +I am afraid you posted the sample code after having fixed it locally +(as discussed on the email). + +Here is my current test case: + +using System; +using System.Xml; +using System.Xml.Serialization; +using System.ComponentModel; + + [ Serializable(), + XmlRoot("IPMEPreferences") + ] + public class IPMEPreferences : Preferences + { + + [ XmlAttribute() ] + public override string StartID + { + get + { + if(base.StartID != null && IDDelimiter != null) + return base.StartID.Replace(IDDelimiter, "_"); + return base.StartID; + } + set + { + // NOTE: IDDelimiter may be undefined here during the XML +deserialization, + // so we have to do the replacement in the getter. + base.StartID = value; + } + } + } + + +interface IPreferences { + string StartID { get; set; } +} + + [ + Serializable() + ] + public class Preferences : DefaultPreferences, IPreferences + { + private string idDelimiter; + + public Preferences() + { + IDDelimiter = "_"; + } + + [ + Browsable(false), + XmlAttribute() + ] + public virtual string IDDelimiter + { + get { return idDelimiter; } + set + { + OldValue = IDDelimiter; + idDelimiter = value; + } + } + + } + + [Serializable()] + public class DefaultPreferences : DefaultEditable + { + private string startID; + public DefaultPreferences() + { + StartID = "1"; + } + + [ + XmlAttribute(), + Description("The ID of the start task in the network.") + ] + public virtual string StartID + { + get { return startID; } + set + { + OldValue = StartID; + startID = value; + } + } + } + + [Serializable()] + public abstract class DefaultEditable + { + [NonSerialized()] private object oldValue; + public DefaultEditable() + { + OldValue = null; + } + + [ + Browsable(false), + XmlIgnore(), + ] + protected object OldValue + { + get { return oldValue; } + set { oldValue = value; } + } + } + + + +class D { + static void Main () + { + new IPMEPreferences (); + } +} + +Your code runs on .NET, but does fail in Mono as you described. It +would help to track down the bug to get the original classes involved +in this problem. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
