QB PGM run 40x in win full screen get error - pgm too large

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
acs
Newbie
Posts: 3
Joined: Tue Jun 19, 2007 2:11 pm

QB PGM run 40x in win full screen get error - pgm too large

Post by acs » Tue Jun 19, 2007 2:24 pm

I have an old qb program which shell's to another qb program.
If I shell to the other qb program exactly 40 times in Windows 2000
full screen - program aborts and console screen message is:
Program too Large. I have changed config.nt to read files=100 thinking
that was the problem - but bombs out again after 40 shells. Anyone
have idea's on what the problem could be - or if other settings need
to be changed for the windows full screen. I believe the same message
was received in windows 98 as well. Thanks for any help

Ralph
Veteran
Posts: 148
Joined: Fri Feb 09, 2007 3:10 pm
Location: Katy, Texas

Post by Ralph » Tue Jun 19, 2007 5:01 pm

My first thought is: Do you terminate the program each time, or do all 40 remain running?
Ralph, with QuickBASIC 4.5, operating under Windows XP, wiht anHP LaserJet 4L Printer. Bilingual in English/Spanish

User avatar
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt » Tue Jun 19, 2007 7:00 pm

SHELLing 40 concurrent times is ludicrous.

User avatar
sid6.7
Veteran
Posts: 318
Joined: Tue Jun 21, 2005 8:51 am
Location: west USA
Contact:

Post by sid6.7 » Tue Jun 19, 2007 9:53 pm

why on earth would you want to shell 40 times?

is there a point to this or just to see how
far you can push your computer?

acs
Newbie
Posts: 3
Joined: Tue Jun 19, 2007 2:11 pm

Post by acs » Wed Jun 20, 2007 7:48 am

Ralph wrote:My first thought is: Do you terminate the program each time, or do all 40 remain running?
Main program calls report programs then returns each time. It doesnt
matter if each of the 40 times is to run a different program or not - each of the 40 terminate/close and return to main program. Thanks

User avatar
sid6.7
Veteran
Posts: 318
Joined: Tue Jun 21, 2005 8:51 am
Location: west USA
Contact:

Post by sid6.7 » Wed Jun 20, 2007 12:44 pm

hmm i made a fake gui and it shells out and doesnt bonk
after 40 shells...it must be a resource thing on your computer.

what system do you have and such....


mine calls these programs

email
internet
dos prompt
dos calender
notepad
dxdiag
hearts

acs
Newbie
Posts: 3
Joined: Tue Jun 19, 2007 2:11 pm

Post by acs » Wed Jun 20, 2007 1:19 pm

Mine is calling other qb progams which run reports and return. This situation is occurring on many computers all of which are above average and os is win2000. Testing again today the # b4 aborts is 32 - so it does fluctuate. I remember this was also happening years ago (on many computers) when operating system was Win98. I've tried researching the VDM - Windows runs 16 bit basic programs in full screen or console windows with Virtual Dos Machine/vdm, but am unable to locate that error message (Program too Large) anywhere in my searchs. Thanks for your help

MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows » Wed Jun 20, 2007 1:32 pm

Then perhaps the secret is to have the systems generate the reports locally then copy them to your one place after.
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com

User avatar
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

Post by Patz QuickBASIC Creations » Thu Jun 21, 2007 10:20 am

Is itself over and over again? If so, then you're going to get that kind of error, since the NTVDM limits the available memory to DOS. Try rewriting your program to use loops instead of recursivly calling itself over and over again.

Ralph
Veteran
Posts: 148
Joined: Fri Feb 09, 2007 3:10 pm
Location: Katy, Texas

Post by Ralph » Thu Jun 21, 2007 12:29 pm

acs wrote:
f I shell to the other qb program exactly 40 times in Windows 2000
full screen - program aborts and console screen message is:
Program too Large.
your message, "Program too Large", seems to indicate that too much code is being loaded into memory. Assuming that none of the programs you are trying to load are actually "too large", my next thought is that you are NOT terminating one or more of the loaded programs.

To test my suggestion, please add some code to your "mother" program, so that, just before each call, it prints out the available memory, and stops, until you enter any key. If any of the reports of available memory inicates a diminution, check out that particular program for lack of an "END" or "SYSTEM" actuation. Perhaps one or more of your programs are returning BEFORE reaching an "END" command.

If you do try my suggestions, please report back your findings.
Ralph, with QuickBASIC 4.5, operating under Windows XP, wiht anHP LaserJet 4L Printer. Bilingual in English/Spanish

moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Post by moneo » Thu Jun 21, 2007 5:12 pm

Hi acs,

In the past, I too have had problems with programs that do multiple shells. Apparently, when you do a shell, when you come back, you don't have all the memory you had when you did the shell. I don't know why. It's like the shell operation didn't restore all the memory that it used during the operation. In your case, it adds up until you get an error.

If your main program generates reports, or data onto files which feed the report printing programs, then I suggest you split the process up and run your main program many times from a batch file. The idea of the batch file would be:
Run Main Program, which generates report1 data on workfile1.
Run Report Program that prints report1 from workfile1.
Run Main Program, which generates report2 data on workfile2.
Run Report Program that prints report2 from workfile2.
Run Main Program, which generates report3 data on workfile3.
Run Report Program that prints report3 from workfile3.
etc.

What do you think?

Regards..... Moneo

Post Reply