Home › Forums › Bug Reports and Feature Requests › Cannot read property ‘dispose’ of null
- This topic has 6 replies, 3 voices, and was last updated 5 years, 4 months ago by
web.
-
AuthorPosts
-
2020-07-09 at 9:47 am #29876
web
CustomerI’ve got an issue creating a material on runtime. I get the error “Cannot read property ‘dispose’ of null” in the console.
However the application is running normal and the material is also created normally. But I would like to get rid of that error.Maybe it has something todo with the 3.3.0 pre1 version I’m testing.
This is the code:
var video = loadVideo('./assets/Testvideo.mp4'); var singleObj = getObjectByName('Testobject'); var texture = new v3d.VideoTexture(video); singleObj.material = new v3d.MeshStandardMaterial({ emissive : 0xFFFFFF, emissiveMap : texture, emissiveIntensity: 0.7});2020-07-12 at 10:31 am #29992
Alexander KovelenovStaff2020-07-13 at 7:59 am #30001web
CustomerAs soon as I got the last line for creating the material I get this error. At the moment the workaround I’m using is creating a “MeshLambertMaterial” instead of “MeshStandardMaterial”. With the lambert one there is no error, dont know why?
2020-07-13 at 3:03 pm #30036
Alexander KovelenovStaff2020-07-15 at 8:47 am #30125web
CustomerI think I found the issue. I’ve upped the world cubemap res on runtime. As soon as I got the updateEnvironment in the code, I get the error with the MeshStandardMaterial.
This is the code in the runCode()
app.worldCubemapRes = 2048; app.updateEnvironment(app.worldMaterial);This is the error log in chrome:
v3d.js:1 Uncaught TypeError: Cannot read property 'dispose' of null at v3d.js:1 at v3d.js:1 at Ci.traverse (v3d.js:1) at zn.traverse (v3d.js:1) at sy._traverseSceneForEnvUpdates (v3d.js:1) at sy.disposeEnvironment (v3d.js:1) at sy.updateEnvironment (v3d.js:1) at runCode (test.js?ver=0.1:227) at test.js?ver=0.1:96 at v3d.js:12020-07-15 at 12:51 pm #30136
Ivan LyubovnikovStaffI think I found the issue. I’ve upped the world cubemap res on runtime. As soon as I got the updateEnvironment in the code, I get the error with the MeshStandardMaterial.
Thanks for investigating the issue! It will be fixed in the next verge3d update.
Co-founder and lead developer at Soft8Soft.
2020-07-15 at 4:22 pm #30148web
CustomerGreat
-
AuthorPosts
- You must be logged in to reply to this topic.
