[Mono-osx] [MonoMac] Bindings Regression Tests

kjpou kjpou at pt.lu
Sun Nov 28 14:06:20 EST 2010


Miguel

Thanks for the response.

About the [Export] or [Connect], when first creating the sample I tried 
using the [Connect] and it did not work so tried [Export] and it worked 
so thought things were different.  Will give it another shot.

Concerning the SetValueForKey and GetValueForKey, those were working as 
well and now are not.  Shouldn't we be able to override those methods 
and get it to work the same way?  In the last PopupBinding sample 
program it worked fine as well and now it just blows up with the error 
message below.

You can see the error from the last PopupBindings project that I sent to 
the list.  It uses reflection to get and set the properties instead of 
[Connect] or [Export].

Again thanks for your time.

Kenneth

Stacktrace:

   at (wrapper managed-to-native) 
MonoMac.ObjCRuntime.Messaging.void_objc_msgSend_IntPtr 
(intptr,intptr,intptr) <0x00003>
   at (wrapper managed-to-native) 
MonoMac.ObjCRuntime.Messaging.void_objc_msgSend_IntPtr 
(intptr,intptr,intptr) <0x00003>
   at MonoMac.AppKit.NSArrayController.AddObject 
(MonoMac.Foundation.NSObject) <0x00038>
   at PopupBindings.TestWindowController.AwakeFromNib () <0x00065>
   at (wrapper native-to-managed) 
object.[PopupBindings.TestWindowController.Void AwakeFromNib()] 
(MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector) <0x000a2>
   at (wrapper managed-to-native) 
MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (intptr,intptr) 
<0x00003>
   at (wrapper managed-to-native) 
MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (intptr,intptr) 
<0x00003>
   at MonoMac.AppKit.NSWindowController.get_Window () <0x00077>
   at PopupBindings.TestWindowController.get_Window () <0x00012>
   at PopupBindings.AppDelegate.FinishedLaunching 
(MonoMac.Foundation.NSObject) <0x00038>
   at (wrapper native-to-managed) object.[PopupBindings.AppDelegate.Void 
FinishedLaunching(MonoMac.Foundation.NSObject)] 
(MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,intptr) <0x000cb>
   at (wrapper managed-to-native) 
MonoMac.AppKit.NSApplication.NSApplicationMain (int,string[]) <0x00003>
   at (wrapper managed-to-native) 
MonoMac.AppKit.NSApplication.NSApplicationMain (int,string[]) <0x00003>
   at MonoMac.AppKit.NSApplication.Main (string[]) <0x00015>
   at PopupBindings.MainClass.Main (string[]) <0x00015>
   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object 
(object,intptr,intptr,intptr) <0x00073>

Native stacktrace:

     0   PopupBindings                       0x000c8f5a 
mono_handle_native_sigsegv + 343
     1   PopupBindings                       0x0000ffa5 
mono_sigsegv_signal_handler + 306
     2   libSystem.B.dylib                   0x92e1946b _sigtramp + 43
     3   ???                                 0xffffffff 0x0 + 4294967295
     4   AppKit                              0x90edc54c 
-[_NSSelectionBinderPlugin 
populateObject:withContent:valueKey:objectKey:insertsNullPlaceholder:] + 478
     5   AppKit                              0x90ebcc2d 
-[NSSelectionBinder 
_adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState:] 
+ 794
     6   AppKit                              0x90d91edf -[NSValueBinder 
_observeValueForKeyPath:ofObject:context:] + 280
     7   AppKit                              0x90ebc90b 
-[NSSelectionBinder observeValueForKeyPath:ofObject:change:context:] + 340
     8   Foundation                          0x962ea714 
NSKeyValueNotifyObserver + 372
     9   Foundation                          0x962efef5 
-[NSObject(NSKeyValueObservingPrivate) 
_notifyObserversForKeyPath:change:] + 943
     10  AppKit                              0x90d65b96 -[NSController 
_notifyObserversForKeyPath:change:] + 251
     11  AppKit                              0x90d65a93 -[NSController 
didChangeValueForKey:] + 49
     12  AppKit                              0x90ec6585 
-[NSArrayController 
didChangeValuesForArrangedKeys:objectKeys:indexKeys:] + 79
     13  AppKit                              0x90f99f05 
-[NSArrayController _insertObject:atArrangedObjectIndex:objectHandler:] 
+ 643
     14  AppKit                              0x90f95c6f 
-[NSArrayController insertObject:atArrangedObjectIndex:] + 448
     15  AppKit                              0x90f41f53 
-[NSArrayController addObject:] + 168
     16  ???                                 0x012f6a1f 0x0 + 19884575
     17  ???                                 0x012f6971 0x0 + 19884401
     18  ???                                 0x012f5d4e 0x0 + 19881294
     19  ???                                 0x012f18d3 0x0 + 19863763
     20  AppKit                              0x90cda26c -[NSIBObjectData 
nibInstantiateWithOwner:topLevelObjects:] + 1646
     21  AppKit                              0x90cd81f4 loadNib + 257
     22  AppKit                              0x90cd75ed 
+[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 228
     23  AppKit                              0x90cd74fe 
+[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 158
     24  AppKit                              0x90d671e7 
-[NSWindowController loadWindow] + 223
     25  AppKit                              0x90cfdf76 
-[NSWindowController window] + 89
     26  ???                                 0x012f2d65 0x0 + 19869029
     27  ???                                 0x012f3ef0 0x0 + 19873520
     28  ???                                 0x012f3e33 0x0 + 19873331
     29  ???                                 0x012f2f09 0x0 + 19869449
     30  ???                                 0x012f0d0c 0x0 + 19860748
     31  Foundation                          0x962d74df _nsnote_callback 
+ 176
     32  CoreFoundation                      0x96e41793 
__CFXNotificationPost + 947
     33  CoreFoundation                      0x96e4119a 
_CFXNotificationPostNotification + 186
     34  Foundation                          0x962cc384 
-[NSNotificationCenter postNotificationName:object:userInfo:] + 128
     35  Foundation                          0x962d9789 
-[NSNotificationCenter postNotificationName:object:] + 56
     36  AppKit                              0x90d4a422 -[NSApplication 
_postDidFinishNotification] + 125
     37  AppKit                              0x90d4a332 -[NSApplication 
_sendFinishLaunchingNotification] + 74
     38  AppKit                              0x90ea14ed 
-[NSApplication(NSAppleEventHandling) _handleAEOpen:] + 274
     39  AppKit                              0x90ea110d 
-[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] 
+ 101
     40  Foundation                          0x9630c7a4 
-[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] 
+ 511
     41  Foundation                          0x9630c568 
_NSAppleEventManagerGenericHandler + 228
     42  AE                                  0x90ad8f58 
_Z20aeDispatchAppleEventPK6AEDescPS_mPh + 166
     43  AE                                  0x90ad8e57 
_ZL25dispatchEventAndSendReplyPK6AEDescPS_ + 43
     44  AE                                  0x90ad8d61 
aeProcessAppleEvent + 197
     45  HIToolbox                           0x9190b323 
AEProcessAppleEvent + 50
     46  AppKit                              0x90d1a9ca _DPSNextEvent + 1420
     47  AppKit                              0x90d19fce -[NSApplication 
nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
     48  AppKit                              0x90cdc247 -[NSApplication 
run] + 821
     49  AppKit                              0x90cd42d9 
NSApplicationMain + 574
     50  ???                                 0x012f1c3e 0x0 + 19864638
     51  ???                                 0x012f1b8e 0x0 + 19864462
     52  ???                                 0x004cecf6 0x0 + 5041398
     53  ???                                 0x004ced8c 0x0 + 5041548
     54  PopupBindings                       0x0000fd70 
mono_jit_runtime_invoke + 1339
     55  PopupBindings                       0x001de701 
mono_runtime_invoke + 138
     56  PopupBindings                       0x001e08ac 
mono_runtime_exec_main + 669
     57  PopupBindings                       0x001dfc96 
mono_runtime_run_main + 814
     58  PopupBindings                       0x0009c762 mono_jit_exec + 200
     59  PopupBindings                       0x0009c99c 
main_thread_handler + 558
     60  PopupBindings                       0x0009ecd3 mono_main + 7577
     61  PopupBindings                       0x00003a95 
mono_main_with_options + 539
     62  PopupBindings                       0x00003b1c main + 49
     63  PopupBindings                       0x0000384e start + 54

Debug info from gdb:

/tmp/mono-gdb-commands.alKIRq:1: Error in sourced command file:
unable to debug self

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

The application was terminated by a signal: SIGIOT


On 11/28/10 6:39 PM, Miguel de Icaza wrote:
> Hello,
>
>     Good news is that I can not recreate any of the problems that I
>     was having with NSTableView.  Not in any of the samples, test
>     cases nor in my main monomac/Cocoa project that I am working on.
>
>
> Right, that was Geoff's fixes from Friday.   Glad to see that this 
> eliminated a bunch of errors (it was affecting everyone, but the 
> errors were slightly different).
>
>     Unfortunately now some other things have started acting up.  The
>     PopupBindings sample provided from monomac master does not work
>     anymore nor the new one I posted yesterday.  I have created three
>     different tests and the only one that works is with
>     NSMutableDictionary.  I was in the process of adding a class
>     object to my main project that used the same bindings concepts of
>     PopupBindings but with a NSTableView binding instead of binding to
>     a popup button.
>
>
> I am surprised that the sample ever worked.   If you google for that 
> particular error, you will see that our MonoTouch/Troubleshooting page 
> explained what had to be done.   In this case, you do not want 
> [Export] as that is merely to respond to the Objective-C message, but 
> does not participate in the key/value system.   For that you need to 
> use [Connect].   I have fixed the sample to use [Connect] instead.
>
>     Spent the last four hours trying to find the problem in my code
>     and have hit a dead end.  Could someone please verify for me that
>     the PopupBindings project works for them as it seemed to worked
>     before.  Either one will do.  Sample provided from source or the
>     one I posted yesterday.
>
>
> It works now, let me know if you run into other issues.
> Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20101128/06ede83b/attachment-0001.html 


More information about the Mono-osx mailing list