chrismaltby / gb-studio

A quick and easy to use drag and drop retro game creator for your favourite handheld video game system
https://www.gbstudio.dev
MIT License
8.44k stars 467 forks source link

"Uncaught TypeError: Cannot use 'in' operator to search for 'event' in undefined" [v4.0.0 final] #1484

Open Brushman97 opened 1 month ago

Brushman97 commented 1 month ago

The Issue

So I was testing out a simple plugin I was working on, and as I was going through the event glossary, I got this error: image

(Here's the "Stack Trace") "TypeError: Cannot use 'in' operator to search for 'event' in undefined at file:///D:/GB%20Studio%20v4.0.0%20(Final%20Version)/GB%20Studio-win32-x64/resources/app.asar/.webpack/renderer/main_window/index.js:37310:29 at onClick (file:///D:/GB%20Studio%20v4.0.0%20(Final%20Version)/GB%20Studio-win32-x64/resources/app.asar/.webpack/renderer/main_window/index.js:37416:166) at Object.ka (file:///D:/GB%20Studio%20v4.0.0%20(Final%20Version)/GB%20Studio-win32-x64/resources/app.asar/.webpack/renderer/vendor-hotloader/index.js:21:205) at qa (file:///D:/GB%20Studio%20v4.0.0%20(Final%20Version)/GB%20Studio-win32-x64/resources/app.asar/.webpack/renderer/vendor-hotloader/index.js:21:359) at ra (file:///D:/GB%20Studio%20v4.0.0%20(Final%20Version)/GB%20Studio-win32-x64/resources/app.asar/.webpack/renderer/vendor-hotloader/index.js:22:35) at wa (file:///D:/GB%20Studio%20v4.0.0%20(Final%20Version)/GB%20Studio-win32-x64/resources/app.asar/.webpack/renderer/vendor-hotloader/index.js:22:236) at Aa (file:///D:/GB%20Studio%20v4.0.0%20(Final%20Version)/GB%20Studio-win32-x64/resources/app.asar/.webpack/renderer/vendor-hotloader/index.js:23:224) at ya (file:///D:/GB%20Studio%20v4.0.0%20(Final%20Version)/GB%20Studio-win32-x64/resources/app.asar/.webpack/renderer/vendor-hotloader/index.js:23:57) at Ba (file:///D:/GB%20Studio%20v4.0.0%20(Final%20Version)/GB%20Studio-win32-x64/resources/app.asar/.webpack/renderer/vendor-hotloader/index.js:23:412) at Kd (file:///D:/GB%20Studio%20v4.0.0%20(Final%20Version)/GB%20Studio-win32-x64/resources/app.asar/.webpack/renderer/vendor-hotloader/index.js:87:493)"

I'm not sure what it means, but I think this is what happened: I accidentally tapped (I have a touchscreen laptop) on the "Screen" category when I meant to tap on "Scenes", so I quickly tapped on it before it would take me to the category I accidentally tapped on. I guess because I responded too quickly, GB Studio didn't know where to go, resulting in this error.

chrismaltby commented 1 month ago

Hi @Brushman97 would you be able to share a project that causes this issue? Given you're working on a plugin I imagine it's an issue with the plugin itself that we could try to display a better error message for

Brushman97 commented 1 month ago

Hi @Brushman97 would you be able to share a project that causes this issue? Given you're working on a plugin I imagine it's an issue with the plugin itself that we could try to display a better error message for

Sorry for the late reply. I've only encountered this issue once and haven't seen it since. As for the plugin I was working on, I was trying to add instant fades to events that didn't have them yet, like the scene stack ones. I could still send over the project over to you if you want.