Crashes when physics object selected
Closed this issue · 4 comments
https://stackoverflow.com/questions/75306826/a-frame-inspector-disappears/75418222#75418222
Getting React error:
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
We encountered similar issues on 3dstreet-editor repo (fork of inspector). Here are the 2 related tickets and their associated PRs:
Just put in a PR to fix my issue of inspector crashing when physics object is selected:
#678
Thanks @klyap for creating the issue. I also had this error with physx but I didn't investigate it until now. Looking at your PR description, you're indeed right about the NaN check, and changing it to use Object.is fixes the issue. For physx, it's physx-material component density property that defaults to NaN.
I was thinking if we should also do this fix in Vec(2,3,4)Widget, but probably not common to have a default value of {x: NaN, y: NaN, z: NaN}
is a schema.
@vincentfretin Ahh yeah good catch. I've updated the PR with the fix for Vec(2,3,4)Widget!