Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vars hanging around and causing a crash
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01627337
Message ID:
01627340
Vues:
69
>Hi all,
>
>My app is calling the FoxFire report engine where it sets up a large number of vars as PRIVATE on the way into it's main program (configuration vars). When the user exits the FoxFire program and returns to mine, if they exit their app fairly soon after, they get a crash with a C5 error. I can reproduce this. When I look in the debugger, most times there seems to be a vestigal ("ghost") vars of all their vars left over.
>
>I say they are "ghost" vars in that you can see the name in the debugger but you cannot query the value of it e.g. in the locals window, this is an example of a var:
>
>pg_sysobj value = (none)
>
>and in the "Watch" window, it shows as "expression could not be evaluated".
>
>so I wondered what that was "variable"?
>
>It was not null because
>
>ISNULL(pg_sysobj) came back as "expression could not be evaluated".
>
>It is possible that VFP has not fully "cleared" these memvars from memory since there are so many of them? This seems to be what causes the crash because if I wait long enough, I don't always get a crash
>
>Albert
>
>(Note: I have asked Foxfire tech support but they don't have any ideas at this point.)

This is a complete WAG, but try this after FoxFire returns to your code.

Declare Integer SetProcessWorkingSetSize In kernel32 As SetProcessWorkingSetSize ;
Integer hProcess , ;
Integer dwMinimumWorkingSetSize , ;
Integer dwMaximumWorkingSetSize
Declare Integer GetCurrentProcess In kernel32 As GetCurrentProcess

bb = SetProcessWorkingSetSize(GetCurrentProcess(),-1,-1)
Brandon Harker
Sebae Data Solutions
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform