[RM2K3] INSUFFICIENT MEMORY TO CREATE STREAM

Posts

Pages: first 12 next last
So, my games Hero's Realm and Runelords seem to be plagued with a rare, but persistent game-crashing bug that can utterly destroy the RM2k3 savefile.

I've never been able to figure out the cause (and thus the solution) to this particular bug.

Unfortunately I don't have the exact wording of the error message, but it is something along the lines of "Insufficient memory to create stream"

When this bug is about to occur, generally what has happened is that the player will have played for some time and then out of the blue the music cuts out. If the player then attempts to save their game, RM2k3 crashes, give that error message and the save file they chose becomes corrupted and is 0 kb in size.

I don't know how to make this bug happen or why it happens/what causes it.

Years ago, I came to the conclusion that there is a memory leak in the code and that it was related to music/playing MIDIs. At least, that's what I guessed it was.


Here are some recent bug reports:

#1)
http://rpgmaker.net/games/82/?post=265670#post265670

#2)
Zaine
Hey there yesterday at around 9:30 PM i ran into that memory bug i sadly didnt know anything about so like a dumbass i tryed to save right after getting the white elfstone (i was so close it was the last damn arttifact of the first 3 i needed!) so i just want to let you know your games worst enemy was still kicking and to ask if you happend to have a save from right after getting the white elfstone cause as much as i love the game i dont really wanna do the whole game over its no big if you dont but it would be very welcome what with all the crap im dealing with well cheers! PS. i love this game i wonder how it would have fared during the hayday of nes rpgs my thought is FREAKING AWESOME!


I heard that it was easier to generate the bug in Runelords, if anyone wanted to try troubleshoot.

(I am secretly hoping that someone who has ripped apart the engine code has some brilliant insight to why this is happening)
kitten2021
Returning from RMVX Death
1093
Questions for you, Kentona, did you check the music files and seen if maybe its the music causing it? Or maybe seen if its a specific event that's being used multiple times through-out the game? This also happens in Runelords, right? Is there music/charsets/chipsets that your using there that matches what was used in Hero's Realm?

Sorry if these sound like repetitive questions to you, but just trying to see if the problem could be weeded out (so's to speak). BTW, will install Runelords tonight to play and try to figure out where it happens and try to get a screen-cap of the error for you. :)
They share a lot of resources, since I had used the resources in Runelords as a base when I started Hero's Realm. So its possible one of the resources is related to the problem.

I would have to check the events, though. I don't think they share any events. They do share other things like Battle Animations.
Looks like there is some memory leak... probably in the music system.

Are you using any audio patch? Like Disharmony, Audieremony or Power Mode 2003 (which includes FMODex)?
It would be interesting to see how much system memory is used.

You can boot up Runelords or Hero's Realm, then press ctrl-alt-delete to bring up the system processes menu. From there you can track how much memory the game is using by searching for RPG_RT.exe (if you haven't renamed it).

If the memory is climbing or isn't deallocating correctly when songs change, then you've got the issue.

A process running on 32-bit NT (win98 - win7) only has two gigabytes of private use memory. The memory leak will cause the game to crash when the game's memory either breaches that limit or when your own machine runs out of memory. So a memory leak looks like the right behavior, thus the 'insufficient memory' part.

(Of course you can change the default memory amount, but I wouldn't want to because that won't solve your issues).
kitten2021
Returning from RMVX Death
1093
author=Cherry
...probably in the music system.

Are you using any audio patch? Like Disharmony, Audieremony or Power Mode 2003 (which includes FMODex)?
author=Radnen
If the memory is climbing or isn't deallocating correctly when songs change, then you've got the issue.

Is runelords downloadable with all the charsets, chipsets, music files, sound efx, et cetera? I betting its a music or sound fx thats causing the issue, from what everyone else is poitning towards also. If it is, and the game crashes during a specific song playing or when a specific song is supposed to face in, then I can manually go into the music folder and test those specific songs themselves. (Just an idea, mind you)

EDIT:
Oh, and the audio patch thing is a good idea... Might be causing an issue with one of the audio files or multiple audio files.
kitten2021
Returning from RMVX Death
1093
OK, played the game, got to the first save spot in the forest right before the first demon gate, music disappeared. Played all the way to the point until I got the female druid, got to the world map then BAM! received the error.

Took a screen shot to show you what my Windows Task Manager showed under the Processing tab:

http://rpgmaker.net/media/content/users/4763/locker/Kentona_RunelordsMemoryError.png

The sudden drop off is where the game crashed and stopped running; everything else behind it though is from it playing. The game didn't have that much memory usage until I got to the forest area, then the memory usage really started to sky rocket for me.
I can't really say that's a memory leak. There are peaks - and there are valley's too!

What I think it is, is a very large audio file being played. Rather it's not just some memory leaking (the memory still showed a general upwards trend), it was more of the fact the last file loaded caused one last big spike before - bam - the game failed and brought the memory back down.

So its a product of playing the game for a while, building the memory up, and then loading a large song right before you max it's VAS (virtual allocation space). In short: Something is breaking the camel's back.

I don't have the game on my computer so someone should scroll through the songs and see what the largest one is. Kentona should then identify what song was played at the time Kitten got the error and see if that song is also present in Hero's Realm in some way.

