Light Obstacle Error

Hello. There seems to be a huge problem with the Light Obstacle Behavior. When you use Lights in your Scene and you add the Behavior to an object, a error message pops up:
"A crash or error happened in the game.
If you’re using JavaScript, verify your code. Otherwise, this might be an issue with GDevelop - consider reporting a bug. Full error is: Cannot read properties of undefined (reading ‘vertex’)

TypeError: Cannot read properties of undefined (reading ‘vertex’)
at f.computeLightVertices (file:///var/folders/b/fdhm834j63l1y3knvx0ggg000000gp/T/GDTMP-502/preview/Extensions/Lighting/lightruntimeobject-pixi-renderer.js:1:7996)
at f.updateBuffers (file:///var/folders/b/fdhm834j63l1y3knvx0ggg000000gp/T/GDTMP-502/preview/Extensions/Lighting/lightruntimeobject-pixi-renderer.js:1:4371)
at f.ensureUpToDate (file:///var/folders/b_/fdhm834j63l1y3knvx0ggg000000gp/T/GDTMP-502/preview/Extensions/Lighting/lightruntimeobject-pixi-renderer.js:1:1480)
at f.updateDebugMode (file:///var/folders/b_/fdhm834j63l1y3knvx0ggg000000gp/T/GDTMP-502/preview/Extensions/Lighting/lightruntimeobject-pixi-renderer.js:1:3034)
at new f (file:///var/folders/b_/fdhm834j63l1y3knvx0ggg000000gp/T/GDTMP-502/preview/Extensions/Lighting/lightruntimeobject-pixi-renderer.js:1:801)
at new o (file:///var/folders/b_/fdhm834j63l1y3knvx0ggg000000gp/T/GDTMP-502/preview/Extensions/Lighting/lightruntimeobject.js:1:328)
at createObject (file:///var/folders/b_/fdhm834j63l1y3knvx0ggg000000gp/T/GDTMP-502/preview/RuntimeInstanceContainer.js:1:5526)
at Object.g.doCreateObjectOnScene (file:///var/folders/b_/fdhm834j63l1y3knvx0ggg000000gp/T/GDTMP-502/preview/events-tools/objecttools.js:1:4270)
at Object.g.createObjectOnScene (file:///var/folders/b_/fdhm834j63l1y3knvx0ggg000000gp/T/GDTMP-502/preview/events-tools/objecttools.js:1:4493)
at Object.gdjs.SpielSzeneCode.eventsList10 (file:///var/folders/b_/fdhm834j63l1y3knvx0ggg000000gp/T/GDTMP-502/preview/code0.js:846:24)"

Could someone please find out why this is happening? I am using the newest Version of GDevelop and i am using a MacBook Pro with 2.2 GHz 6-Core Intel Core i7 and MacOs 14.2.1

Hi, are your light obstacles using the automatic collision mask? If yes, can you try using a manual one.

1 Like

Thanks. I will try that.

hi,

I googled and was pointed to this thread. After todays Update of GDevelop to

This version of GDevelop is: 5.3.196 (editor full version: 5.3.196-5c66623631083caf5aaf2f2d5629329a6c314ba2, core version: 4.0.99-0-release)

I’m having the same problem. Can’t tell if it has something to do with the light obsacles as supposed. Still I updated my colission masks as suggested. I don’t know if it worked for Mr_Montogoronto.

I can say that I didn’t have any problem prior to the update. The behaviour worked fine. Even with a non convex collision mask (which I corrected, but didn’t help).

For me this error occurs sometimes when I fire a bullet - strange. The bullet, actually a rocket, has an attached light to it. I disabled it, but that didn’t solve the problem either.

TypeError: Cannot read properties of undefined (reading 'vertex')
    at f._computeLightVertices (file:///C:/Users/xxxx/AppData/Local/Temp/GDTMP--1/preview/Extensions/Lighting/lightruntimeobject-pixi-renderer.js:1:7996)
    at f._updateBuffers (file:///C:/Users/xxxx/AppData/Local/Temp/GDTMP--1/preview/Extensions/Lighting/lightruntimeobject-pixi-renderer.js:1:4371)
    at f.ensureUpToDate (file:///C:/Users/xxxx/AppData/Local/Temp/GDTMP--1/preview/Extensions/Lighting/lightruntimeobject-pixi-renderer.js:1:1480)
    at f.updateDebugMode (file:///C:/Users/xxxx/AppData/Local/Temp/GDTMP--1/preview/Extensions/Lighting/lightruntimeobject-pixi-renderer.js:1:3034)
    at new f (file:///C:/Users/xxxx/AppData/Local/Temp/GDTMP--1/preview/Extensions/Lighting/lightruntimeobject-pixi-renderer.js:1:801)
    at new o (file:///C:/Users/xxxx/AppData/Local/Temp/GDTMP--1/preview/Extensions/Lighting/lightruntimeobject.js:1:328)
    at createObject (file:///C:/Users/xxxx/AppData/Local/Temp/GDTMP--1/preview/RuntimeInstanceContainer.js:1:5517)
    at Object.g.doCreateObjectOnScene (file:///C:/Users/xxxx/AppData/Local/Temp/GDTMP--1/preview/events-tools/objecttools.js:1:4270)
    at Object.g.createObjectOnScene (file:///C:/Users/xxxx/AppData/Local/Temp/GDTMP--1/preview/events-tools/objecttools.js:1:4493)
    at Object.gdjs.Planet_32DefenceCode.eventsList18 (file:///C:/Users/xxxx/AppData/Local/Temp/GDTMP--1/preview/code0.js:1367:24)

Might there be some new bug or incompatibility with the new gdevelop version?

Edit:
After disabling all lighting layers and lights I found still there is buggy behavior, like sprites not showing. Even after reverting todays changes, everything stays buggy. Then found this thread [Bug report] Buggy after 5.3.196 update

So seems to be a general Problem with this version of gdevelop instead of a lighting bug.

Edit 2:
Installed my original downloaded version 5.3.190 and everything works again.