Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clipper program freezes for 15 minutes

Status
Not open for further replies.

georgefiu

Programmer
May 7, 2008
8
IT
Hi,
I have a strange problem, that make me crazy, with a large Clipper program that opens many DBF files. Clipper version 5.01, Nanforum Library 2.1 and Blinker.
On win98 runs well and fast. Upgrading win98 with XP Pro SP2 the program runs well.
On a new XP installation on a blank partition of the same PC, the program runs for 1-2 minutes, then it freezes for 10-15 minutes, and after this time, it runs well again without any more problem.
I've compiled the program with original RTLink without any change.
No change running on full screen or on a window.
During the freeze the other Windows programs run well, and processor usage is low, about 10 % (i use the Idle patch).
I have the same problem on a new PC with Vista Home and Xp Pro installed on two partions.
I changed Clipper F parameter and FILES command on
Config.nt and autoexec.nt without any result.
More little programs with the same Nanforum library run well.
Please, some ideas ?
Sorry for my bad english.
 
Hi Georgefiu

That is strange. One thing that occurs to me right away is that setting parameters in autoexec.nt (ie clipper) has no effect under Win XP (and probably not under Vista though I have no experience there). On XP you use system properties/advanced tab and click on environment variables button and add clipper & its parameters to the system variables.

Alternatively put set clipper=f40;e0 in a batch file used to start up your program.

Possibly your problem may be expanded memory emulation, which is problematic under XP, so try using the E0 parameter on the clipper variable to disable it and see if that helps.

Jock
 
