Did you had any luck solving this? My bindings work ok in the simulator but the app fails on the device :(
On Tue, May 24, 2011 at 6:05 PM, Michael Brian Bentley <[email protected] > wrote: > I did a variety of things, including test whether adding > [Export("initWithCoder:")] affected the behavior of the builds. > > My class is a subclass of the class that is inside the .a; the .a has > a binding set built into a .dll. (I'm using the MGSplitViewController > source and bindings from GitHub.) > > At this point, while the .a file works fine in simulation builds, > device builds crash with an EXC_BAD_ACCESS (SIGSEGV) > KERN_PROTECTION_FAILURE at (some address) in thread 0. The .a is > being built for the correct platforms, but I'm using Xcode 4 to do > that. I don't see meaningful symbol information in this thread trace, > but I do notice that the thread 0 trace is very long, and that > there's a repetitive pattern in it: > > Thread 0 Crashed: > 0 libSystem.B.dylib 0x30d05fd4 pthread_mutex_lock + 0 > 1 bCi 0x00f91954 0x1000 + 16320852 > 2 bCi 0x00ff3564 0x1000 + 16721252 > 3 bCi 0x0100e0bc 0x1000 + 16830652 > > 4 bCi 0x0100e074 0x1000 + 16830580 > <-- repeats > 5 bCi 0x0100e654 0x1000 + 16832084 > 6 bCi 0x00f9f834 0x1000 + 16377908 > 7 bCi 0x00fa0d80 0x1000 + 16383360 > 8 bCi 0x00fcbf08 0x1000 + 16559880 > 9 bCi 0x00781364 0x1000 + 7865188 > 10 bCi 0x010849d0 0x1000 + 17316304 > 11 bCi 0x0107cb9c 0x1000 + 17283996 > 12 bCi 0x0100e12c 0x1000 + 16830764 > ... > 508 bCi 0x0100e074 0x1000 + 16830580 > <-- last repetition > 509 bCi 0x0100e654 0x1000 + 16832084 > 510 bCi 0x00f9f834 0x1000 + 16377908 > 511 bCi 0x00fa0d80 0x1000 + 16383360 > > Xcode 4 reports that it creates a different .a file for simulation > builds and device builds. > > -Mike > > >Does this class inherit from UIView? > > > >If yes, the NSCoder constructor should be like this: > >[Export("initWithCoder:")] > >public MyWhatsit(NSCoder coder) : base(coder) > > > >BUT, if the view is not loaded from a XIB, the only constructor you "need" > is: > >public MyWhatsit(IntPtr handle) : base(handle) > > > >Dimitris Tavlikos > >Software Developer > >Email: [email protected] > >Twitter: @dtavlikos > >Blog: http://software.tavlikos.com > > > > > > > > > > > >On May 23, 2011, at 5:06 PM, Michael Brian Bentley wrote: > > > >> This ought to easy but I just worked through the night... > >> > >> The app runs on the simulator, calling one version of a > >>constructor for a class > >> > >> public MyWhatsit( IntPtr handle) > >> > >> The app does not work on the device; it is complaining that it can't > >> find the initWithCoder: version. I have one defined, public > >> MyWhatsit(NSCoder coder), so I'm not sure what it is actually telling > >> me. > >> > > > -Mike > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch > -- Tiago Reis www.cardmobili.com [email protected]
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