Edit:
Just by looking at the memory I'm disappointed in how RM handles music, you'd think it'd stream the songs from the hard drive rather than load them straight into memory. If I were Kentona I'd talk with Cherry to see which mods supports streaming. I believe Audieremony is a good candidate.
kitten2021
Returning from RMVX Death
1093
Songs in order of size:

sorcappr.mid - 277 kb
ecstasy.mid - 161 kb
mus-nite.mid - 160 kb

These are really the largest ones here, there are a few other ones there, but nothing larger than these, Kentona.
Those can't possibly cause a significant memory leak. Wow. We'll see what Kentona says, but now I'm thinking its something else. (I thought the culprit was a large .mp3 or .wav file like how other games might have)...

After seeing that, the spikes in memory have nothing to do with music. It might have been map switches (maybe something particularly in that forest area). Nevertheless a map file in RM is a large file and the switch to the world map was what possibly broke the camels back (I'm thinking there's a particularly large world map?). The songs cutting off, is by far a mystery to me, it could have something to do with the soundfont being loaded, perhaps Rpg Maker uses it's own soundfont or must seek the one from your sound card (or integrated sound chip).

If a map is causing an issue, it may come down to how many events are on that map. I've heard that many events can slow your computer down, but maybe its also a battle with memory. Just because you're computer can comput many events doesn't necessarily mean it can store that many.

Did the forest area have many (and not like a lot, but like hundreds) of events/scripts/images?
kitten2021
Returning from RMVX Death
1093
author=Radnen
...but maybe its also a battle with memory.


Your saying this made me remember, the music cut out right before entering a battle. It was against those bird type flying things (they were red)...
Hm, it could also be something corrupting the memory, which could make the engine think the save data object has a size of - let's say - 2 GB. Trying to allocate 2 GB of memory won't work, the game would crash.

It's quite a strangee issue however. But my question is still unanswered: Is any audio patch used, Kentona? Try changing the audio system and see what happens...
Sorry, I am not usually on RMN during the evenings!

1) I am not using any audio patches for my games (so far as I know). I am using a modified .exe that displays the little grey bar in Message Boxes so that I know when I am reaching the limit.

However, if I remember correctly, someone else replaced the RPG_RT.exe from a game that didn't have this memory crash, and he still got that crash.

2) I am not using any .MP3s or big .WAVs. Just MIDIs for music.

3) The overworld map BGM is Field.mid. For the forest maps I use tombraider3.mid, for the demon portal map I used Dag_7.mid

I don't have Dag_7.mid in Hero's Realm, and I don't *think* I used tombraider3.mid in it (or if I did, it was in a very isolated case, and the memory crash was not isolated to a particular area in HR).

EDIT:
I am pretty sure I use Field.mid extensively in both


4) The overworld map for Runelords is only 250x60

5) The entire music folders for either game is about 10mb


Other things that I commonly do in the games is change the BGM using event commands.

In HR in particular, on the world map I have a parallel event that checks to see what the current chapter the player is playing and changes the BGM based on that, and I just use Play BGM. It is a parallel event so I am guessing that it is constantly calling Play BGM. I don't do anything like that in Runelords, though.


I don't know how to recreate the error, so I am having trouble troubleshooting.

kitten2021
Returning from RMVX Death
1093
author=kentona
EDIT:
I am pretty sure I use Field.mid extensively in both
You mind if I go in and pull your Field.mid out of the game and replace it with another midi and name it the same to see if I still get the error?
(Although, I'm really starting to think it's not a music problem... I'm thinking something to do with the game itself. It might just be permanently bugged/bricked... Hope not.)

BTW, fun little game, Kent, I liked Runelords a lot! :3 You shouldn't of cancelled it... :/

EDIT:
Found this out on the web, someone else is having their galme produce the same error, here is what he did to resolve it:

"after tinkering around with the save games folder, it seems that the game is up and running again.
By making sure that neither the save folder, nor the autosave folder is on read only (which seems to be default), the game no longer asks for additional disk space when I launch a mission. So far I am one and a half mission further and still, no such requests have been made.
"
Welp, the "save" folder is the game's main folder. RM2k3 games don't have a special save folder.

But when I look at the properties of the folder, I see that Read-only checkbox has a green square. Not sure exactly what that means...

However, when I look at project folders of other RM2k3 games I've downloaded, it has the same setting.


(Also, Runelords seems pretty hackneyed with no clear direction. I tried to cram too much into it and it just turned into an unworkable mishmash of ideas, story and mechanics)
the memories

I remember this coming up back with Hero Realm Chapter 1 wa~a~a~ay back when
BurningTyger
Hm i Wonder if i can pul somethi goff here/
1289
I hope you fix the error. Also maybe you can re-forge Runelords and continue. BTW do you want that old battleback for the vortexes?
author=kentona
But when I look at the properties of the folder, I see that Read-only checkbox has a green square. Not sure exactly what that means...


This is how this checkbox appears at any folder. It happens because a folder itself can't be read-only, only the files in it.

Which version of RPG_RT.exe is used?
v1.0.8.0

size: 955,568 bytes
size on disk: 958,464 bytes
Okay.

You could try:
0) Back up your project
1) Download this and patch your rpg_rt.exe with it
2) Download this and copy harmony.dll and rtversion.dll into your project.
Pages: first 12 next last