Hello, On Sun, Apr 8, 2012 at 11:55 AM, Mg <[email protected]> wrote: > I have an app that has been running fine on the simulator, but crashes on a > real device. > > I have a button on my main screen that in its touchupinside handler is > attempting to call presentviewcontroller to display another screen and my > app crashes with this: > > *Objective-C exception thrown. Name: NSInvalidArgumentException Reason: > -[UIDeviceRGBColor copyWithZone:]: unrecognized selector sent to instance > 0x791b00* > > I have another button on the same screen which presents a different > controller with practically identical code. This makes me suspect it is > something different in the xib file itself. > > Any ideas why this would work on the simulator but fail on the real thing?
"unrecognized selector sent to instance" can occurs when an object instance has been collected by the garbage collector. OTOH this generally occurs *way* more often on the simulator (where the GC is run very often to spot those cases) than it does on devices (still possible, just unlikely). The same error occurs on devices when it runs an earlier version of iOS than the simulator. E.g. an API is added in iOS 5.0, the simulator runs iOS 5.1 (can call it) and the devices runs iOS 4.2 (can't call it). I don't think the above explanation applies, however this answer from stackoverflow might help you: http://stackoverflow.com/q/4457209/220643 If it does not try to create a small, self-contained, test case and attach it to a bug report on http://bugzilla.xamarin.com and we'll have a look at this. Regards, Sebastien _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
