Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bind and computed bug since v3.2.1 [with example repo] #7266

Closed
QuickMick opened this issue Feb 15, 2022 · 2 comments
Closed

bind and computed bug since v3.2.1 [with example repo] #7266

QuickMick opened this issue Feb 15, 2022 · 2 comments

Comments

@QuickMick
Copy link

QuickMick commented Feb 15, 2022

Describe the bug

if you have svelte:self, bind to an object and use computed to update it or trigger render updates, svelte gets stuck in an endless loop or the rendering is blocked. ( see repository https://github.com/QuickMick/svelte-bind-computed-bug )

if you outsource this code to a function, behaviour changes: the rendering continues, but i think it still has kind of a memory leak and does a lot of stuff in the background.

This behavior has started in svelte v3.2.1. If you downgrade the svelte version in the package.json to e.g. v3.0.0, it works fine.

Reproduction

see here https://github.com/QuickMick/svelte-bind-computed-bug
there are two versions - you need to change something in the comp.svelte - one that crashes and one that does not crash but seems laggy to me. (the computed is called twice instead of once - in the example i use a recursive structure, because that is how i noticed the behavior change, but i think it is not necessary ) - uncomment version 1 and comment version 2 in comp.svelte

Logs

No response

System Info

System:
    OS: Linux 5.10 Manjaro Linux
    CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
    Memory: 14.19 GB / 31.27 GB
    Container: Yes
    Shell: 5.1.0 - /bin/bash
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Browsers:
    Chromium: 90.0.4430.72
    Firefox: 87.0
  npmPackages:
    svelte: 3.2.1 => 3.2.1

Severity

blocking an upgrade

@QuickMick QuickMick changed the title computed properties buggy in recursive structure - bug sind v3.2.1? computed properties buggy in recursive structure - bug since v3.2.1? Feb 15, 2022
@QuickMick QuickMick changed the title computed properties buggy in recursive structure - bug since v3.2.1? bind and computed bug since v3.2.1 [with example repo] Feb 16, 2022
@QuickMick
Copy link
Author

i have updated the description and added a example repo, because my original description was wrong i think

@dummdidumm
Copy link
Member

Closing as outdated, this may be fixed in Svelte 5. If not, please provide an updated reproduction, thank you.

@dummdidumm dummdidumm closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants