Problem setting UIImageView Image - iphone

I am trying to set my imageview:
detailedEventViewController.thumbnail.image = [UIImage imageNamed:#"amnesia.png"];
but get the error:
2011-01-08 09:53:24.153 HD Pocket Vacations[24697:207] -[DetailedEventViewController thumbnail]: unrecognized selector sent to instance 0x624d820
2011-01-08 09:53:24.247 HD Pocket Vacations[24697:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DetailedEventViewController thumbnail]: unrecognized selector sent to instance 0x624d820'
My outlets are wired up correctly.

There must be a problem with your "thumbnail" property.
As such, you'll need to check:
Whether it's been correctly defined and synthesized within your interface and implementation file(s).
Whether it's an UIImageView.
The spelling on all of the above.

Related

App crash when call imei method

-[UIDevice imei]: unrecognized selector sent to instance 0x1f566990
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[UIDevice imei]: unrecognized selector sent to instance 0x1f566990'
*** First throw call stack:
(0x376962a3 0x359a697f 0x37699e07 0x37698531 0x375eff68 0xb7465 0x38986595 0x389db13b
0x389db081 0x389daf65 0x389dae89 0x389da5c9 0x389da4b1 0x389c8b93 0x389c8833 0xb34fd
0x38a520ad 0x38a5205f 0x38a5203d 0x38a518f3 0x38a51de9 0x3897a5f9 0x38967809 0x38967123
0x37b1a5a3 0x37b1a1d3 0x3766b173 0x3766b117 0x37669f99 0x375dcebd 0x375dcd49 0x37b192eb
0x389bb301 0xb38d3 0xb3028)
libc++abi.dylib: terminate called throwing an exception
Myxcode version 4.6.2 please help.
There's no method called imei on the UIDevice class as provided by Apple, so when you try to call it you get a crash.
That said, there is such a method in Erica Sadun's UIDevice extensions - perhaps you're reusing code that assumes that they're present - so if you add them to your project then your code should work as you expect.

iOS - Video playing gives errors

When I follow this tutorial, it gives me an error on the [playercontroller release]; line, so I remove it, and then it gives me these errors when I try to run it.
I tried making another app to test the video, and it works seamlessly, but it will not work in my main app. Can anyone help?
And when I reimported the framework, and tried to play the video, it gives me this error:
2012-08-17 11:27:03.174 LYWAM Tour[768:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
*** First throw call stack:
(0x1e15022 0x10fdcd6 0x1dbda48 0x1dbd9b9 0xba253b 0xba24c5 0x54ac 0x1e16e99 0x26314e 0x2630e6 0x309ade 0x309fa7 0x308d8a 0x2882cf 0x2885e6 0x26edc4 0x262634 0x16f7ef5 0x1de9195 0x1d4dff2 0x1d4c8da 0x1d4bd84 0x1d4bc9b 0x16f67d8 0x16f688a 0x260626 0x24cd 0x2435 0x1)
terminate called throwing an exception(lldb)
I take it GVE1ViewController is a class you wrote yourself? Does it definitely implement a method called GrommeVideoExcerpt1? Is what you assigned to the variable actually an instance of GVE1ViewController (or a subclass?) Put in an NSLog to check that it really is an instance of GVE1ViewController.
To do the NSLog, you need a line of the form:
NSLog(#" My controller = %#", myVar);
where myVar is whatever variable you have containing a reference to the GVE1ViewController.

PayPal Button unrecognized selector?

I am just writing code for paypal button as below in ViewDidLoad
UIButton *button = [[PayPal getInstance] getPayButtonWithTarget:self andAction:#selector(payWithPayPal) andButtonType:BUTTON_278x43];
and getting the crash as following
2011-11-17 05:41:39.541 MothProject[654:707] -[PayPal getPayButtonWithTarget:andAction:andButtonType:andButtonText:]: unrecognized selector sent to instance 0x2bd2d0
2011-11-17 05:41:39.548 MothProject[654:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PayPal getPayButtonWithTarget:andAction:andButtonType:andButtonText:]: unrecognized selector sent to instance 0x2bd2d0'
*** First throw call stack:
(0x328d78bf 0x367411e5 0x328daacb 0x328d9945 0x32834680 0x8f9b 0x311837ff 0x3118fc39 0x3118faa9 0x3118f98f 0x3118f15b 0x3118ef53 0x31183673 0x31183349 0x77ad 0x311fd565 0x31275ce7 0x37a6e943 0x328aba63 0x328ab6c9 0x328aa29f 0x3282d4dd 0x3282d3a5 0x37f6efed 0x31178743 0x2831 0x27c8)
terminate called throwing an exceptionProgram received signal: “SIGABRT”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Can't find dlopen function, so it is not possible to load shared libraries.)
I have used implemented all required delegate methods in self, and also used Delegate too,
What is issue, does anyone has idea about it?
I think you need to initialize the instance of PayPal first, using the method
-initializeWithAppID:forEnvironment:

code crashes when adding view

I copied all my iphone viewcontroller files into an a new iPad project. (I changed the sizes of each nib files etc.)
Almost all viewControllers are working except for one viewcontroller say xview.
At the line [self.view add:xview.view] the code crashes with the following log
2011-06-22 14:08:56.435 RelaxInAMinutePad[5073:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
2011-06-22 14:08:56.437 RelaxInAMinutePad[5073:207] Stack: (
47421520,
48579372,
47159051,
47158890,
1569479,
1563144,
19971,
20321,
19638,
23235,
4095877,
30247,
5636593,
3472622,
3970110,
3979456,
3970037,
3472622,
3970110,
3979456,
3974253,
3599848,
3491395,
3523032,
56414588,
46700700,
46696616,
56408221,
56408418,
3515250,
8984,
8838
)
terminate called after throwing an instance of 'NSException'
I am not using any URL or anything from my code.
I am not getting why this is caused. I am sure this is not about coding but some thing to do with resources or IB.
what may be the mistake and how to rectify?
Read the console:
reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
Somewhere you are trying to instantiate an NSURL object, but the string you pass into it is nil.
check your line
[self.view add xview.view]
it should be
[self.view addSubview xview.view]
Maybe you not add Nib-file in new project, or any other resource files...

Unrecognized selector sent to instance on UIViewController

I've got a really annoying problem, and as much as I've searched, I can't find the answer. My app is terminating when I try to view a TableView. The data source and delegate is set to the File's owner, which implements the protocol.
alt text http://grab.by/2IJV
alt text http://grab.by/2IK7
The error I'm getting looks like this:
[Session started at 2010-02-27 16:28:24 +0000.]
2010-02-27 16:28:27.209 Moola[28564:207] Unknown class FirstViewController in Interface Builder file.
2010-02-27 16:28:28.189 Moola[28564:207] *** -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x5005900
2010-02-27 16:28:28.190 Moola[28564:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x5005900'
2010-02-27 16:28:28.190 Moola[28564:207] Stack: (
40692267,
2469430537,
40961963,
40426854,
40423522,
4542959,
4550376,
4549359,
3202411,
3139508,
3189226,
3176954,
68444159,
68443501,
68441542,
68440628,
68472982,
40444146,
40231701,
40228984,
49023565,
49023762,
2840157,
9184,
9038
)
Finally, here's the implementation file (SettingsController.m) of the SettingsController class:
alt text http://grab.by/2ILu
I'm sure this is a trivial problem for a pro, but I come from a highly web-based background, and only dabbled in C a while a few years back. To be truthful, it's hurting my head.
Thanks,
Jamie
What is FirstViewController as referenced in this disconcerting log line? Could it be some leftover reference that Interface Builder is actually trying to instantiate instead of your SettingsController?
2010-02-27 16:28:27.209 Moola[28564:207] Unknown class FirstViewController in Interface Builder file.
Are you sure that the receiver is indeed a SettingsController? Try
NSLog(#"receiver's type: %#", NSStringFromClass([foo class]));
just before the call that fails (and of course change "foo" to whatever the receiver's actual name is).