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 15:29:14.000000000 -0500 +++ shadow/77494.tmp.31025 2006-02-07 15:29:14.000000000 -0500 @@ -0,0 +1,211 @@ +Bug#: 77494 +Product: Mono: Runtime +Version: 1.1 +OS: Mandrake 9.0 +OS Details: x86, glibc 2.2.5 +Status: NEW +Resolution: +Severity: +Priority: Major +Component: JIT +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Mono runtime after 1.1.8.x goes into infinite recursion when accessing virtual override property. + +Please fill in this template when reporting a bug, unless you know what you +are doing. +Description of Problem: +The mono runtime after version 1.1.8.x goes into an infinite recursion (and +crashes with seg fault) when accessing a public property that overrides an +ancestor class property. The code itself should never produce infinite +recursion (and doesn't on Microsoft .NET 1.1, nor on Mono 1.1.8.x). My +apologies, for not having a smaller test case to exhibit the problem. + +Steps to reproduce the problem: +1. Using the test case given, under mono 1.1.12.1 (for example) run: + mono --trace=T:MAAD.IPME.Common.IPMEPreferences TestSMG.exe + +Actual Results: +You will see that accessing the IPMEPreferences.StartID public property +(eventually, like after 15-20 seconds on slow machines) produces an +infinite recursion: + +ENTER: MAAD.IPME.Common.IPMEPreferences:GetSerializer +(MAAD.IPME.Schedulers.ISchedulerCapable)([MAAD.IPME.SimEngine.MicroSaintSimulationApplication:0x837aea0], +) +LEAVE: MAAD.IPME.Common.IPMEPreferences:GetSerializer +(MAAD.IPME.Schedulers.ISchedulerCapable)[System.Xml.Serialization.XmlSerializer:0x84c4fa0] +ENTER: MAAD.IPME.Common.IPMEPreferences:.ctor +()(this:0x8645d68[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], ) +. ENTER: MAAD.IPME.Common.IPMEPreferences:set_StartID +(string)(this:0x8645d68[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], +[STRING:0x8273f80:1], ) +. . ENTER: MAAD.IPME.Common.IPMEPreferences:get_StartID +()(this:0x8645d68[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], ) +. . . ENTER: MAAD.IPME.Common.IPMEPreferences:get_StartID +()(this:0x8645d68[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], ) +. . . . ENTER: MAAD.IPME.Common.IPMEPreferences:get_StartID +()(this:0x8645d68[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], ) +. . . . . ENTER: MAAD.IPME.Common.IPMEPreferences:get_StartID +()(this:0x8645d68[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], ) +. . . . . . ENTER: MAAD.IPME.Common.IPMEPreferences:get_StartID +()(this:0x8645d68[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], ) +. . . . . . . ENTER: MAAD.IPME.Common.IPMEPreferences:get_StartID +()(this:0x8645d68[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], ) +And so on... + + +Expected Results: +Under mono 1.1.8.0 it produces the correct result: + +ENTER: MAAD.IPME.Common.IPMEPreferences:GetSerializer +(MAAD.IPME.Schedulers.ISchedulerCapable)([MAAD.IPME.SimEngine.MicroSaintSimulationApplication:0x8383ea0], +) +LEAVE: MAAD.IPME.Common.IPMEPreferences:GetSerializer +(MAAD.IPME.Schedulers.ISchedulerCapable)[System.Xml.Serialization.XmlSerializer:0x856efa0] +ENTER: MAAD.IPME.Common.IPMEPreferences:.ctor +()(this:0x8383c30[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], ) +. ENTER: MAAD.IPME.Common.IPMEPreferences:set_StartID +(string)(this:0x8383c30[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], +[STRING:0x8262f80:1], ) +. . ENTER: MAAD.IPME.Common.IPMEPreferences:get_StartID +()(this:0x8383c30[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], ) +. . LEAVE: MAAD.IPME.Common.IPMEPreferences:get_StartID ()[STRING:null], +. LEAVE: MAAD.IPME.Common.IPMEPreferences:set_StartID (string) +LEAVE: MAAD.IPME.Common.IPMEPreferences:.ctor () +ENTER: MAAD.IPME.Common.IPMEPreferences:set_StartID +(string)(this:0x8383c30[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], +[STRING:0x83a3940:1], ) +. ENTER: MAAD.IPME.Common.IPMEPreferences:get_StartID +()(this:0x8383c30[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], ) +. LEAVE: MAAD.IPME.Common.IPMEPreferences:get_StartID ()[STRING:0x8262f80:1] +LEAVE: MAAD.IPME.Common.IPMEPreferences:set_StartID (string) +ENTER: MAAD.IPME.Common.IPMEPreferences:set_MissionTimeLimit +(double)(this:0x8383c30[MAAD.IPME.Common.IPMEPreferences TestSMG.exe], +0.000000, ) +And so on, until it eventually completes with the message: +Simulation Complete - 0.25 seconds. + + +How often does this happen? +Always. + +Additional Information: +These assemblies were compiled under Visual Studio .NET 2003, using +Microsoft's .NET 1.1 C# compiler. +The class heirarchy, and assemblies containing the classes, look like: + +class MAAD.IPME.Common.IPMEPreferences in assembly IPME.Common.dll + + [ Serializable(), + XmlRoot("IPMEPreferences") + ] + public class IPMEPreferences : MAAD.Network.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; + } + } + } + +class MAAD.Network.Preferences in assembly MAAD.Network.dll + + + [ + DisplayAttribute(ImageNumber = 4, Name = "Execution Settings"), + 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; + LaunchChangedEvent(EChanged.DataEdited, "IDDelimiter", OldValue); + } + } + + } + +class MAAD.Utilities.Document.DefaultPreferences in assembly MAAD.Utilities.dll + + [Serializable()] + public class DefaultPreferences : DefaultEditable, ISettings + { + private string startID; + public DefaultPreferences() + { + StartID = "1"; + } + + [ + XmlAttribute(), + SearchableAttribute(), + Description("The ID of the start task in the network.") + ] + public virtual string StartID + { + get { return startID; } + set + { + OldValue = StartID; + startID = value; + LaunchChangedEvent(EChanged.DataEdited, "StartID", OldValue); + } + } + } + +class MAAD.Utilities.DefaultEditable in assembly MAAD.Utilities.dll + + [Serializable()] + public abstract class DefaultEditable : DefaultLightEditable, IEditable, +ICustomTypeDescriptor, IEditOperationsID, IUndoEventsHelper + { + [NonSerialized()] private object oldValue; + public DefaultEditable() + { + OldValue = null; + } + + [ + Browsable(false), + XmlIgnore(), + DisplayIntelliPromptAttribute(false) + ] + protected object OldValue + { + get { return oldValue; } + set { oldValue = value; } + } + } _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
