Bugzilla – Bug 318123
Segmentation Fault with recursive events
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by spigaz@gmail.com 2005-05-30 11:03:28 MST ---- 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. ---- Additional Comments From bmaurer@users.sf.net 2005-05-30 11:35:50 MST ---- *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO47689 *** Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Gentoo 2.6.11</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other". This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"