[Mono-list] How to debug a segmentation fault?

Paolo Molaro lupus at ximian.com
Wed Mar 1 06:00:50 EST 2006

On 02/24/06 Julien Sobrier wrote:
> I have a main executable assembly called Core which loads dll assemblies
> called plugins using System.Reflections. These plugins can send events,
> and the Core register to them. I've noticed that if a Plugin send an
> event, but the COre has notregistered (+= ) to this event, I have a
> segmentation fault.
> Any idea to isolate the problem?

Run your program inside gdb and see exactly when the SEGV happens.
There are two common mistakes:
*) using a delegate instead of an event
*) not keeping a reference to a delegate that is passed to pinvoke
to be later called as a callback


lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better

More information about the Mono-list mailing list