Closing the Menu Scene with an event

I have an item called "glowing box" that gives the player a random legendary item on opening. Because of this, it needs to open up a message window when it is used, telling the player which item they got. However, when using this item from the item menu I get a crash saying, "cannot read property "refresh" of undefined". I'm pretty sure that the problem is the item's common event trying to open a message box while the menu is still open.

I am using MOGHunter's menu plugins, including his item_scene plugin. When I turn it off, this works fine, so this is almost certainly an issue with that plugin. That being said, is there a way around this? If I could just force close the menu with an event, I'm pretty sure that would fix this problem. Is that possible?
You could do

SceneManager.push(Scene_Map)

as a script call, maybe.
I'm pretty sure that the problem is the item's common event trying to open a message box while the menu is still open.
Nope - that is impossible unless you've installed some extreme plugins, which would mean the problem isn't at this point anyway.

The menu automatically closes because the entire common event called by item use needs to be processed on the map. It cannot be processed on the menu at all unless you installed one of the scene-interpreter plugins. And even if you do that, all of those plugins support the show text command, so it wouldn't cause this problem anyway.

Please give a screenshot of the common event and of the console output (F8) when the crash happens, that will allow us to identify what really is the cause.
I have no idea why, but it has suddenly started working on its own. (I changed many seemingly unrelated things in the meantime.) Thank you for everyone who attempted to help. If it breaks again, I'll let you know, haha.
(I changed many seemingly unrelated things in the meantime.)
Nothing is completely unrelated in a computer, because everything goes down to numbers and the computer doesn't understand what the numbers represent. One of the more strange (but reproducable) effects I ever encountered was that a wrong but working mouse driver under Windows98 created a black line (display error) under DOS.

That said, if you don't know why an unrelated changed affected this (or did changes at random to solve this), then there is a high chance you created other bugs with those changes.

Original thread: https://forums.rpgmakerweb.com/threads/closing-the-menu-scene-with-an-event.75947/