Home › Forums › Bug Reports and Feature Requests › Cannot read property ‘dispose’ of null
- This topic has 6 replies, 3 voices, and was last updated 7 months, 2 weeks 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:
1234var 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});-
This topic was modified 7 months, 3 weeks ago by
web.
2020-07-12 at 10:31 am #29992Alexander Kovelenov
Staff2020-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 #30036Alexander Kovelenov
StaffI made a simple test case based on your code, still no errors
Can you share a link to your project sources?
-
This reply was modified 7 months, 2 weeks ago by
Alexander Kovelenov.
2020-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()
12app.worldCubemapRes = 2048;app.updateEnvironment(app.worldMaterial);This is the error log in chrome:
1234567891011v3d.js:1 Uncaught TypeError: Cannot read property 'dispose' of nullat v3d.js:1at v3d.js:1at 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:96at v3d.js:12020-07-15 at 12:51 pm #30136Ivan Lyubovnikov
StaffI 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
-
This topic was modified 7 months, 3 weeks ago by
-
AuthorPosts
- You must be logged in to reply to this topic.