Qbasicnews.com

Full Version: Problem "Out of Memory" while writing BBS door in
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
Alright, I've written a large program in QB4.5 editor and it runs fine from the QB environment, but gives me an "Out of Memory" error when I try to compile it to .EXE file.

My computer: P2-350, running Windows 2000 Pro

The program: A multiplayer BBS door game

Written in: QB4.5 with additional Easy-Door Library routines(QB_EDR.LIB, QB_EDR.QLB)

What I've tried:

1. Using QB7.1 -- no help, the easy-door routines only work for 4.5

2. cutting my main code (filename.bas) into modules. this didn't help. I still got the same message.

3. I've already moved lots of code into subroutines and made basic include file for all my declarations and global variables.

4. I've already tried downloading Crescent's MAKEQLB program, which is supposed to make a new library out of all the subroutines that my program uses (essentially making it so that I don't need the ENTIRE easy-door library, just the routines from it that get called during my program). However, when I try running MAKEQLB on my program, it works for a few seconds, gives me a huge list of routines that are declared but not called, and then kicks out, giving me an error 64 and not creating any libraries.

5. I've heard that there's a program by MicroHelp called PREQLB that does basically the same thing but I can't find it anywhere. So, I haven't tried it, yet.

6. I've already reduced my code to as few variables as possible, and loaded all arrays as $DYNAMIC, and cleared them from memory when they're not in use.

7. I've gone through my code and cut as many unneccesary varibles out. I can't find many other ways to make the code more efficient than it is.

8. I've already tried compiling the program to .exe outside of the environment by manually running BC (with and without the /s switch) and LINK, but I still get the same "Out of Memory" error.

I'm really baffled by this one. The code's pretty long, but it's not THAT long. I guess maybe the fact that it's including four BI files (the one I made, which has my declarations and global variables, plus 3 files used by Easy-Door) is sucking up all available memory?

Does anybody know any of the following:

1. a way that I could free up more memory for the compilation?

2. any way that I could make my code more efficient (I'll gladly send the code, all necessary libraries, etc. to anybody who supplies an Email addy)?

3. any way to reduce the size of the library (easy-door) to only include routines that i use in my program?

I can be reached as Jasmydae@hotmail.com. Alternatively I'm on AOL Instant Messenger as "Shimmer99" and I'll be checking this forum regularly. Please help if you know anything that would be useful! I spent about 3 weeks on this program and I can't test it on my BBS until it's compiled! Sad Sad

*peace*

Meg.
Use $DYNAMIC arrays that you DIM and fill with data ONLY when they are needed, and ERASED just after. Managing the memory dinamically is by all means less memory consuming.

If it still doesn't work, then you can't do it in QB. Try VB and console API code (search this forum, I posted where to find samples). You can also try to split everything in small modules, modify the code for dynamic memory management and try compiling in VBDOS. Decompile your libs (if they are QLB'ed) and re-QLB in VBDOS.
I've already made sure that my arrays are $DYNAMIC, and cleared when not in use (#6)

I'm loading library routines that aren't compatible with any version other than QB4.5 (according to their docs: Easy-Door)

I'm not sure what you mean by using VBDOS, or decompiling / recompiling libraries in VBDOS.

Do you mean that VBDos is a better version than QB4.5, and that I can somehow make the Easy-Door libraries compatible with it? If so, where can I get VBDOS? I'll take a look at it.

*peace*

Meg.
With recompiling/decompiling I meant that if you needed QB45 'cause they were QLBed for QB45, you should de-QLB them into OBJs and re-QLB those OBJs using VBDOS' linker.

I dunno if they'll work in VBDOS, but they might.

If you already optimised everything optimizable, then it's time to drom QB and go to VB6 or something like that.
Alright, I've found VBDOS v. 1.0 and installed it. How do I go about changing this library and my program over to VBDOS?

*peace*

Meg.

p.s. I'm on AIM right now as "Shimmer99" might be easier to talk on there then send messages back and forth through this forum!
I don' have AIM.

You can use the MULTILIB utility to extract all OBJs from QB45 LIBs. Then Use VBDOS' LIB.EXE to build a new LIB out of those OBJs. Then you use VBDOS' LINK.EXE with that /Q option to build a QLB using that LIB. That should be done like explained here http://www.geocities.com/na_th_an_wopr2k/limits.txt or kind of. Check VBDOS help for command line parameters to LIB and LINK.

Cya
subject reiterated.

*peace*

Meg.

p.s. thanks for your help Smile
your screen, but just to be sure, does it say "Out of memory" or "Program memory overflow?"
it says:

Out of Memory

43293 Bytes Available
0 Bytes Free

0 Warning Errors
1 Severe Warning

*peace*

Meg.

p.s. Na_th_an, I found MULTILIB and am checking it out, now.
So I've got this library called QB_EDR.LIB which is the Easy-Door library. It's got all these routines used for making BBS doors (such as a routine to send a string of text to the remote user's screen, or get input from the remote user's keyboard, etc.)

I can open up the library in MULTILIB and see all the modules on the left, and if I highlight a module I can see all the routines in it. However, most of the routines are contained in a module called 'TEMPEDR2' which I can extract into an OBJ file if I want.

However, what I REALLY want to do is create a new library, called, say "NEEDED.LIB" which is the same as QB_EDR.LIB only without all the extra routines in TEMPEDR2 module. I want all the modules the same, but I don't want the like 50 routines in TEMPEDR2.. I only call maybe five or six of them in my program.

*peace*

Meg.
Pages: 1 2 3 4 5