[Mono-bugs] [Bug 77354][Nor] New - mono_get_lmf_addr crash
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Jan 25 12:05:57 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 andreas.faerber at web.de.
http://bugzilla.ximian.com/show_bug.cgi?id=77354
--- shadow/77354 2006-01-25 12:05:57.000000000 -0500
+++ shadow/77354.tmp.2508 2006-01-25 12:05:57.000000000 -0500
@@ -0,0 +1,53 @@
+Bug#: 77354
+Product: Mono: Runtime
+Version: 1.1
+OS: Mac OS X 10.3
+OS Details: OS X v10.3.9
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: interop
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: andreas.faerber at web.de
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mono_get_lmf_addr crash
+
+Description of Problem:
+When I use interop to add a new ObjC class to the ObjC runtime and let that class pose as
+NSObject, then I can override the dealloc method, calling the original NSObject implementation.
+This works fine as long as I do not display an alert sheet (using NSAlert's
+-(void)beginSheetModal...); shortly after I do, Mono aborts with an assertion failure in
+mono_get_lmf_addr in mini.c (as recently posted on the Mono list).
+
+
+Steps to reproduce the problem:
+1. Create a native subclass of NSObject that overrides the dealloc method via a delegate into
+managed code.
+2. Let that native class pose as NSObject, using either [TheNewClass poseAsClass:NSObject] ObjC
+method or p/invoked class_poseAs ObjC runtime function.
+3. Create a new NSWindow instance.
+4. Add an NSButton to the window's view.
+5. Attach event handler code to the button that calls NSAlert's
+-(void)beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo: method.
+6. Call [NSApplication sharedApplication's] -(void)run.
+7. Compile, execute and click on the button to execute the event handling code.
+
+Actual Results:
+Mono aborts shortly after the sheet is displayed and reports an error in mono_get_lmf_addr
+function in mini.c (that should never be reached) on the console. If no alert sheet is displayed the
+app runs fine, all other callbacks or p/invoke calls I use execute as expected. If I do not pose as
+NSObject then the sheet is displayed as expected.
+
+Expected Results:
+A lot of callbacks to the managed dealloc method, but no abort of Mono runtime.
+
+How often does this happen?
+Every time an alert sheet is displayed. It happens with both mcs and gmcs.
+
+Additional Information:
+My Cocoa/ObjC bridge code and a test case are available on request. (posing and some other
+features are not supported or not working in the SVN Cocoa#)
More information about the mono-bugs
mailing list