-
Notifications
You must be signed in to change notification settings - Fork 204
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
React UI disappear when selecting a entity with texture on aframe 1.6.0 (works ok on aframe 1.5.0) #722
Comments
on aframe 1.5.0 on aframe 1.6.0 |
is getting the value with entity.getDOMAttribute('material').src so that's the resolved selector.
and in
it's getting the value in a different way, so that's already fishy. It should just take again this.props.value .
Even if I rewrite the react component to use componentDidUpdate(prevProps) {
// This will be triggered typically when the element is changed directly with
// element.setAttribute.
if (!Object.is(this.props.value, prevProps.value)) {
this.setValue(this.props.value);
}
} similar to the other widgets, I get an error when selecting a new texture from the modal and a different error from 1.6.0 and master, but that may be a different issue. |
@vincentfretin This is expected, parsing of properties now happens earlier and is stored to avoid repeated parsing as that just waste cycles and often includes allocations. The For Either way, there is no guarantee that a string was used in the first place. It's perfectly valid to directly feed an |
Thanks @mrxz for the insights.
This is not what I see here, selector type used on material src is giving the I see now that |
That's because
There is a bug in 1.6.0 (fixed on master: aframevr/aframe#5529) that can cause issues when changing textures. Depending on the state of the texture in Three, replacing the texture might fail or could otherwise cause issues when disposing. So I'd first try to debug the issue with A-Frame master to rule out the above bug. |
On aframe 1.6.0, the threejs error is indeed aframevr/aframe#5529 and I don't have it on master.
|
That's probably a regression from aframevr/aframe#5454 |
or maybe not, your changes didn't touch the |
Not sure, I wasn't able reproduce the issue in a plain A-Frame project. Placing a break point in
So something in the inspector probably triggers this second update. |
Oh... found it. It's related to the fact that the example scene has |
@mrxz I just tested again my branch #723 |
@vincentfretin It seems that the master builds aren't being updated any more (Notice the last commit date here: https://github.com/aframevr/aframe/tree/master/dist). While the build bot still makes changes and commits, it doesn't actually update the files in @dmarcos Any idea what is up with the build bot? |
I was messing around with node versions and stuff and had to reboot the server and I might had screwed things up. Sorry. I’ll look into it |
I guess you played with the node version because of aframe-site, you should probably merge aframevr/aframe-site#539 so you can use a more recent version of node on the aws machine instead of using |
@mrxz With aframe master build I copied over manually, it seems there is an edge case that is not handled. You can execute in the console |
@vincentfretin Found the bug, there's indeed an edge case when "unsetting" a value. These are now recorded as This does mean a small change in behaviour where The test coverage of |
Tested on the index.html from this repo, on aframe 1.5.0 no issue, on aframe 1.6.0, when selecting an entity with a texture, the cube or the floor, we get the stacktrace
and the React UI disappear.
in TextureWidget.js:206:12
on aframe 1.6.0, it gives
<img id="crateImg" src="https://aframe.io/sample-assets/assets/images/wood/crate.gif" crossorigin="true">, '#crateImg'
on aframe 1.5.0, it gives
#crateImg, #crateImg
The text was updated successfully, but these errors were encountered: