model-viewer icon indicating copy to clipboard operation
model-viewer copied to clipboard

Changing src reloads/crashes the page

Open TheDino000 opened this issue 6 years ago • 6 comments

Description

To test this behaviour I've used the example code from modelviewer.dev along with models from Smithsonians open gallery (https://3d.si.edu/explore). When changing the src property 3-4 times, the page reloads/crashes. I've downloaded models from modelviewer.dev to make sure it's not the models, but the page reloaded/crashed after 10-15 times of chaning the src. Keep chaning the src until it reloads. With other models (larger perhaps?) it happens very quickly (3-4 times). It doesn't happen on desktop, only on Android and iOS.

Edit: Watching RAM on PC makes me realize that Memory is going up every time I change the src. Which probably leads to out of memory on mobile.

Live Demo

https://www.deltareality.com/webar/smithsonian-gallery/ Open this on mobile device or Chrome inspection toolbar for mobile

Version

  • model-viewer: v1.3.0

Browser Affected

  • [x ] Chrome
  • [ ] Edge
  • [ ] Firefox
  • [ ] IE
  • [ x] Safari

OS

  • [ x] Android
  • [ x] iOS
  • [ ] Linux
  • [ ] MacOS
  • [ ] Windows

TheDino000 avatar Oct 28 '20 08:10 TheDino000

@elalish any update on this? I am also facing the same issue where in the browser (chrome and Safari) crashes after changing the src 3 times

v-prgmr avatar Jan 18 '21 23:01 v-prgmr

I believe there is likely a memory leak; I was not able to find its source (or to get reliable feedback from dev tools) the last time I hunted for it. It's probably time to try again. If anyone loves hunting memory leaks in JS, help would be most appreciated 🙏.

elalish avatar Jan 19 '21 20:01 elalish

I believe that this issue still isn't resolved as of 3.0.2.

designbyadrian avatar Jun 15 '23 12:06 designbyadrian

Hi @designbyadrian, can you give us the repro steps so we can start debugging?

diegoteran avatar Jun 16 '23 17:06 diegoteran

@diegoteran Hello! Thank you for replying! I'm trying to create scenes that don't contain client models so I can create a test case. Shall I create a new ticket with a CodePen (or similar) URL when I'm done?

designbyadrian avatar Jun 18 '23 13:06 designbyadrian

@designbyadrian Yes, please! Filing a separate Issue and filling all the fields would be the most helpful for us, since we already closed this ticket.

diegoteran avatar Jun 20 '23 17:06 diegoteran