[Mono-bugs] [Bug 75099][Nor] New - Segmentation Fault with recursive events

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon May 30 11:03:28 EDT 2005


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 spigaz at gmail.com.

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

--- shadow/75099	2005-05-30 11:03:28.000000000 -0400
+++ shadow/75099.tmp.11438	2005-05-30 11:03:28.000000000 -0400
@@ -0,0 +1,77 @@
+Bug#: 75099
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: Gentoo 2.6.11
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: spigaz at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Segmentation Fault with recursive events
+
+Description of Problem:
+When An Event produces itself in a recursive way, mono gives a segmentation
+fault.
+
+Steps to reproduce the problem:
+1. Insert into a file, compile and execute:
+public class Class2
+
+{
+
+	protected event Changed _changed;
+
+	
+	public void RegisterSE(Changed changed)
+
+	{
+		_changed += changed;
+
+		_changed(this);
+
+	}
+	public delegate void Changed(Class2 instance);
+
+}
+
+public class Class
+{
+	protected static Class2 _instance;
+	
+	public static void Main()
+	{
+		Class2 instance = new Class2();
+		_instance = instance;
+		instance.RegisterSE(new Class2.Changed(OnEventA));
+	}
+	protected static void OnEventA(Class2 instance)
+	{
+		_instance.RegisterSE(new Class2.Changed(OnEventB));
+	}
+	protected static void OnEventB(Class2 instance)
+	{
+
+	}
+}
+2. 
+3. 
+
+Actual Results:
+Segmentation Fault
+
+Expected Results:
+Some kind of error giving some kind of reason
+
+How often does this happen? 
+Always
+
+Additional Information:
+This is in fact an error only important to trace a bug in user code, but a
+better error can improve a lot the user experience.


More information about the mono-bugs mailing list