Parsing data when calling [PFFacebookUtils initializeFacebook] - semaphore_wait_trap

Since the last release of Parse (v1.6.3), my application gets stuck at startup, and the last breakpoint it clicks on is [PFFacebookUtils initializeFacebook]; If I hit a pause and look at the debugger, the stack trace looks like this:

enter image description here

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

Due to the semaphore_wait_trap password problem, it seems to be due to a collision of background threads (?) In Core Data. But I tried to comment on all my queries in Parse Parse, and this is still happening.

I tried updating the containers (this happened before the update, by the way). I can also launch the application from a clean installation until I log in to Facebook, and at that moment the crash occurs every time I try to launch. It seems that PFUser is returning when requested. I also cleaned up my entire database, but that did not affect.

Does anyone know what could happen?

+7
ios objective-c semaphore pfuser
source share
2 answers

I saw the same problem and found that changing the order of this initialization sequence (I use fast) made me go past it (especially, commenting on the local data store also unlocks it):

This gets into semaphore_wait_trap:

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

It does not mean:

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

Not sure about the underlying problem, but hope this helps.

+8
source share

It seems to be fixed with parse 1.7.2

According to v1.7.2 - April 27, 2015

New: Local data exchange for extensions and WatchKit. Improved zero-value annotations for ParseFacebookUtils.
Fixed: logOutInBackground with a block callback not called in the main thread. Fixed: Potential compilation error using import for PFSubclassing.h.
Fixed: not constant currentUser when saving automatic user via saveEventually.
Bugfix: A rare deadlock scenario using ParseFacebookUtils and currentUser.
Fixed: A rare problem with binding several objects in a row to the same output.
Bugfix: A rare scenario when a user could not be connected to Facebook.
Increased local storage performance and reliability. Productivity increase.
Other minor bug fixes.

+1
source share

All Articles