Android Question Crash Report??

Discussion in 'Android Questions' started by ilan, Jan 26, 2016.

  1. ilan

    ilan Expert Licensed User

    Does anyone know what could be the reason for that crash??

  2. JordiCP

    JordiCP Well-Known Member Licensed User

    Don't know how it applies to your code, but it talks of the same library you are using

    Your comparator is not transitive.

    Let A be the parent of B, and B be the parent of C. Since A > B and B > C, then it must be the case that A > C. However, if your comparator is invoked on A and C, it would return zero, meaning A == C. This violates the contract and hence throws the exception.

    It's rather nice of the library to detect this and let you know, rather than behave erratically.

    One way to satisfy the transitivity requirement in compareParents() is to traverse the getParent()chain instead of only looking at the immediate ancestor.

    If this is in your code, there are recommendations on how to prevent it in the same page, also that with Java6 instead of 7/8 t does not happen. But if it is in a library function and you don't have access to the arguments passed to it, I have no idea
    lemonisdead likes this.
  3. Erel

    Erel Administrator Staff Member Licensed User

    Add this code:
  4. ilan

    ilan Expert Licensed User

    Thanx erel, do i add it in activity.create?
    Should i add it to all activities?
  5. Erel

    Erel Administrator Staff Member Licensed User

    Yes and yes.
  6. capisx

    capisx Member Licensed User

    I've got many of this crash report too and also with another similiar crash report.

    I've already try to add the code that Erel mention above at the first line of Activity_Create sub but i still getting this crash report.
    Did i put the code on the wrong place?
  7. Erel

    Erel Administrator Staff Member Licensed User

    It should be the first line in Activity_Create of each of the activities.

    The error might be related to a call to DoEvents or a third party activity (such as an activity coming from an ad library).
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice