Solved

Pascal R6009 Problem

Posted on 1998-08-24
19
335 Views
Last Modified: 2010-04-16
We are running a Pascal 7.0 application across a Novell network.  When trying to do a Novell capture within our application, we are getting an R6009 runtime error - not enough space for environment.  We have looked at the PAQ on the C problem which says about removing SET options, but this is not possible.

We are running in a dos prompt on Windows 95, and the system works fine on one machine, but not on any others with what appears to be identical setups!  We've also tried on a DOS machine which produced the same error.

Any other solutions?
0
Comment
Question by:chauntry
  • 5
  • 3
  • 3
  • +5
19 Comments
 
LVL 2

Expert Comment

by:omsec
ID: 1215463
TP programs mayneed easily over 550KB free conventional memory. Maybe you should try using a clean boot disk to give as much mem as possible
0
 

Expert Comment

by:kimsmith
ID: 1215464
I have had several environment problems in the past and I suggest you look at your compiler directives to reserve some memory when you compile your program in Turbo Pascal. You can also overlay your program so that it does not use up so much memory. The EXE can sometime be huge under TP but all the exe is not loaded until it is needed if overlayed. I forget the compiler directive that limits memory but you can add it to the begining of your source code to limit the memory used during runtime thereby giving up some memory usage to allow for more environment space. Hope this helps.
0
 
LVL 7

Expert Comment

by:Motaz
ID: 1215465
Try to use Memmaker programme which exist in Dos directory.
This program can increase dos memory up to 700 Kb.

Motaz from Sudan.
0
 
LVL 2

Expert Comment

by:omsec
ID: 1215466
Motaz: No PC has more than 640KB :P
0
 
LVL 1

Expert Comment

by:FuzzyLogic
ID: 1215467
Sometimes it is possible to convert some high memory to be used in the 640Kb, so you may get more than 640Kb in your computer.
0
 
LVL 2

Expert Comment

by:omsec
ID: 1215468
oh, never heard that
0
 
LVL 7

Expert Comment

by:Motaz
ID: 1215469
Hello Omsec.

Dos can access up to 1 MRAM, because address represented by 20 bit; that mean 2^20 which equevelant to  1048576. But memory above 640 can be accessed only with special programes.

You can chech that by use Memmaker in proper way.

Thanks.

Motaz from Sudan

motaz1@yahoo.com
0
 
LVL 1

Expert Comment

by:Bonev
ID: 1215470
Try to increase the size of the environment. Add the following line in your CONFIG.SYS:
SHELL=C:\COMMAND.COM /E:2048
Check the DOS Manual, though, because I am not sure about the syntax of the /E option.

0
 

Author Comment

by:chauntry
ID: 1215471
Thanks for all the comments people.  We've tried the /E on command.com but to no avail.  We have the source code to the program and tried changing the $M directive at the top.  It seems that if we set it to one figure (109312) we get the R6009 error when the capture runs, but if we up it one to 109313, we get a Program To Big To Fit In Memory error when the capture runs.  We've tried to get more base memory but that didn't help either.  We're running out of ideas (and hair!). Any other suggestions?  Keep them coming cause they are much appreciated.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 1

Expert Comment

by:FuzzyLogic
ID: 1215472
A. Are you using overlays? DPMI? Any unclear asm directives?
B. What is the size of the code and the executable program?
0
 
LVL 1

Expert Comment

by:Bonev
ID: 1215473
Could you be more specific about your application? Does it only launches another capture application or it does everything?
0
 

Author Comment

by:chauntry
ID: 1215474
Yes, we are using overlays, but not DPMI, and we have no unclear asm directives.  The compiler says 118672 bytes of code, and 60774 bytes of data.  The .exe is 152kb and the .ovr is 209kb.  The program has to print things across the network and so performs a capture before it prints because it can print to many different print jobs and queues, depending on what is being printed.  That is why we can't just do a capture before we kick off the program.  Thanks for all the comments.  
0
 

Author Comment

by:chauntry
ID: 1215475
I'll try to keep upping the points as we earn them.
0
 
LVL 1

Expert Comment

by:Bonev
ID: 1215476
Try to build the application as Protected Mode executable.
0
 
LVL 1

Expert Comment

by:FuzzyLogic
ID: 1215477
I don't sure, but I think your problem has something with the overlays you're using.
Can you recompile the program using units instead of overlays?
0
 

Expert Comment

by:elkiors
ID: 1215478
Since you're using '95, have you tried modifying the properties of the shortcut to your DOS program, ie adjusting memory allocation in there. Surely your program only really needs 361k of conventional memory, do you really need to use overlays at all ?
0
 
LVL 1

Accepted Solution

by:
ow earned 200 total points
ID: 1215479
As R6009 is not a pascal runtime error, I guess you call "capture" with the "Exec" procedure. But the NetWare utility "capture" does not influence the environment.
I think you call "capture" over a batch file, where you set an environment variable.
Under DOS the environment of such a child process will always have just the size of the used(!) environment of the parent process (your pascal program). In other words, there will only be place for setting an environment variable, if you have reserved space with a dummy in the parent environment.
Maybe on the machine running the program fine, for the affected variable "set" is used somewhere before in a login script.

Do avoid these problems, I recommend to use the NetWare Print Service API functions directly in your program and not to call an external process.
0
 

Author Comment

by:chauntry
ID: 1215480
Adjusted points to 200
0
 

Author Comment

by:chauntry
ID: 1215481
Thanks.  We haven't tried the idea yet but it is the most hopeful and original idea yet.  Why didn't we think of it?
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now