Game crashes when I move from one map to the other

I’m using RMVXA, and I made a large map for a dungeon I’m making. I’ve had to split the map into two separate maps, and have them connect to eachother via events. I made both of these maps as parallax maps on gimp, and they have many objects on both the ground and par layers. My main issue is whenever I test my game, everything works as planned, until I get in a battle, then move from “Keep of the Defiled 1” to “Keep of the Defiled 2”. The transfer begins, screen fades to black, then I receive the Script cache line 106 failed to create bitmap error message along with a crash.
What confuses me is that I’ve made larger maps before, and they never would encounter this issue.
In the default functions, line 106 loads a graphic from file if it is not in cache. If the bitmapdata fails creation, it sounds like access to file is denied, the application doesn't get enough RAM or the graphic is invalid. Does the map work if you just start the game there instead of coming from somewhere else?

No let me change that question a bit, if "everything works as planned" before you were in a battle, does the map-transfer work aswell until then?

~炬燵あ
What confuses me is that I’ve made larger maps before, and they never would encounter this issue.
where those larger maps back to back or where always smaller maps between them?

I might be wrong but I vaguely remember that when changing maps in VXA, the new map had to be loaded completely before the old map's memory usage could be released.
so if you go from one big parallax to another big parallax, you'll need the memory to keep both at the same time. while you can have larger single maps as long as any map loaded from them is much smaller in itself.

and memory overflow is one of the causes that can crash a program hard like already mentioned above


EDIT:
and by the way, how big are those maps either way? Our numbers for "big" might be different than yours and if the maps are smaller than what we think, a memory overflow would be unlikely.
we need some absolute numbers on your maps to decide on that.
In the default functions, line 106 loads a graphic from file if it is not in cache. If the bitmapdata fails creation, it sounds like access to file is denied, the application doesn't get enough RAM or the graphic is invalid. Does the map work if you just start the game there instead of coming from somewhere else?

No let me change that question a bit, if "everything works as planned" before you were in a battle, does the map-transfer work aswell until then?

~炬燵あ
To my knowledge, there isn’t any corrupt files that I know of lol but basically when I just transfer from door to door (go from map a to map b) it never crashes. Most of the dungeon’s map is on map b, so it takes a bit longer to load, but it never crashes. As soon as I battle a single enemy on map a, and then I transfer to map b, I get the error during the fade out transition. It makes no sense to me.

where those larger maps back to back or where always smaller maps between them?

I might be wrong but I vaguely remember that when changing maps in VXA, the new map had to be loaded completely before the old map's memory usage could be released.
so if you go from one big parallax to another big parallax, you'll need the memory to keep both at the same time. while you can have larger single maps as long as any map loaded from them is much smaller in itself.

and memory overflow is one of the causes that can crash a program hard like already mentioned above


EDIT:
and by the way, how big are those maps either way? Our numbers for "big" might be different than yours and if the maps are smaller than what we think, a memory overflow would be unlikely.
we need some absolute numbers on your maps to decide on that.
The bigger maps I have, have always been just single maps that are larger. One is 15,911 kb and everything is on the same map, and it never crashes. This dungeon is split into two parallax maps that are 4,935 kb and 7,038 kb respectively. The only thing I think might me effecting it is that there is a lot of events on both, but I’m not sure.
When I show the console, I know it’s gonna crash when it just loads the name for map b’s parallax map, and nothing else shows up in the notes. I just wish I could understand what specific thing is leading to this crash.
So you thinking it might just have to do with my computer not being able to render the second map at times due to memory overload?
One is 15,911 kb and everything is on the same map, and it never crashes.
that is not what I wanted to know - I wanted to know the map size, not the file size.
how many tiles are the maps?

by the way - the filesize is useless for this, because picture files are compressed, and to use a picture as a map it needs to be uncompressed. If you want to know how much RAM one of your maps use, you should store the picture as BMP to check the filesize, because BMP has no compression.
and a parallax map needs several thousand times the RAM of a tile-based map, but the number of tiles is a much better indicator for the RAM needed.
My bad, map one is 98x204 and 2 is 161x266. They’re such weird numbers because I had to manually split the map on gimp using the grid, because it was all one map at first.

Update, it works sometimes even after a battle, it appears to be quite random when it crashes. It still never crashes after just transporting without interacting with any events however.
I’m in the dark here
that is more reason to assume a memory overflow, it just means that a third interaction is needed to push that memory usage over the limit.

both map sizes are at the upper end of the limits for parallax mapping. a few years ago 150x150 was considered the practical limit for parallax mapping, but modern computers have increased resources. Currently I would guess that for high-end computers the limit is either 200x200 or (for really high-end) 250x250 tiles - which fits with your numbers that a combined map of those two no longer works.

please make the following test: go into a battle that you know will cause the memory overflow if you transfer after it, but don't transfer directly. let the computer idle for half an hour or so before transferring to the other map.
That should give the engine time to clear up the RAM, so if nothing else the transfer should happen without error after that.


but I fear you might have to split the larger of the two maps again to prevent future crashes
that is more reason to assume a memory overflow, it just means that a third interaction is needed to push that memory usage over the limit.

both map sizes are at the upper end of the limits for parallax mapping. a few years ago 150x150 was considered the practical limit for parallax mapping, but modern computers have increased resources. Currently I would guess that for high-end computers the limit is either 200x200 or (for really high-end) 250x250 tiles - which fits with your numbers that a combined map of those two no longer works.

please make the following test: go into a battle that you know will cause the memory overflow if you transfer after it, but don't transfer directly. let the computer idle for half an hour or so before transferring to the other map.
That should give the engine time to clear up the RAM, so if nothing else the transfer should happen without error after that.


but I fear you might have to split the larger of the two maps again to prevent future crashes
Oh god I didn’t realize that, haha my computer is really outdated too so I’m surprised I’ve been able to make the maps this big.

I find it so strange that I have two other maps that are in that size range but function perfectly fine. But thank you for the help.
I’ll try that tomorrow, and see if that’s the issue. Hopefully it is, because I can easily still split map 2 in half since it’s much larger than the first one. That’s the map that crashes after all, any transfers between rooms that are all on map 1 cause no issues.

Now I’m worried if at this rate my computer won’t be able to handle more maps in general, meaning I can’t continue making the game.
Is there a way to check for this?
Now I’m worried if at this rate my computer won’t be able to handle more maps
the number of maps doesn't matter, it is the size of maps that matters - because only one map is ever in memory at most times.

so more maps do nothing but use more HDD-space until you come to a map that is larger than the engine can easily handle.
so you can add as many maps as you want as long as hey remain at 150x150 or so each

Original thread: https://forums.rpgmakerweb.com/threads/game-crashes-when-i-move-from-one-map-to-the-other.173412/