[Mono-bugs] [Bug 80179][Nor] New - Type check returns an incorrect value

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Dec 7 11:17:30 EST 2006

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 lluis at ximian.com.


--- shadow/80179	2006-12-07 11:17:30.000000000 -0500
+++ shadow/80179.tmp.27206	2006-12-07 11:17:30.000000000 -0500
@@ -0,0 +1,52 @@
+Bug#: 80179
+Product: Mono: Runtime
+Version: 1.2
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: lluis at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Type check returns an incorrect value
+I found this problem when trying to find a bug in Stetic. I'm going to
+attach the code I'm using to reproduce the bug (it's not in stetic from svn).
+In the Container.cs, method "public override object ApplyUndoRedoDiff
+(object data)", I have a couple of debug lines:
+Console.WriteLine ("pp1:" + data.GetType ());
+Console.WriteLine ("pp2:" + (data is Object[]));
+Which generate the following output:
+pp2 should print True since the object is in theory an object[].
+After printing this output the application crashes with an
+System.InvalidCastException. However this crash is not related to the
+previous problem, since it's due to a real bug in Stetic. That is, the call
+to ApplyUndoRedoDiff is done to an object that does not expect an object[],
+and that's why crashes. However, the pp1 and pp2 debug output is still
+To reproduce the problem do the following:
+* Untar the attached tarball
+* Run autogen, make && make install
+* Start the app running "stetic"
+* When stetic is running, open the file aa.stetic (included in the tarball)
+* Double click on dialog1 in the list on the right
+* In the designer, select the top menu in the designed window
+* Click on the only main menu it has. It will display a submenu with 3 options.
+* Click on "Click to create action" in the submenu
+* Type any name and press Enter.
+* Click on the Undo command twice. At the second click you should get a
+crash. You should see the pp1 and pp2 debug output just before the crash.

More information about the mono-bugs mailing list