If you try to Pop a string from an empty array it causes a red error message. IMO, it shouldn’t crash but return the default value for the variable type. For a string it would be an empty string. I tested it with a global variable but I’m assuming it’s the same for scene variables.
My events. I used a button to both trigger the action and show the result.
Full text of error
TypeError: Cannot read properties of undefined (reading 'getAsString')
at Object.GDJSInlineCode [as userFunc0xf451f0] (https://game-previews.gdevelop.io/1742220737429-939748/gdjs-evtsext__arraytools__globalpopstring-func.js?gdCacheBurst=2759333307:19:70)
at gdjs.evtsExt__ArrayTools__GlobalPopString.eventsList0 (https://game-previews.gdevelop.io/1742220737429-939748/gdjs-evtsext__arraytools__globalpopstring-func.js?gdCacheBurst=2759333307:27:43)
at gdjs.evtsExt__ArrayTools__GlobalPopString.func (https://game-previews.gdevelop.io/1742220737429-939748/gdjs-evtsext__arraytools__globalpopstring-func.js?gdCacheBurst=2759333307:89:43)
at gdjs.ArraysCode.eventsList4 (https://game-previews.gdevelop.io/1742221088184-139313/code16.js?gdCacheBurst=2759333307:233:97)
at gdjs.ArraysCode.func [as _eventsFunction] (https://game-previews.gdevelop.io/1742221088184-139313/code16.js?gdCacheBurst=2759333307:296:17)
at c.renderAndStep (https://resources.gdevelop-app.com/GDJS-5.5.226/Runtime/runtimescene.js:1:5343)
at h.step (https://resources.gdevelop-app.com/GDJS-5.5.226/Runtime/scenestack.js:1:719)
at https://resources.gdevelop-app.com/GDJS-5.5.226/Runtime/runtimegame.js:1:9522
at i (https://resources.gdevelop-app.com/GDJS-5.5.226/Runtime/pixi-renderers/runtimegame-pixi-renderer.js:1:10547)