Bug 318123 (MONO75099) - Segmentation Fault with recursive events
Summary: Segmentation Fault with recursive events
Status: RESOLVED MOVED
Alias: MONO75099
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-30 18:03 UTC by José Faria
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:19:17 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"