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

Helpers disposal issue #912

Open
5 tasks done
alvarosabu opened this issue Jan 31, 2025 · 0 comments · May be fixed by #913
Open
5 tasks done

Helpers disposal issue #912

alvarosabu opened this issue Jan 31, 2025 · 0 comments · May be fixed by #913
Assignees
Labels
p4-important-bug Violate documented behavior or significantly improve performance (priority)

Comments

@alvarosabu
Copy link
Member

Describe the bug

Whenever we unmount the TresCanvas on route change, for example, we are recursively disposing and deleting scene references. This seems to interfere with Helper's own disposal cycle.

chunk-TMRGR37B.js?v=d91265db:20290 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'dispose')
    at DirectionalLightHelper.dispose (chunk-TMRGR37B.js?v=d91265db:20290:30)
    at disposeObject3D (index.ts:302:14)
    at index.ts:294:29
    at Array.forEach (<anonymous>)
    at disposeObject3D (index.ts:294:12)
    at dispose (TresCanvas.vue:162:3)
    at unmountCanvas (TresCanvas.vue:183:3)

Reproduction

Internal

Steps to reproduce

  1. Add a helper to the scene
  2. Change route.

System Info

System:
    OS: macOS 15.2
    CPU: (8) arm64 Apple M1 Pro
    Memory: 192.69 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.4 - /usr/local/bin/npm
    pnpm: 9.15.4 - ~/Library/pnpm/pnpm
    bun: 1.0.2 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 120.1.61.116
    Chrome: 132.0.6834.160
    Safari: 18.2
  npmPackages:
    @tresjs/cientos: 4.0.3 => 4.0.3 
    @tresjs/core: workspace:^ => 4.3.2 
    @tresjs/leches: https://pkg.pr.new/@tresjs/leches@9ad0cd3 => 0.14.1

Used Package Manager

pnpm

Code of Conduct

@alvarosabu alvarosabu added the p4-important-bug Violate documented behavior or significantly improve performance (priority) label Jan 31, 2025
@alvarosabu alvarosabu self-assigned this Jan 31, 2025
@alvarosabu alvarosabu linked a pull request Feb 1, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4-important-bug Violate documented behavior or significantly improve performance (priority)
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant