调用 [PFFacebookUtils initializeFacebook] 时解析崩溃 - semaphore_wait_trap [英] Parse crash when calling [PFFacebookUtils initializeFacebook] - semaphore_wait_trap

查看:18
本文介绍了调用 [PFFacebookUtils initializeFacebook] 时解析崩溃 - semaphore_wait_trap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从最新的 Parse 版本 (v1.6.3) 以来,我的应用程序在启动时卡住了,它遇到的最后一个断点是 [PFFacebookUtils initializeFacebook]; 如果我点击暂停并查看调试器,堆栈跟踪如下所示:

Since the latest Parse release (v1.6.3) my app gets stuck at launch, and the last breakpoint it hits is [PFFacebookUtils initializeFacebook]; If I hit pause and look at the debugger, the stack trace looks like this:

我正在按照建议在 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 中调用 [PFFacebookUtils initializeFacebook].

I'm calling [PFFacebookUtils initializeFacebook] in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions as advised.

通过谷歌搜索 semaphore_wait_trap 问题,它似乎与 Core Data 中的后台线程冲突(?)有关.但是我已经尝试注释掉我所有的后台解析查询,它仍然发生.

From googling the semaphore_wait_trap issue, it seems to be related to clashing background threads(?) in Core Data. But I've tried commenting out all my background Parse queries and it still occurs.

我尝试更新豆荚(这发生在更新之前,顺便说一句).我还可以从全新安装运行该应用程序,直到我登录到 Facebook,此时每次尝试启动时都会发生崩溃.PFUser 在查询时似乎返回正常.我也清除了我的整个数据库,但没有任何区别.

I tried updating pods (this occurred before updating, incidentally). I can also run the app from a clean install, until I log in to Facebook, at which point the crash happens every time I try to launch. The PFUser appears to be returning fine when queried. I've also cleared out my entire database but it didn't make a difference.

有人知道会发生什么吗?

Anyone know what might be going on?

推荐答案

我看到了同样的问题,发现改变这个初始化序列的顺序(我正在使用 swift)让我过去了(特别是注释掉本地数据商店也会解除封锁):

I was seeing this same issue and found that changing the order of this initialization sequence (I am using swift) got me past it (notably commenting out the local data store also unblocks it):

这会被 semaphore_wait_trap 捕获:

This gets caught in semaphore_wait_trap:

// Parse integration initialization
Parse.enableLocalDatastore()
Parse.setApplicationId("<my app id>", clientKey: "<my client key>")
PFAnalytics.trackAppOpenedWithLaunchOptions(launchOptions)
PFFacebookUtils.initializeFacebook()

这不会:

// Parse integration initialization
Parse.enableLocalDatastore()
Parse.setApplicationId("<my app id>", clientKey: "<my client key>")
PFFacebookUtils.initializeFacebook()
PFAnalytics.trackAppOpenedWithLaunchOptions(launchOptions)

不确定潜在的问题,但希望它有所帮助.

Not sure of the underlying issue but hope it helps.

这篇关于调用 [PFFacebookUtils initializeFacebook] 时解析崩溃 - semaphore_wait_trap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