[Mono-bugs] [Bug 60613][Maj] Changed - NullReferenceException in OracleDataReader.GetSchemaTable caused by JIT optimizations

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 24 Jun 2004 11:49:20 -0400 (EDT)


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 joergr@voelcker.com.

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

--- shadow/60613	2004-06-24 11:33:37.000000000 -0400
+++ shadow/60613.tmp.28006	2004-06-24 11:49:20.000000000 -0400
@@ -161,6 +161,33 @@
 This seems to come from a possibly NULL
 ErrorHandle in OciParameterDescriptor parameter.
 Could you add a call/console.WriteLine around the call to
 row ["NumericPrecision"]	= parameter.GetPrecision ();
 and see if parameter.ErrorHandle changes?
 
+
+------- Additional Comments From JoergR@voelcker.com  2004-06-24 11:49 -------
+Hello Paolo,
+
+I was on vacation the last 3 weeks and it worked before. So this bug
+was introduced in the last 3-4 weeks. 
+
+I have changed the code like this:
+Console.WriteLine ("ErrorHandle before: {0}", parameter.ErrorHandle !=
+null ? parameter.ErrorHandle.Handle.ToString() : "<null>");
+row ["NumericPrecision"]	= parameter.GetPrecision ();
+Console.WriteLine ("Parameter: {0}", parameter != null ?
+parameter.ToString() : "<null>");				
+Console.WriteLine ("ErrorHandle after: {0}", parameter.ErrorHandle !=
+null ? parameter.ErrorHandle.Handle.ToString() : "<null>");
+
+This results in following output:
+ErrorHandle before: 135912720
+Parameter: NamedDataType
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to an instance of an object
+in <0x0036b> System.Data.OracleClient.OracleDataReader:GetSchemaTable ()
+in <0x000cb> Bug.MainClass:Main (string[])
+
+So simply accessing the ErrorHandle property after this call results
+in a segfault.