-
Notifications
You must be signed in to change notification settings - Fork 104
undefined is not an object #52
Comments
Thank you for reaching out and pointing this problem out. Are you able to consistently reproduce the issue? |
Yes - consistent every time showPlanes is enabled for THREE.ARDebug. When showPlanes is false the error disappears. |
I can confirm this error. I have a workaround, hope it helps. |
Thanks, @ITJesse - I left a comment on your fix. This is a deeper problem as basically we are getting the events out-of-order, which can result in all kinds of badness like recreating deleted planes if we get an update after a delete. The correct fix is to handle the events on the native side where they come in the correct order and then send a batch add/update/remove event to JS along with each frame update so it can't come in out-of-order on the JS side. |
@ITJesse I left another comment - would like to get a band-aid in there but I think the best fix is to change onPlaneUpdated_, where the crash happens, to just ignore the update if the plane doesn't exist. That will prevent us from leaking planes if the update/delete come in reverse order. Do you want to make that fix? |
I will try it later. |
@lincolnfrog I have done some research these days. And I found that it maybe caused by a "dummy restart" of ARSession. See here. All of the planes had found is still left in the native side. This will cause the data to be out of sync between native and WKWebkit side after a web page reload happened (maybe out-of-memory, refresh, and so on). So when we found a plane again, the native will fire a onPlaneUpdate event instead of a onPlaneAdded event which we expect. |
Hi - Very nice project here. I'm exploring your examples and I keep getting the following error on plane finder example. I am on WebARonARKit, ios 11.2.5 three.js .89, and three.ar.js 1.7
The text was updated successfully, but these errors were encountered: