Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-5690

New ChangeApplier fails with stack overflow when applying circularly linked object into model

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: 3.0
    • Component/s: Data Binder
    • Labels:
      None

      Description

      The new ChangeApplier fixes bugs wrt use of arrays as paths, but will fail if a circularly-linked object is applied to the model since the "diff" algorithm will run away attempting to assess the change. This arose in the context of trying to insert socket.io socket objects into a model for the GPII's "browserChannel" implementation - see discussion in IRC at https://botbot.me/freenode/fluid-work/2015-06-15/?msg=41926924&page=1

      Whilst we don't currently support this form of model contents (although we may be able to in future, in conjunction with the "immutable application" model described at https://wiki.fluidproject.org/display/fluid/New+New+Notes+on+the+ChangeApplier ), we should at least supply a sensible diagnostic in this case. We should also as another line of safety have fluid.model.applyChangeStrategy bail out on any kind of exotic object (it's probable that the FLUID-5249 branch already achieves this as a result of improvements to fluid.isPlainObject).

        Attachments

          Activity

            People

            Assignee:
            antranig Antranig Basman
            Reporter:
            antranig Antranig Basman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: