[Mono-osx] [MonoMac] Pragmatic's Core Animation for Mac OS X - Chapter 2

kjpou kjpou at pt.lu
Sun Jan 16 02:24:40 EST 2011


Hello everyone

This finishes up Chapter 2.

This one is causing me problems with any number of errors randomly 
generated for the animator.

Could someone else run this and let me know what they are getting.  I 
could swear this running back in December.

In the KeyDown method
         public override void KeyDown (NSEvent theEvent)
         {
             if (Beach.Superview != null)
             {
                 Console.WriteLine("beach with snow");
                 //this.ReplaceSubviewWith(Beach, Snow);
                 ((NSView)Animator).ReplaceSubviewWith(Beach,Snow);
             }
             else if (Snow.Superview != null)
             {
                 Console.WriteLine("snow with beach");
                 //this.ReplaceSubviewWith(Snow,Beach);
                 ((NSView)Animator).ReplaceSubviewWith(Snow,Beach);
             }
         }

If you do not use the Animator it works fine but once the animator is 
used it starts giving all sorts of random errors.  See below for the 
types of errors.

Also you will need the patch sent in the first message for Chapter 2.

Kenneth

initFalse
2011-01-16 07:22:40.479 TransitionView[14181:613] 
TransitionView(0x3dc1b00) - NSView not correctly initialized. Did you 
forget to call super?
snow with beach
2011-01-16 07:22:43.626 TransitionView[14181:613] -[NSCellAuxiliary 
_lockViewHierarchyForModificationWithExceptionHandler:]: unrecognized 
selector sent to instance 0x3dcffb0
2011-01-16 07:22:43.627 TransitionView[14181:613] -[NSCellAuxiliary 
_lockViewHierarchyForModificationWithExceptionHandler:]: unrecognized 
selector sent to instance 0x3dcffb0

-------------------------------

initFalse
2011-01-16 07:25:41.636 TransitionView[14278:613] 
TransitionView(0x1535640) - NSView not correctly initialized. Did you 
forget to call super?
snow with beach
2011-01-16 07:25:43.308 TransitionView[14278:613] +[NSCFNumber 
_lockViewHierarchyForModificationWithExceptionHandler:]: unrecognized 
selector sent to class 0x5010f0
2011-01-16 07:25:43.308 TransitionView[14278:613] +[NSCFNumber 
_lockViewHierarchyForModificationWithExceptionHandler:]: unrecognized 
selector sent to class 0x5010f0

------------------------

initFalse
2011-01-16 07:26:41.530 TransitionView[14317:613] 
TransitionView(0x50060e0) - NSView not correctly initialized. Did you 
forget to call super?
snow with beach
2011-01-16 07:26:43.037 TransitionView[14317:613] -[NSMachPort 
_lockViewHierarchyForModificationWithExceptionHandler:]: unrecognized 
selector sent to instance 0x251b150
2011-01-16 07:26:43.037 TransitionView[14317:613] -[NSMachPort 
_lockViewHierarchyForModificationWithExceptionHandler:]: unrecognized 
selector sent to instance 0x251b150

---------------------

initFalse
2011-01-16 07:27:34.638 TransitionView[14333:613] +[NSCFSet 
_lockViewHierarchyForModificationWithExceptionHandler:]: unrecognized 
selector sent to class 0x500790
2011-01-16 07:27:34.638 TransitionView[14333:613] +[NSCFSet 
_lockViewHierarchyForModificationWithExceptionHandler:]: unrecognized 
selector sent to class 0x500790
beach with snow

------------------------

initFalse
2011-01-16 07:23:45.759 TransitionView[14219:613] 
TransitionView(0x2b42ad0) - NSView not correctly initialized. Did you 
forget to call super?
snow with beach
Stacktrace:

   at (wrapper managed-to-native) 
MonoMac.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr_IntPtr 
(intptr,intptr,intptr,intptr) <0x00003>
   at (wrapper managed-to-native) 
