有问题的代码和“这个......在这里,因为只有通过改变PfUser用户参数PfUser当前用户,应用程序不产生问题......我忘了表明返回日志
ü2013年3月8日00崩溃类型...
-(void) {RichiamaDatiInattesa
PFQuery *EsamiInAttesa = [PFQuery queryWithClassName: @ "EsamiInAttesa"];
[EsamiInAttesa whereKey: @ "user" equalTo: [PFUser currentUser]];** //This is the problem Crash "Equal To: [PFUser currentUser]
[EsamiInAttesa countObjectsInBackgroundWithTarget: self selector: @ selector (countcallback: error :)];}
这种崩溃:04:10.650 [20120:907] 终止一个第两,未捕获的异常 'NSInvalidArgumentException',理由是:“不能对查询类型的比较:(null)的 第一掷调用堆栈: (0x31a703e7 0x3976b963 0x31a70307 0xcdb6b 0xbba53 0xa939d 0xa9117 0x3389e579 0x338ded59 0x338daaf5 0x3391c1e1 0x338df803 0x338d7833 0x3387fd1f 0x3387f7ad 0x3387f1ef 0x355975f7 0x35597227 0x31a453e7 0x31a4538b 0x31a4420f 0x319b723d 0x319b70c9 0x338d646d 0x338d32b9 0xa89bd 0x39b98b20) libc的+ + abi.dylib:终止叫做抛出异常
/////////////////// ////////////////////////////////////////////////// ////////////////////
我工作PARSE(壮观),但我无法弄清楚我错了,因为我不断从这个CRASH ....:(
终止两个未捕获异常'NSInvalidArgumentException',原因:'可以(空)'
如果我修改此查询“等于[PFUser用户]中的[PFUser当前用户]不会返回应用程序问题,并且它完美地工作,除了当我打开应用程序,第一页我需要你给我的价值当前用户,这是不可能的,而不是当前用户只能插入用户...
问题发生whe n我运行LOGOUT的时间用户和尝试再次登录...在这个时候应用程序崩溃...甚至没有屏幕显示PF登录
代码'这个,你能告诉我在哪里我错了吗?谢谢
- (void) {RichiamaDatiInattesa
PFQuery EsamiInAttesa * = [PFQuery queryWithClassName: @ "EsamiInAttesa"];
[EsamiInAttesa whereKey: @ "user" equalTo: [PFUser currentUser]];
[EsamiInAttesa countObjectsInBackgroundWithTarget: self selector: @ selector (countcallback: error :)];
}
- (void) countcallback: (NSNumber *) count error: (NSError *) error {
if (error) {
self.DisplayNumero.text = [NSString stringWithFormat: @ "% d tests are currently pending," [count intValue]];
Else {}
self.DisplayNumero.text = [NSString stringWithFormat: @ "Connection Absent"];
/* [[[UIAlertView alloc] initWithTitle: @ "Missing Information"
message: @ "Make sure you fill out all of the information!"
delegate: nil
cancelButtonTitle: @ "ok"
otherButtonTitles: nil] show]; */
}
}
你能复制你的实际代码吗? “if”实际上是错误的(你在哪里检查错误,但是相反)?哪一行引发异常? – Wain
我编辑帖子..谢谢! –
问题是什么时候没有用户登录?或者与一个临时用户? – Wain