Skip to content

Accessing currentUser on multiple threads causing deadlock #61

Closed
@eeallen1

Description

@eeallen1

When I'm launching my app, there are several places where I'm using PFUser.CurrentUser - mostly for queries, but also a couple of writes. It looks like the deadlock occurs when one thread is setting an object on currentUser while another is using it in a query, but I'm not entirely sure.

Here is a stack trace:
screen shot 2015-08-19 at 4 13 08 pm

I know that there have been similar issues opened and resolved for other releases, and it may be that 1.8 has nothing to do with it, but it only started happening in the last couple of days (after I updated).

Some more details:

  • Deadlock doesn't occur every launch, and it appears to happen much more frequently on older devices (iphone 4s) than the newer models. It almost never occurs on the simulator.
  • I've tried commenting out dozens of lines of code that the stack trace points to, but it always end up getting hung somewhere else. I haven't procedurally uncommented and tested every call to currentUser because so much code depends on it, but that'll be my next step for troubleshooting.

Edit
Is it possible that the deadlock is occurring during Facebook authentication while I'm trying to query/modify currentUser elsewhere? Take a look at this:

screen shot 2015-08-19 at 4 30 21 pm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions