Skip to content

Conversation

@NullVoxPopuli
Copy link
Contributor

This change fixes an issue discovered by @btecu:

not ok 17 Chrome 142.0 - [73 ms] - Integration | Component | x-select: it works with multiple components on the same page
    ---
        stack: >
            Error: Attempted to associate a destroyable child with an object that is already destroying or destroyed
                at associateDestroyableChild (http://localhost:7357/assets/app-CDeM15aH.js:1776:35)
                at TryOpcode.handleException (http://localhost:7357/assets/app-CDeM15aH.js:28359:5)
                at UpdatingVMFrame.handleException (http://localhost:7357/assets/app-CDeM15aH.js:28498:52)
                at UpdatingVM.throw (http://localhost:7357/assets/app-CDeM15aH.js:28320:16)
                at Assert.evaluate (http://localhost:7357/assets/app-CDeM15aH.js:25538:42)
                at UpdatingVM._execute (http://localhost:7357/assets/app-CDeM15aH.js:28307:34)
                at http://localhost:7357/assets/app-CDeM15aH.js:28290:51
                at debug.runInTrackingTransaction (http://localhost:7357/assets/app-CDeM15aH.js:2413:19)
                at UpdatingVM.execute (http://localhost:7357/assets/app-CDeM15aH.js:28290:15)
                at RenderResultImpl.rerender (http://localhost:7357/assets/app-CDeM15aH.js:28516:8)

This would only happen in Chome and would not occur in FireFox -- but given the nature of the error message, I figure it is a problem that could show up anywhere -- we don't want our renderer to double-associate destroyable children.


I tested this change out locally on that PR and the tests pass.

An existing test started failing with this change, but I think the behavior may have been wrong.

It was a new test with the renderComponent stuff, and I've adjusted it (and the comment) to be more clear as to what I now expect.


This fix is unrelated to:


Originally PR'd here: #21001

@github-actions
Copy link

github-actions bot commented Nov 9, 2025

Estimated Asset Sizes

Diff

--- main/out.txt	2025-10-30 21:26:22.000000000 +0000
+++ pr/./pr-19219881111/out.txt	2025-11-10 03:42:46.000000000 +0000
@@ -1,41 +1,41 @@
 ╔═══════╤═══════════╤═══════════╗
 ║       │ Min       │ Gzip      ║
 ╟───────┼───────────┼───────────╢
-║ Total │ 417.63 KB │ 231.59 KB ║
+║ Total │ 417.63 KB │ 231.62 KB ║
 ╚═══════╧═══════════╧═══════════╝
 
-╔══════════════════════╤═══════════╤══════════╗
-║ @ember/*             │ Min       │ Gzip     ║
-╟──────────────────────┼───────────┼──────────╢
-║ Total                │ 238.38 KB │ 146.6 KB ║
-╟──────────────────────┼───────────┼──────────╢
-║ -internals           │ 34.55 KB  │ 24.85 KB ║
-║ application          │ 12.71 KB  │ 7.63 KB  ║
-║ array                │ 12.66 KB  │ 7.32 KB  ║
-║ canary-features      │ 304 B     │ 419 B    ║
-║ component            │ 1.07 KB   │ 1018 B   ║
-║ controller           │ 1.8 KB    │ 1.36 KB  ║
-║ debug                │ 11.4 KB   │ 7.92 KB  ║
-║ deprecated-features  │ 31 B      │ 77 B     ║
-║ destroyable          │ 561 B     │ 383 B    ║
-║ enumerable           │ 259 B     │ 387 B    ║
-║ helper               │ 823 B     │ 610 B    ║
-║ instrumentation      │ 2.43 KB   │ 1.78 KB  ║
-║ modifier             │ 669 B     │ 601 B    ║
-║ object               │ 33.78 KB  │ 20.79 KB ║
-║ owner                │ 159 B     │ 178 B    ║
-║ renderer             │ 406 B     │ 346 B    ║
-║ routing              │ 58.08 KB  │ 33.45 KB ║
-║ runloop              │ 2.2 KB    │ 1.33 KB  ║
-║ service              │ 859 B     │ 741 B    ║
-║ template             │ 430 B     │ 388 B    ║
-║ template-compilation │ 429 B     │ 366 B    ║
-║ template-compiler    │ 57.91 KB  │ 30.4 KB  ║
-║ template-factory     │ 94 B      │ 160 B    ║
-║ test                 │ 923 B     │ 627 B    ║
-║ utils                │ 3.93 KB   │ 3.5 KB   ║
-║ version              │ 55 B      │ 131 B    ║
-╚══════════════════════╧═══════════╧══════════╝
+╔══════════════════════╤═══════════╤═══════════╗
+║ @ember/*             │ Min       │ Gzip      ║
+╟──────────────────────┼───────────┼───────────╢
+║ Total                │ 238.38 KB │ 146.63 KB ║
+╟──────────────────────┼───────────┼───────────╢
+║ -internals           │ 34.55 KB  │ 24.84 KB  ║
+║ application          │ 12.71 KB  │ 7.73 KB   ║
+║ array                │ 12.66 KB  │ 7.32 KB   ║
+║ canary-features      │ 304 B     │ 419 B     ║
+║ component            │ 1.07 KB   │ 1005 B    ║
+║ controller           │ 1.8 KB    │ 1.36 KB   ║
+║ debug                │ 11.4 KB   │ 7.92 KB   ║
+║ deprecated-features  │ 31 B      │ 77 B      ║
+║ destroyable          │ 561 B     │ 383 B     ║
+║ enumerable           │ 259 B     │ 387 B     ║
+║ helper               │ 823 B     │ 599 B     ║
+║ instrumentation      │ 2.43 KB   │ 1.78 KB   ║
+║ modifier             │ 669 B     │ 586 B     ║
+║ object               │ 33.78 KB  │ 20.79 KB  ║
+║ owner                │ 159 B     │ 178 B     ║
+║ renderer             │ 406 B     │ 353 B     ║
+║ routing              │ 58.08 KB  │ 33.43 KB  ║
+║ runloop              │ 2.2 KB    │ 1.33 KB   ║
+║ service              │ 859 B     │ 741 B     ║
+║ template             │ 430 B     │ 370 B     ║
+║ template-compilation │ 429 B     │ 366 B     ║
+║ template-compiler    │ 57.91 KB  │ 30.4 KB   ║
+║ template-factory     │ 94 B      │ 160 B     ║
+║ test                 │ 923 B     │ 627 B     ║
+║ utils                │ 3.93 KB   │ 3.5 KB    ║
+║ version              │ 55 B      │ 131 B     ║
+╚══════════════════════╧═══════════╧═══════════╝
 
 ╔═════════════════╤═══════════╤══════════╗
 ║ @glimmer/*      │ Min       │ Gzip     ║

Details

This PRmain
╔═══════╤═══════════╤═══════════╗
║       │ Min       │ Gzip      ║
╟───────┼───────────┼───────────╢
║ Total │ 417.63 KB │ 231.62 KB ║
╚═══════╧═══════════╧═══════════╝

╔══════════════════════╤═══════════╤═══════════╗
║ @ember/*             │ Min       │ Gzip      ║
╟──────────────────────┼───────────┼───────────╢
║ Total                │ 238.38 KB │ 146.63 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals           │ 34.55 KB  │ 24.84 KB  ║
║ application          │ 12.71 KB  │ 7.73 KB   ║
║ array                │ 12.66 KB  │ 7.32 KB   ║
║ canary-features      │ 304 B     │ 419 B     ║
║ component            │ 1.07 KB   │ 1005 B    ║
║ controller           │ 1.8 KB    │ 1.36 KB   ║
║ debug                │ 11.4 KB   │ 7.92 KB   ║
║ deprecated-features  │ 31 B      │ 77 B      ║
║ destroyable          │ 561 B     │ 383 B     ║
║ enumerable           │ 259 B     │ 387 B     ║
║ helper               │ 823 B     │ 599 B     ║
║ instrumentation      │ 2.43 KB   │ 1.78 KB   ║
║ modifier             │ 669 B     │ 586 B     ║
║ object               │ 33.78 KB  │ 20.79 KB  ║
║ owner                │ 159 B     │ 178 B     ║
║ renderer             │ 406 B     │ 353 B     ║
║ routing              │ 58.08 KB  │ 33.43 KB  ║
║ runloop              │ 2.2 KB    │ 1.33 KB   ║
║ service              │ 859 B     │ 741 B     ║
║ template             │ 430 B     │ 370 B     ║
║ template-compilation │ 429 B     │ 366 B     ║
║ template-compiler    │ 57.91 KB  │ 30.4 KB   ║
║ template-factory     │ 94 B      │ 160 B     ║
║ test                 │ 923 B     │ 627 B     ║
║ utils                │ 3.93 KB   │ 3.5 KB    ║
║ version              │ 55 B      │ 131 B     ║
╚══════════════════════╧═══════════╧═══════════╝

╔═════════════════╤═══════════╤══════════╗
║ @glimmer/*      │ Min       │ Gzip     ║
╟─────────────────┼───────────┼──────────╢
║ Total           │ 179.25 KB │ 84.99 KB ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.19 KB  │ 5.44 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.89 KB  │ 13.23 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.63 KB  ║
║ reference       │ 5.51 KB   │ 3.18 KB  ║
║ runtime         │ 95.26 KB  │ 42.69 KB ║
║ tracking        │ 989 B     │ 961 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 15.64 KB  │ 6.86 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝
╔═══════╤═══════════╤═══════════╗
║       │ Min       │ Gzip      ║
╟───────┼───────────┼───────────╢
║ Total │ 417.63 KB │ 231.59 KB ║
╚═══════╧═══════════╧═══════════╝

╔══════════════════════╤═══════════╤══════════╗
║ @ember/*             │ Min       │ Gzip     ║
╟──────────────────────┼───────────┼──────────╢
║ Total                │ 238.38 KB │ 146.6 KB ║
╟──────────────────────┼───────────┼──────────╢
║ -internals           │ 34.55 KB  │ 24.85 KB ║
║ application          │ 12.71 KB  │ 7.63 KB  ║
║ array                │ 12.66 KB  │ 7.32 KB  ║
║ canary-features      │ 304 B     │ 419 B    ║
║ component            │ 1.07 KB   │ 1018 B   ║
║ controller           │ 1.8 KB    │ 1.36 KB  ║
║ debug                │ 11.4 KB   │ 7.92 KB  ║
║ deprecated-features  │ 31 B      │ 77 B     ║
║ destroyable          │ 561 B     │ 383 B    ║
║ enumerable           │ 259 B     │ 387 B    ║
║ helper               │ 823 B     │ 610 B    ║
║ instrumentation      │ 2.43 KB   │ 1.78 KB  ║
║ modifier             │ 669 B     │ 601 B    ║
║ object               │ 33.78 KB  │ 20.79 KB ║
║ owner                │ 159 B     │ 178 B    ║
║ renderer             │ 406 B     │ 346 B    ║
║ routing              │ 58.08 KB  │ 33.45 KB ║
║ runloop              │ 2.2 KB    │ 1.33 KB  ║
║ service              │ 859 B     │ 741 B    ║
║ template             │ 430 B     │ 388 B    ║
║ template-compilation │ 429 B     │ 366 B    ║
║ template-compiler    │ 57.91 KB  │ 30.4 KB  ║
║ template-factory     │ 94 B      │ 160 B    ║
║ test                 │ 923 B     │ 627 B    ║
║ utils                │ 3.93 KB   │ 3.5 KB   ║
║ version              │ 55 B      │ 131 B    ║
╚══════════════════════╧═══════════╧══════════╝

╔═════════════════╤═══════════╤══════════╗
║ @glimmer/*      │ Min       │ Gzip     ║
╟─────────────────┼───────────┼──────────╢
║ Total           │ 179.25 KB │ 84.99 KB ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.19 KB  │ 5.44 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.89 KB  │ 13.23 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.63 KB  ║
║ reference       │ 5.51 KB   │ 3.18 KB  ║
║ runtime         │ 95.26 KB  │ 42.69 KB ║
║ tracking        │ 989 B     │ 961 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 15.64 KB  │ 6.86 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝

@NullVoxPopuli NullVoxPopuli requested a review from ef4 November 10, 2025 03:42
@kategengler kategengler merged commit 95ebf58 into emberjs:main Nov 10, 2025
28 checks passed
@NullVoxPopuli NullVoxPopuli deleted the nvp/canary/no-render-while-destroying branch November 10, 2025 19:11
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

Successfully merging this pull request may close these issues.

4 participants