[Mono-bugs] [Bug 23398] New - Mono does not report NullRef on method calls on Null object

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
13 Apr 2002 17:14:40 -0000

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 pt99par@student.bth.se.


--- shadow/23398	Sat Apr 13 13:14:40 2002
+++ shadow/23398.tmp.3933	Sat Apr 13 13:14:40 2002
@@ -0,0 +1,45 @@
+Bug#: 23398
+Product: Mono/Runtime
+Version: unspecified
+OS Details: Mandrake 8.2
+Status: NEW   
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: pt99par@student.bth.se               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Mono does not report NullRef on method calls on Null object
+Please fill in this template when reporting a bug, unless you know what you are  
+Description of Problem:  
+Mono does not raise a NullRef. exception where it should. Min handels the error  
+ok. The problem is in SourceAnalyzer.cs . A member object "factory" is initialized  
+but in the constructor there is a local object named factory wich is initialized  
+instead of the member object so the member object is never initialized. Then there  
+is a method call on the member onject wich is null in another member method. Mint  
+raises a NullRef exception but mono does not. Both mono and mint confirms that the  
+object is null through a if( ob == null) test.  
+Steps to reproduce the problem:  
+1. Run linecounter.exe with mono and mint  
+2. look in SourceAnalyzer.cs  
+Actual Results:  
+ It looks like execution with success 
+Expected Results:  
+ NullRefernceException in Linecount.SourceAnalyzer::Analyze 
+How often does this happen?   
+ Allways 
+Additional Information:  
+ The source code and binaries are in the supplied tar.gz file