MonoMac.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr_IntPtr 
(intptr,intptr,intptr,intptr) <0x00003>
   at MonoMac.AppKit.NSView.ReplaceSubviewWith 
(MonoMac.AppKit.NSView,MonoMac.AppKit.NSView) <0x0007f>
   at TransitionView.TransitionView.KeyDown (MonoMac.AppKit.NSEvent) 
<0x0015e>
   at (wrapper dynamic-method) 
object.[TransitionView.TransitionView.Void 
KeyDown(MonoMac.AppKit.NSEvent)] 
(MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSEvent) 
<0x00033>
   at (wrapper native-to-managed) 
object.[TransitionView.TransitionView.Void 
KeyDown(MonoMac.AppKit.NSEvent)] 
(MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSEvent) 
<0x000df>
   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 TransitionView.MainClass.Main (string[]) <0x00015>
   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object 
(object,intptr,intptr,intptr) <0x00073>

Native stacktrace:

     0   TransitionView                      0x000c8f5a 
mono_handle_native_sigsegv + 343
     1   TransitionView                      0x0000ffa5 
mono_sigsegv_signal_handler + 306
     2   libSystem.B.dylib                   0x95da246b _sigtramp + 43
     3   ???                                 0xffffffff 0x0 + 4294967295
     4   ???                                 0x02fe8d67 0x0 + 50236775
     5   ???                                 0x02fe8cb8 0x0 + 50236600
     6   ???                                 0x02fe87af 0x0 + 50235311
     7   ???                                 0x007e4f64 0x0 + 8277860
     8   ???                                 0x02ad2c90 0x0 + 44903568
     9   AppKit                              0x924b8d38 -[NSWindow 
sendEvent:] + 5757
     10  AppKit                              0x923d1817 -[NSApplication 
sendEvent:] + 6431
     11  AppKit                              0x923652a7 -[NSApplication 
run] + 917
     12  AppKit                              0x9235d2d9 
NSApplicationMain + 574
     13  ???                                 0x02ad3486 0x0 + 44905606
     14  ???                                 0x02ad33d6 0x0 + 44905430
     15  ???                                 0x004cdd9e 0x0 + 5037470
     16  ???                                 0x004cde34 0x0 + 5037620
     17  TransitionView                      0x0000fd70 
mono_jit_runtime_invoke + 1339
     18  TransitionView                      0x001de701 
mono_runtime_invoke + 138
     19  TransitionView                      0x001e08ac 
mono_runtime_exec_main + 669
     20  TransitionView                      0x001dfc96 
mono_runtime_run_main + 814
     21  TransitionView                      0x0009c762 mono_jit_exec + 200
     22  TransitionView                      0x0009c99c 
main_thread_handler + 558
     23  TransitionView                      0x0009ecd3 mono_main + 7577
     24  TransitionView                      0x00003a95 
mono_main_with_options + 539
     25  TransitionView                      0x00003b1c main + 49
     26  TransitionView                      0x0000384e start + 54

Debug info from gdb:

/tmp/mono-gdb-commands.5cfiJH: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.
=================================================================



On 1/16/11 8:05 AM, kjpou wrote:
> Here are two more for Chapter 2 entitled AnimationTypes
>
> Kenneth
>
> On 1/16/11 8:01 AM, kjpou wrote:
>> Hello all
>>
>> Here is the first program for Chapter 2 along with the diffs for the 
>> other programs.
>>
>> The chapter name is AnimationTypes
>>
>> The other three for this chapter to follow:
>>
>> Kenneth
>>
>>
>> _______________________________________________
>> Mono-osx mailing list
>> Mono-osx at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-osx
>
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110116/1966c4bc/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TransitionView.zip
Type: application/zip
Size: 126653 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20110116/1966c4bc/attachment-0001.zip 


More information about the Mono-osx mailing list