MZ Can anyone help me make sense of why my VisuStella plugins are suddenly returning this fatal error?

1764719707210.png


This screen occurs whenever I attempt to use the Random Dungeon Maps to generate the Map templates for an empty container.

The plugin worked perfectly all day, until suddenly it didn't.

Usually the culprit would be - installing an incompatible plugin, removing a plugin, changing the plugin load order, etc., but I did none of these things.

Additionally, I did not delete any files from my Project folder.

Suddenly - for a reason I cannot discern - the Random Dungeon Maps no longer works and returns a "Cannot read property 'parentId' of null".

Completely uninstalling and reinstalling the plugin did not work.

Despite the fact it worked with all my other plugins previously, I uninstalled every plugin except VisuMZ Core Engine and Random Dungeon Maps, but the error still persisted.

I created a New Project and then installed only VisuMZ Core Engine and Random Dungeon Maps, and the error DID NOT happen. However, starting my entire Project over from scratch is clearly not an option.

Something has somehow broken, and I'm hoping someone can help me figure this out. I'm unfortunately at a loss and may need to abandon the plugin.

(Apologies if I posted this in the wrong forum section.)
Moved to Plugin Support
you need to understand what the error truly means - the causes you listed are not the only options that can have this effect.

"of null" and "of undefined" always means that the engine tried to access a data object that does not exist.
why it does not exist that can be a lot of reasons like a plugin configuration or incompatibility.
but it can be caused by other options as well, like simply deleting a database entry that is required by the plugin or something similar.

since it works with a new project, you'll have to compare that with your existing project to find out what the missing data object might be - a missing map, a missing entry in the database or even something as simple as a missing notetag or a notetag pointing nowhere.
The only thing that has a parentId as far as I know is $dataMapInfos[n]… and, hey, your stack trace mentions map infos, so that's probably the cause. Did you recently delete a map? Try creating a new map (it doesn't matter what's in it) and see if that fixes it.
I was having trouble with my Visustella plugins out of nowhere last night as well. I narrowed it down to the visustella core, and "fixed" it by turning off the playtesting console or whatever.
1764725624985.png


You are supposed to add the MapID of the desired "Cell Container Map" into the value field for the Plugin Command, which will generate the dungeon for you when called by an Event.

1764725927667.png


As you can see, the Map ID (in the top left corner) matches the ID I gave to the Plugin Command. No Maps are missing that the Plugin should be looking for.

1764726046501.png


It looks like the error log says that - despite the Plugin being directed toward Map 59, it is trying to create Cells for Map 48. This is telling me something is catastrophically wrong, perhaps with the Map Infos you mentioned... though I cannot understand or figure out why the Map Infos would have become broken or corrupted. I did not delete any Maps that would be considered essential to any of my Plugins - for this Plugin, you choose which Map you want it to generate on top of. So even if it was erroneously choosing Map 48 instead of the correct Map 59 to generate on top of, it should be able to do it.

I'm not sure what I should do or can do to fix the broken map info...
I don't know if this is of any use, but one of my main projects that I'm also using random dungeons with, I got things back on track by turning off the debug/playtesting console in vs core, and with other projects I tested with just the base vs plugins that seemed to be the consistent point of failure.

Not saying all that stuff you just said has no bearing, but you might want to try that first.
I don't know if this is of any use, but one of my main projects that I'm also using random dungeons with, I got things back on track by turning off the debug/playtesting console in vs core, and with other projects I tested with just the base vs plugins that seemed to be the consistent point of failure.

Not saying all that stuff you just said has no bearing, but you might want to try that first.

Are you talking about turning off "Open Console on Boot" under Quality of Life? I already have that disabled. The console appears in my case because the program is saying it cannot read "the parentId of null", which I have no idea what it means.
Right, that. Fair enough, but yeah my VS stuff started acting up out of nowhere yesterday too.
Some piece of data was deleted or removed for some reason, so I have to try and troubleshoot what that is. I'll find it soon and update here pending any further suggestions.
I figured out the problem. Thankfully, this was user error, and nothing was corrupted or broken.

This was my MapInfos.json:

1764739883821.png


As you can see, it's absolutely littered with null entries. These were from Maps I deleted.

The actual Maps have several fields, one of them being a parentId.

"Cannot read property parentId of null", means the Plugin was trying to read one of the null entries which has no data, and no parentId field like a normal Map does.

It took some work, but I totally reset my MapInfos.json by deleting everything, but preserving the individual Map.json files to copy and paste them onto the fresh maps I made.

My new MapInfos.json no longer has any null entries and my VisuStella Random Dungeon Maps plugin is now working correctly.

A word of advice to anyone that may stumble upon this thread in the future, please be careful when deleting Maps you may no longer want.
In the plugin properties, the leading zero in front of the map ID - is that an automated format or did you enter it manually?

IDs should NEVER be entered with leading zeroes, the true ID is 59 and not 059.

A single zero should not cause problems unless something is programmed very wrong, but for example 0059 is an undefined number - because 00 causes all computers to read the number as octal, and there is no 9 in octal numbers...

EDIT: OK, it was something else. But as I said further above - a missing data entry...
because 00 causes all computers to read the number as octal
This is, in fact, false. It's true that numbers beginning with 0 are read as octal in some contexts, but JavaScript does not do this.
This is, in fact, false.
Didn't you mean "incorrect"?
Also, you should generally test from New Game rather than an old save.


This is, in fact, false. It's true that numbers beginning with 0 are read as octal in some contexts, but JavaScript does not do this.
No, you are incorrect. Test cases:
  1. 10 - returned value is 10 (implicitly parsed as decimal);
  2. 010 - returned value is 8 (implicitly parsed as octal);
  3. (() => { "use strict"; return 010; })(); - returns an error.
  4. (() => { "use strict"; return 0o10; })(); - returns 8 (explicitly parsed as octal).
These cases can be tested in the dev console:
  • Open the dev tools by pressing F12 in your browser or in RPG Maker MV/Z's playtest.
  • Select the Console tab.
  • Enter a test case and press Enter to return the result.
Wow caethyril swooping in to say the day
No, you are incorrect.
Oh, it's actually far worse than I thought. I made my previous comment after trying it in the console to make sure, but it turns out it sometimes interprets 0-prefixed numbers as octal, and sometimes not.

Instead of raising an error for 059 (because 9 is not a valid octal digit), it just parses it as decimal instead.

It parses 010 as 8, but Number('010') or parseInt('010') or +'010' as 10. (Though, oddly, a StackOverflow I found said that parseInt does auto-detect octal? Maybe it depends on the version, but it does parse to 10 in MV.)

But, all things considered, the latter fact still means that you don't need to worry about this when putting values into note tags or numeric plugin parameters. It's something to worry about in formulas and script calls though.

With "use strict" it's a fair bit better – anything 0-prefixed is an error, no questions asked. That's only for literals – string to number conversion is the same. Though honestly I would've preferred if they were parsed as decimal instead.
Why would use strict make a difference?

Original thread: https://forums.rpgmakerweb.com/threads/can-anyone-help-me-make-sense-of-why-my-visustella-plugins-are-suddenly-returning-this-fatal-error.181281/