Skip to content

Crash on checkThread()  #376

Closed
Closed
@Macarse

Description

@Macarse

After some investigation of a crash we are seeing in our app, we would like to share some information.

The stacktrace is the following:

de.greenrobot.dao.DaoException: Method may be called only in owner thread, use forCurrentThread to get an instance for this thread
at de.greenrobot.dao.query.AbstractQuery.checkThread(SourceFile:80)
at de.greenrobot.dao.query.AbstractQuery.setParameter(SourceFile:70)
at de.greenrobot.dao.query.AbstractQueryWithLimit.setParameter(SourceFile:48)
at de.greenrobot.dao.query.Query.setParameter(SourceFile:30)
setParameter
setParameter

This is happening mostly on RIM devices. AbstractQueryData's forCurrentThread() is using Process.myTid() and this method might return 0. There was an attempt to fix this problem in #171 and the ticket was closed saying it was fixed with 013af9c

While that fix might have worked for Robolectric, the issue mentioned by @dcowley is real and it is still there.

Can this be revised?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions