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=80229 --- shadow/80229 2006-12-11 17:15:06.000000000 -0500 +++ shadow/80229.tmp.21097 2006-12-11 17:15:06.000000000 -0500 @@ -0,0 +1,35 @@ +Bug#: 80229 +Product: Mono: Runtime +Version: 1.2 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: misc +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Segfault in gdb when trying to dereference a null System.Xml.XmlNode object + +This is a strange bug, and is only present when running a mono application +from within gdb. + +Take the following code snippet: + +XmlNode node = parent.SelectSingleNode("i-do-not-exist"); +Console.WriteLine(node.InnerText); + +When not inside gdb, a NullReferenceException will be thrown when +dereferencing 'node.' However, if running under gdb, a segfault will be +thrown when dereferencing. + +While the developer should always explicitly check for null before +dereferencing instead of relying on exceptions for flow control, a segfault +is quite bad. I found this after some code was introduced in Banshee that +did exactly that (rely on the exception), and I could no longer debug under +gdb as Banshee would always segfault on startup. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
