Out of Heap Space

cloudee1 Ok so I leave room 1 and when I try to reenter it from any direction I get an "out of heap space" error.

What should I be looking into to alleviate this situation.

(A prompt response would be appreciated!)
Eigen When you left room1 did you use direction?

If not, make sure it's (send gRoom: ... not something else, I once had this problem when I accidentaly used (send gGame: newRoom( ))



-Eigen
cloudee1 Nope that isn't it, all of my room changes take the form of
(send gRoom:newRoom(1))



Robin_Gravel Did you get this error after you have downloaded a previous game?

I got it in King's Quest IV.


Robin Gravel
AGI1122 I used to get this error in Space Quest 3 and Codename: Iceman... this was on my Tandy 1000, the problem went away once I got a newer computer.
Brian_Provinciano It's a standard SCI error message for when it runs out of memory. SCI0 should be only allocating a max of 1Mbyte of heap space, but some versions might be under 512K. You are likely not unloading your views and/or other resources properly.
Jim C Hi Brian, I just got this problem too. Could you please explain what you mean by 'unloading resources properly'? Thanks!
Jim C Does anybody know how to fix this problem? My game is just about finished, but it keeps running out of heap space and crashing! I need to get this game done this week before I go home for Christmas...

It's not a very long game, so I don't understand why it keeps running out of memory. It happens after ~ 5 rooms. And it doesn't just happen at one particular spot. If I edit the initRooms script to start the game at a different screen, it still happens after a few rooms. Each individual room works fine, though.

Can anybody help me with unloading resources? I don't know how to do this. Thanks!
Robin_Gravel How many rooms your game has?

I have over 40 rooms on my game in progress and I never got this error at the moment.


Robin Gravel
Jim C Hi Robin:

I only have 17 rooms. The scripts are all 10-15 kb. I also have 55 views, most of which are < 1 kb, but a few are 5-10 kb and my ego is 60 kb, because it has so many loops. Could that be the problem? The problem may also be inefficient coding, since I'm pretty new to it.
Robin_Gravel
Jim C wrote:
my ego is 60 kb


Impressive. Your ego should have many loops and many cels.
My ego is only 6kb. Not serious.


Robin Gravel
Kyoufu Let's just say Jim has an inflated ego and move along, k? ;D
Jim C :) Kidding aside, I think that's exactly what the problem was. Some of my ego loops were death scenes, and a few of them were way too big. That, along with some extraneous text output (which made my room scripts too big) was causing my heap space errors. I trimmed a lot of the extra stuff down (for instance, I removed every other cel in some of my animations), and now the game works fine. I'll probably have it out for download in a week or two, after I work out a few more bugs. I really appreciate all the help I got on this forum. This game should make a good Christmas present for my friends!