In Mountain Lion (Fresh installation and not upgrade from 10.6 or 10.7), Im facing the issue while m trying to create a QTMovie, with the following exception:
2012-08-17 15:34:49.434 DemoApp[15995:303] Failed to communicate with qtkitserver:
Connection invalid
2012-08-17 15:34:49.434 DemoApp [15995:303] Failed to initializeServer(), returned 5
2012-08-17 15:34:55.614 DemoApp [15995:303] Error - Error Domain=NSOSStatusErrorDomain Code=-2012
"The movie contains an invalid data reference." (invalidDataRef)
UserInfo=0x108ae9ca0 {NSLocalizedDescription=The movie contains an invalid data reference.}
My code is as follows:
NSError *error = nil;
movie = [QTMovie movieWithURL:mediaURL error:&error];
NSLog(#"Error - %#", error);
But the 'movie' object is nil. Can anyone help me on this.
Thanks in advance,
Related
Context: parse.com CloudCode, executing beforeSave() trigger on data object object update.
Getting a rash of unexplained errors in simple trigger function (code below). The errors are mostly
Result: Uncaught undefined
but there are also several
Result: Execution timed out
The code is simple, I have checked it to the point where I don't think this is an error due to the code, but including it anyway since I know people will ask to see it.
This seems (seems!) to be an issue in Parse itself, which I've been unable to solve.
Parse.Cloud.beforeSave("LogoItem", function(request, response) {
var name = request.object.get("productName");
if (typeof name == "undefined") {
name = "";
}
request.object.set("lowercaseName", name.toLowerCase());
response.success(); // Tells parse not to cancel save
});
My question is, has anyone seen this and been able to get any handle on a solution?
Below is some additional detail (logs from parse) that likely won't be too useful (but never know)...
E2016-03-14T14:12:26.306Z] - v643 Ran job ShopSenseJob with:
Input: {"plan":"paid"}
Result: ERROR: startDownloadItems() failed with error [undefined: undefined] undefined: undefined
E2016-03-14T14:11:01.536Z] - v643 before_save triggered for LogoItem as master:
Input: {"original":{"activeURL":"http://api.shopstyle.com/action/apiVisitRetailer?id=486671765\u0026pid=uid4009-26060253-59","category":5,"createdAt":"2016-03-14T13:41:07.487Z","imageURL":"https://resources.shopstyle.com/pim/aa/92/aa9286b799d7640f276657fa5e41ee92_best.jpg","importMarkerTag":6624,"lowercaseName":"mid rise skinny with knee holes in marie vintage blue","objectId":"8o9e8nMF7m","productName":"Mid Rise Skinny With Knee Holes In Marie Vintage Blue","referenceURL":"http://www.shopstyle.com/p/7-for-all-mankind-mid-rise-skinny-with-knee-holes-in-marie-vintage-blue/486671765?pid=uid4009-26060253-59","ssBrandId":3,"ssBrandName":"7 For All Mankind","ssDate":{"__type":"Date","iso":"2014-12-05T00:00:00.000Z"},"ssId":486671765,"ssRetailerId":193,"thumbnailURL":"https://resources.shopstyle.com/pim/aa/92/aa9286b799d7640f276657fa5e41ee92_best.jpg","updatedAt":"2016-03-14T13:41:07.487Z"},"update":{"importMarkerTag":1556}}
Result: Execution timed out
E2016-03-14T14:10:21.498Z] - v643 Ran job ShopSenseJob with:
Input: {}
Result: ERROR: startDownloadItems() failed with error [undefined: undefined] undefined: undefined
E2016-03-14T14:08:18.638Z] - v643 before_save triggered for LogoItem as master:
Input: {"original":{"activeURL":"http://api.shopstyle.com/action/apiVisitRetailer?id=490062821\u0026pid=uid4009-26060253-59","category":2,"createdAt":"2016-03-14T13:40:12.971Z","imageURL":"https://resources.shopstyle.com/pim/20/cb/20cb7387834dd02ac9d950bde0f57b83_best.jpg","importMarkerTag":1556,"lowercaseName":"baggu basic tote in brown","objectId":"I4UTiUMnUG","productName":"Baggu Basic Tote In Brown","referenceURL":"http://www.shopstyle.com/p/baggu-basic-tote-in-brown/490062821?pid=uid4009-26060253-59","ssBrandId":-1,"ssBrandName":"","ssDate":{"__type":"Date","iso":"2014-12-03T00:00:00.000Z"},"ssId":490062821,"ssRetailerId":193,"thumbnailURL":"https://resources.shopstyle.com/pim/20/cb/20cb7387834dd02ac9d950bde0f57b83_best.jpg","updatedAt":"2016-03-14T14:06:12.708Z"},"update":{"importMarkerTag":1556}}
Result: Uncaught undefined
E2016-03-14T14:08:18.225Z] - v643 Ran job ShopSenseJob with:
Input: {}
Result: ERROR: startDownloadItems() failed with error [undefined: undefined] undefined: undefined
E2016-03-14T14:06:12.824Z] - v643 before_save triggered for LogoItem as master:
Input: {"original":{"activeURL":"http://api.shopstyle.com/action/apiVisitRetailer?id=489915836\u0026pid=uid4009-26060253-59","category":2,"createdAt":"2016-03-14T13:40:13.193Z","imageURL":"https://resources.shopstyle.com/pim/14/ef/14ef17ff769227c4293892e770fcf50a_best.jpg","importMarkerTag":1556,"lowercaseName":"basic tote in black","objectId":"JQ7GuRjfgH","productName":"Basic Tote In Black","referenceURL":"http://www.shopstyle.com/p/baggu-basic-tote-in-black/489915836?pid=uid4009-26060253-59","ssBrandId":25820,"ssBrandName":"Baggu","ssDate":{"__type":"Date","iso":"2014-12-02T00:00:00.000Z"},"ssId":489915836,"ssRetailerId":193,"thumbnailURL":"https://resources.shopstyle.com/pim/14/ef/14ef17ff769227c4293892e770fcf50a_best.jpg","updatedAt":"2016-03-14T14:06:10.013Z"},"update":{"importMarkerTag":1556}}
Result: Execution timed out
E2016-03-14T14:05:23.844Z] - v643 Ran job ShopSenseJob with:
Input: {}
Result: ERROR: startDownloadItems() failed with error [undefined: undefined] undefined: undefined
I was using RAMAnimatedTabBarController Module from here:
https://github.com/Ramotion/animated-tab-bar
I developed my entire application in swift 1.2 using Xcode 6 and the app was running perfectly . I wanted to try out "side loading" of my app using Xcode 7 which has swift 2.0. I had too many errors and I managed to solve most of the errors but three.
1) This line of code which is from that RAMAnimatedTabBarController module is throwing an error saying the function can't be evoked, when this perfectly compiled in Xcode 6:
var constranints = NSLayoutConstraint.constraintsWithVisualFormat(formatString,options:NSLayoutFormatOptions.DirectionRightToLeft,metrics: nil,views: containersDict as [NSObject : AnyObject])
the compiler error for this was:
Cannot invoke 'constraintsWithVisualFormat' with an argument list of
type '(String, options: NSLayoutFormatOptions, metrics: nil, views:
[NSObject : AnyObject])'
2) Another unusual error was thrown:
linker command failed with exit code 1 (use -v to see invocation)
3) And another:
(null): error: cannot parse the debug map for
"/Users/Rakshith/Library/Developer/Xcode/DerivedData/Blubot-heabwwmhqxxvctaabxkwcpgzsadx/Build/Intermediates/SwiftMigration/Blubot/Products/Debug-iphonesimulator/BlubotTests.xctest/BlubotTests":
No such file or directory
What is actually wrong with my project? It is still set to iOS 8.3.
Disable BitCode
Build Settings -> BitCode
I managed to correct the 2nd and 3rd error which most of you probably will face when you're running Xcode 7 Beta as well as Xcode 6.
Just solve these two errors by following the steps mentioned in this tread:
Xcode Version 6.1 (6A1030) - Apple Match O-Linker Error - Building
Try this method:
func createViewContainers() -> [String: UIView] {
var containersDict = [String: UIView]()
guard let tabBarItems = tabBar.items else
{
return containersDict
}
let itemsCount: Int = tabBarItems.count - 1
for index in 0...itemsCount {
let viewContainer = createViewContainer()
containersDict["container\(index)"] = viewContainer
}
var formatString = "H:|-(0)-[container0]"
for index in 1...itemsCount {
formatString += "-(0)-[container\(index)(==container0)]"
}
formatString += "-(0)-|"
let constranints = NSLayoutConstraint.constraintsWithVisualFormat(formatString,
options:NSLayoutFormatOptions.DirectionRightToLeft,
metrics: nil,
views: containersDict)
view.addConstraints(constranints)
return containersDict
}
how about to change the small code from "containersDict as [NSObject : AnyObject]" to "containersDict as [String : AnyObject]".
then I solved the issue above method.
Below code is not working with 64-bit architecture and IOS-8.0 version
CGRect r1 = [[[signature.rawPoints objectAtIndex:i]objectAtIndex:j] CGRectValue];
Error:
2015-06-04 19:18:45.933 MySampleCloset UAT[40174:865394]
-[T1SignaturePoint CGRectValue]: unrecognized selector sent to instance 0x7f90d86b75a0 2015-06-04 19:18:45.977 MySampleCloset
UAT[40174:865394] * Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[T1SignaturePoint
CGRectValue]: unrecognized selector sent to instance 0x7f90d86b75a0'
* First throw call stack:
Please suggest the solution for this issue?
As a part of porting the application to 64bit, we have changed IOS version to 8.2 then we are getting this issue.
Pl see the outputs for 32bit and 64bits for "signature.rawPoints"
32bit IOS less than 8.0 version output :
(
"NSRect: {{130, 142.5}, {2.3333333, 100}}",
"NSRect: {{136, 139.5}, {2.4990008, 101}}",
"NSRect: {{152.25, 131}, {2.0691545, 102}}",
"NSRect: {{169.75, 121}, {1.7328094, 103}}",
"NSRect: {{185.25, 111}, {1.5653242, 104}}",
"NSRect: {{196.125, 104}, {1.6099705, 105}}",
"NSRect: {{200.75, 101.375}, {1.9532523, 106}}"
),
64bit IOS8.2 version output:
(
"\nlocation: 87.000000,112.000000\nvelocity: 0.000000,0.000000\nacceleration: 0.000000,0.000000\ntimestamp: 19476.794956\npressure: 1.000000\ndiameter: 4.666667\nid: 100",
"\nlocation: 88.000000,116.000000\nvelocity: 22.341108,89.364433\nacceleration: 499.125115,1996.500461\ntimestamp: 19476.839717\npressure: 1.000000\ndiameter: 5.006714\nid: 101",
"\nlocation: 92.000000,125.000000\nvelocity: 228.450167,514.012876\nacceleration: 11771.412252,24252.751985\ntimestamp: 19476.857226\npressure: 1.000000\ndiameter: 4.700317\nid: 102",
"\nlocation: 97.000000,134.000000\nvelocity: 298.178096,536.720573\nacceleration: 4158.268213,1354.187550\ntimestamp: 19476.873995\npressure: 1.000000\ndiameter: 4.437694\nid: 103")
In fact we need to get the rect values for the below code
CGRect r1 = [[[signature.rawPoints objectAtIndex:i]objectAtIndex:j] CGRectValue];
when I tried to print the below code with IOS less than 8.0 version
Code: [[signature.rawPoints objectAtIndex:i]objectAtIndex:j] CGRectValue]
output : {130, 142.5}
But with IOS version 8.2 and with 64bit we are getting following output
OUTPUT:
location: 87.000000,112.000000
velocity: 0.000000,0.000000
acceleration: 0.000000,0.000000
timestamp: 19476.794956
And when we execute the following code, we are getting the following error
Code: CGRect r1 = [[[signature.rawPoints objectAtIndex:i]objectAtIndex:j] CGRectValue];
Error:
2015-06-04 19:18:45.933 MySampleCloset UAT[40174:865394] -[T1SignaturePoint CGRectValue]: unrecognized selector sent to instance 0x7f90d86b75a0 2015-06-04 19:18:45.977 MySampleCloset UAT[40174:865394] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[T1SignaturePoint CGRectValue]: unrecognized selector sent to instance 0x7f90d86b75a0'
I'm trying to build a response descriptor for calls to the Dropbox metadata API.
Using the DBMetadata class from the Dropbox OS X SDK, here is my mapping:
RKObjectMapping *metadataMapping;
metadataMapping = [RKObjectMapping mappingForClass:[DBMetadata class]];
[metadataMapping addAttributeMappingsFromDictionary:#{#"thumb_exists": #"thumbnailExists",
#"bytes" : #"totalBytes",
#"modified" : #"lastModifiedDate",
#"client_mtime": #"clientMtime",
#"path" : #"path",
#"is_dir" : #"isDirectory",
#"hash" : #"hash",
#"size" : #"humanReadableSize",
#"root" : #"root",
#"icon" : #"icon",
#"rev" : #"rev",
#"revision" : #"revision",
#"is_deleted" : #"isDeleted"}];
[metadataMapping addRelationshipMappingWithSourceKeyPath:#"contents"
mapping:metadataMapping];
Here is my Response Descriptor (As much as I'd like to, I can't use :root:path, see NOTE 1):
RKResponseDescriptor *metadataResponse;
metadataResponse = [RKResponseDescriptor responseDescriptorWithMapping:metadataMapping
method:RKRequestMethodGET
pathPattern:#"metadata/dropbox:path"
keyPath:nil
statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];
[self.manager addResponseDescriptor:metadataResponse];
The manager is setup as:
NSURL *baseAPIURL = [NSURL URLWithString:[NSString stringWithFormat:#"%#://%#/%#/", kDBProtocolHTTPS, kDBDropboxAPIHost, kDBDropboxAPIVersion]];
self.manager = [RKObjectManager managerWithBaseURL:baseAPIURL];
self.manager.requestSerializationMIMEType = RKMIMETypeJSON;
The problem is that the #"metadata/dropbox:path" path pattern always fails:
DBMetadata *root;
root = [[DBMetadata alloc] initWithDictionary:#{#"root": #"dropbox",
#"path": #"/"}];
[self.manager getObject:root
path:#"metadata/dropbox/"
parameters:#{#"list": #"false"}
success:...
failure:...];
Result:
E restkit.network:RKObjectRequestOperation.m:213 GET
'https://api.dropbox.com/1/metadata/dropbox/?list=false' (200 OK / 0
objects) [request=0.0957s mapping=0.0000s total=0.0968s]: Error
Domain=org.restkit.RestKit.ErrorDomain Code=1001 "No response
descriptors match the response loaded." UserInfo=0x6000000ee900
{NSLocalizedFailureReason=A 200 response was loaded from the URL
'https://api.dropbox.com/1/metadata/dropbox/?list=false', which failed
to match all (0) response descriptors:,
NSErrorFailingURLStringKey=https://api.dropbox.com/1/metadata/dropbox/?list=false,
NSErrorFailingURLKey=https://api.dropbox.com/1/metadata/dropbox/?list=false,
NSUnderlyingError=0x6000000569b0 "No mappable object representations
were found at the key paths searched.", keyPath=null,
NSLocalizedDescription=No response descriptors match the response
loaded.}
But if I set the path pattern in the response descriptor to a static string (#"metadata/dropbox/"), it works:
I restkit.network:RKObjectRequestOperation.m:220 GET
'https://api.dropbox.com/1/metadata/dropbox/?list=false' (200 OK / 1
objects) [request=0.1027s mapping=0.0014s total=0.1034s]
Is it not possible to pass "/" as a path pattern parameter?
I also noticed that the error says that the response failed to match all (0) response descriptors. Shouldn't it be (1) in this case?
I have a error help me please
2013-02-21 18:43:54.471 BPApp[12574:c07]
*** Assertion failure in -[MainViewController saveEntry:], /Users/Apple/Desktop/BPApp/BPApp/MainViewController.m:66
2013-02-21 18:43:54.473 BPApp[12574:c07] ***
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not update table'
*** First throw call stack:
(0x2091012 0x119ee7e 0x2090e78 0xc34f35 0x313d 0x11b2705 0xe9920 0xe98b8 0x1aa671 0x1aabcf 0x1a9d38 0x11933f 0x119552 0xf73aa 0xe8cf8 0x1fecdf9 0x1fecad0 0x2006bf5 0x2006962 0x2037bb6 0x2036f44 0x2036e1b 0x1feb7e3 0x1feb668 0xe665c 0x263d 0x2565)
libc++abi.dylib: terminate called throwing an exception.
(IBAction)saveEntry:(id)sender
{
int systolic = [systolicText.text intValue];
int diastolic = [diastolicText.text intValue];
NSString *comments = commentsText.text;
NSDate *theDate = [NSDate date];
NSString *sql = [NSString stringWithFormat:#"INSERT INTO summary('theDate', 'systolic', 'diastolic', 'comments') VALUES ('%#', '%d', '%d', '%#')", theDate, systolic, diastolic, comments];
char *err;
if (sqlite3_exec(db, [sql UTF8String], NULL, NULL, &err) !=SQLITE_OK) {
sqlite3_close(db);
NSAssert(0, #"Could not update table");
}else{
NSLog(#"table updated");
}
systolicText.text =#"";
diastolicText.text =#"";
commentsText.text =#"";
}
is mymainviewcontroller.m
As your error saying , go to the function saveEntry in the MainViewController and put the break point at the starting line of the saveEntry function , compile the code line by line . Then you can get the error at which line you are getting .
The issue is your use of NSAssert() which should only be used to detect and reject silly developer mistakes (that we are constantly making).
You should not use NSAssert() for failures that can occur at runtime, and any database interaction can fail.
Instead you should put that code into a method that returns BOOL and return NO if the insert fails. You should also log the reason for the failure, which you can get from sqlite3 using the function sqlite3_errmsg() (reference).
After that you need to handle the error by doing anything appropriate to your application; perhaps displaying an alert view and then closing the app, or retrying with different values or, well, anything you can think of to resolve the issue with the least discomfort to the user.