iOS - Video playing gives errors - iphone

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.

Related

Sphero AR Example Crashes Randomly

I'm testing the Sphero-AR-SDK found on GitHub (https://github.com/orbotix/Sphero-AR-SDK)
When testing, I seem to have random crashes on connect.
The issue I'm trying to debug is an index out of range error.
*"*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(0x325102a3 0x3a22d97f 0x3245bb75 0x8cb42b 0x32e270f5 0x324e5683 0x324e4ee9 0x324e3cb7 0x32456ebd 0x32456d49 0x3602d2eb 0x3436c301 0x7f10 0x3188)
libc++abi.dylib: terminate called throwing an exception"*
This happens a fair amount when booting the application but not all the time (sometimes it will get through and play the game).
I was wondering if anyone else was having issues with these random crashes or have I not set it up correctly?
I've had a look at the "Other Linker Flags" in XCode too and it has -all_load.
Also, I've safely checked the only place where I could find an array object access in the .mm files (RKUNBridge.mm) has this line:
[RKDeviceSensorsData *data = [sensors_data.dataFrames objectAtIndex:0];
And I safely checked this array exists and is greater than one to double check it's not this line.
Any ideas or suggestions would be much appreciated.
Thanks for reading.

Thread 1: signal SIGABRT xcode 4.4 ios 5.1 objective-c HELP >.<

Ok so yesterday I had some trouble with this error, turned out I just needed to be patient and read through more of the book. This time I have got to the end of the project and I am getting this error at a different point.
I have isolated the line of code causing the issue but I'm not sure what the issue is!
htmlString=[htmlString stringByAppendingString: appDelegate.savedNumber];
Debug console is saying:
2012-08-09 13:06:47.235 tester[1357:c07] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSCFConstantString stringByAppendingString:]: nil argument'
*** First throw call stack:
(0x14b3022 0xeb3cd6 0x145ba48 0x145b9b9 0x941b92 0x29bd 0xdda1e 0x3c401 0x3c670 0x3c836 0x4372a 0x24c2 0x14386 0x15274 0x24183 0x24c38 0x18634 0x139def5 0x1487195 0x13ebff2 0x13ea8da 0x13e9d84 0x13e9c9b 0x14c65 0x16626 0x20e2 0x2055)
terminate called throwing an exception
Anyone have any ideas? :)
It is because appDelegate.savedNumber is nil (does not set) . And why it is nil this is another question.
Looks like exactly what's written, you're passing nil argument to the method. Check if your savedNumber is a valid string object.

XCODE: Error reading plist: stream had too few bytes

Ive developed an app for iPhone. Ive successfully tested it in the iPhone Simulator, but as soon as I run it on my test iDevice, it throws an error:
Error reading plist: stream had too few bytes, format: 1064028076
How could it have an error if it works correctly on the sim?
2012-03-23 10:40:16.791 Ask Alarm[5697:707] Error reading plist: stream had too few bytes,
format: 1064028076
2012-03-23 10:40:16.807 Ask Alarm[5697:707] 2012-03-23 17:40:16 +0000
2012-03-23 10:40:16.814 Ask Alarm[5697:707] *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '*** -[__NSCFString stringByAppendingString:]: nil
argument'
*** First throw call stack:
(0x32b818bf 0x358491e5 0x32b817b9 0x32b817db 0x3216b121 0x697dd 0x36ba57ff 0x36c063b9 0x36c06357 0x36c05c91 0x36c08661 0x36c081a7 0x36bae6b5 0x36c0961b 0x36c4f691 0x36c4e14f 0x3028e93 0x36ca8d97 0x32adb435 0x36b879eb 0x36b879a7 0x36b87985 0x36b876f5 0x36b8802d 0x36b8650f 0x36b85f01 0x36b6c4ed 0x36b6bd2d 0x337f0df3 0x32b55553 0x32b554f5 0x32b54343 0x32ad74dd 0x32ad73a5 0x337effcd 0x36b9a743 0x670ab 0x669a8)
terminate called throwing an exception(lldb)
It's either a mis-formatted plist file or something is bogus in your stringByAppendingString call.
Check both for anything obvious and if you don't see it, modify your question to add a bit of the code (both the plist and the code that includes the stringByAppendingString line)

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...

Need help fast -- CoreData error

need help desperately ahead of a demo in a few hours... App was working on my test device fine last night. Added some data (as I always do) this morning and now I get this error during a save operation:
Serious application error. Exception was caught during Core Data change processing:
*** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value
(key: _ContentChange_OldIndexPathKey) with userInfo (null)
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '*** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value
(key: _ContentChange_OldIndexPathKey)'
The funny thing is that if I download my sqlite file to my Mac and feed it into the simulator, everything works just fine. The crash only occurs on the test device.
Any ideas?
I too was encountering this error. Nullifying the NSFetchedResultsController delegate does stop it from crashing, but is not a fix. The problem seems to be specifying a sort key in the NSFetchRequest which is null for some objects. Some sort call made in NSFetchedResultsController expects none null values.
This is an old post but I will give my comment anyway :)
I have experienced similar problem and deleting the cache for the NSFethedReultController solved the problem.
[NSFetchedResultsController deleteCacheWithName:<cacheName>];