Thank for your answer, Jock.
After your reply I tried to put SET CLIPPER=E:0;F:141 (my program opens about 40 DBF files and their associates index files and DBT files: too many ?) in
the batch file I use to start up my program, and after this test I tried to put CLIPPER E:0;F:141 on XP system variables under properties/advanced tab, but without any change in my problem.
After 1 minute the program freezes for 10 minutes :-(
If you have some more idea I'll appreciate it.
Thanks !
George
 
georgefiu,

This sounds quite strange. I've never seen this type of hang. A couple of thoughts, what is the program doing at the point it hangs? Is it at a menu, is it parsing records in a table. Does it always hang at the same spot? Is it actually working put very slowly? If the program works with 40 dbf's, indexes & DBT's that OK. I don't use DBT's, don't like them. But I have close to the same number of DBF's & INDEX's open at a time in some of the processes in the apps I take care of. You are allocating a bit of memory for each DBF that open, but you should get a memory related error if that was causing problems.

Jim C.
 
I'm not sure you have the set clipper syntax right, I think you can drop the colons (keeping the semicolons tough) so that it looks like this:

Code:
SET CLIPPER=E0;F141

I'm not sure that will help though

Regards

Griff
Keep [Smile]ing
 
Hi Georgefiu

I agree with Jim C that is not too many files.
Where do the files reside? Are they shared with other users? If so, does the same slowdown problem happen if the problem machine is the only one accessing the files?

Jock
 
Is the program making any calculations upon opening the files. Also check your virtual memory and set it to let windows manage.

HAG
 
I have seen this before, when there was an 'ownership' problem with the files.

Are they on a file server?

Regards

Griff
Keep [Smile]ing
 
Thanks to all for your kind answers, and
excuse for my delay in replay, but I was busy with my job.
So, I answer:
i'm testing the program in a single PC, on a shared logical partition that I can see from the Win98 partition and from XP partition.
As I wrote, from win98 the program runs without problem.
The program can run on a LAN because all file are open in shared mode, but I use it on a single PC.

There isn't a point where the programs hangs: it freezes randomly, but only after 1-2 minutes,and without doing the same action. The program opens almost all files at start-up and take them opened until I close the program, so I can exclude that it hangs opening a new file.
Sometime, after the strange stoppage it runs again slowler.

I tried to delete the colons in CLIPPER variable, but, I'm sorry, without any result. In my NG guide the examples use the colon: I think it's a need in Clipper version 5.01.

I'm interested in the meaning of 'ownership': Griff, can you explain it to me ?

Thank again to all !
George


 
Hi

There is a funny thing with windows servers sometimes.

If the 'owner' of the file opens it, other users can take a while to get a copy.

If the file is not shared, it can't be a problem.

Regards

Griff
Keep [Smile]ing
 
Hi George

Can you do a mem /c at the command prompt and post the results for both the Win98 and XP environments?

Jock
 
Thanks for your answer, Griff.

It's an interesting Jock's question about free memory, so I had the idea to add in the Clipper program a code to read memory(0), memory(1), memory(2).
Here the results (average values):

win98 Win XP

memory(0) 80 106
memory(1) 52 64
memory(2) 4 41

So it seems that the free memory is larger under WinXP :-(

Here the values of mem /c:

WIN98
TOTAL FREE
CONVENT. 655KB 546KB
EXTENDED (XMS) 67 MB 522 MB (!? the free is larger than total ?)
EXPANDED (EMS) 67 MB 16 MB Available for program: 533KB
------

WinXP

TOTAL FREE
CONVENT. 688 KB 608 KB
EXTENDED 1 MB 1MB

So I think it's strange that extended memory under winXP is only 1 MB.

Thanks
George
 
Hi George

That extended memory size under XP looks low.

Have a look at this: thread288-1448180

It sounds very similar to your problem. Haq99 in that thread found his program was chewing up extended memory.

I'm not sure why your extended memory is so small under XP.
In my case, I get 16 meg.
In c:\windows\config.nt I have:
Code:
dos = high, umb
device = %SystemRoot%\system32\himem.sys
files=255
Also your virtual memory should be set to system managed or if custom then it should be at least as large as the recommended size (in system properties/advanced tab/performance).

Jock
 
Hi Jock,
I'm sorry for the delay in my answer to your message, but I'm busy with my job.

>That extended memory size under XP looks low.

I agree !

>Have a look at this: thread288-1448180: Program works on one Xp pro machine locks on different XP machine

I read this thread, but I've not understood about the problem 'zero divide': is it an error during mathematical calculations in the source code or a low-level error of the compiler ?
In my program before freezing there aren't mathematical calculations.

And I must tell that I launched mem/c at the Dos Prompt, not from the Clipper program.


>dos = high, umb
>device = %SystemRoot%\system32\himem.sys
>files=255

it's like my config.nt

>In my case, I get 16 meg.

This is very interesting : I think I must look for news about this difference between my system and yours.

>in system properties/advanced tab/performance).

In my XP Pro, in that Tab there isn't a command to manage virtual memory. I was lookin for it without any result.
I' ll try again tomorrow.

Thank again, Jock !
George

 
Hi, George

I believe they were talking about trappaing a division by zero exception, and event which was causing a leak of virtual memory. The point was that running short of VM seemed to be causing the extended lockup situation you are experiencing, which ties in with your mysterious shortage of virtual at the DOS prompt.

To get to the virtual memory settings, in more detail (and of course perhaps your locality implies different terminology:

Right click My Computer
Click on Advanced tab
In the Performance section, click on Settings button
The Performance Options dialog should open
Click on the Advanced tab there
In the Virtual Memory section click on the Change button
Now you should see the Virtual Memory dialog.

Here's hoping ...
Jock
 
Thanks for your patience, Jock.
I made a mistake: the virtual memory setting button is exactly where you said in your previous message. I think I am a little confused :)
In my pC the Virtual Memory was set to "user defined" (I translate from Italian language) from 2048 to 4096 MB and changing to "managed from system" nothing is changed in my Clipper program.

Looking around the web I found the solution to increase the extended and expanded memory at the Dos Prompt: the file C:\WINDOWS\_default.pif allows to set these values as needed, so now I can read by mem/c : Extended Memory 16 MB (or more; strangely it was set to zero) and Expanded memory 16 MB (or more, but I tried to set it to zero).
But my program continue to freeze for 10 minutes :-(.

Instead I found a solution to run Dos program in full screen under Vista. I never said about this problem because I have more important problems, but I hope that this article could help someone:
I' ll try some more solutions next days.

Thanks again, jock

George
 
Be sure NOT to use any expanded memory (EMS) when running Clipper programs that employ the DBFNTX RDD (the default one) as that is surely going to corrupt your databases and/or indexes.
The appropriate setting for disabling that is adding E0 (e-zero) to your Clipper setting like:
Code:
SET CLIPPER=E0;F250
(the value for F is arbitrary)
The usage of extended memory (XMS) is depending on the linker settings you have, but usually running Blinker with extended memory settings should not be an issue. ('blinker executable extended' works just fine over here, running Clipper 5.2e/Blinker 3.30)

The use of Clipper 5.01 can be a source of trouble though, but I would'n know how to upgrade to 5.2e (the most stable Clipper version ever) when there are no resellers taking Clipper orders... (AFAIK).

HTH
TonHu
 
TonHu's point about 5.01 vs 5.2e is very well taken. I do recall memory management problems with 5.01 when it would sometimes lock up when reorganizing working storage (not for 15 minuutes, though, but maybe that is environment-dependent).

site says they still sell clipper 5.2e ($199!!). Their FTP site has free patches to upgrade any 5.2 version to 5.2e, but I don't think that will work for 5.01.

5.2e is known as the best version of clipper 5. With 5.3 they added a lot of graphical mode stuff that bloated the compiler, made it more restrictive and less reliable in my opinion at least.

Jock
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top