Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8095608

Repeated ListProperty.bindContent() silently breaks the list

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7u6, 8u25
    • Fix Version/s: 8u40
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      Linux Ubuntu, Java 1.7.65, 1.8.25

    • Subcomponent:

      Description

      Run the program in the first comment. It prints out a plenty of a plenty of IndexOutOfBoundsException. Note that everything is running in a single thread.

      The problem is the following: it is possible to repeatedly bind a list property - no exception is thrown. But if we do it many times, the internal structures of the list property apparently get into an inconsistent state, and then add/remove operations sometimes fail with an IndexOutOfBoundsException.

      This is a very tricky error, because the repeated bind breaks the structures only sometimes, rather rarely, as can be seen from the program output. If one forgets to unbind the the list properly, it leads to rare and hard to reproduce IndexOutOfBoundsException on a different place of the application, when add/remove is called at a later point, with a seemingly unrelated stacktrace. Such exceptions are very hard to diagnose and debug.

        Attachments

          Activity

            People

            Assignee:
            vadim Vadim Pakhnushev
            Reporter:
            jmarekjfx Jan Marek (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: