Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Figuring out VFP crashes
Message
De
01/03/2017 13:52:42
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01648682
Message ID:
01648685
Vues:
151
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I am wondering what are the normal troubleshooting steps to figure out why a form is crashing for the users quite regularly (but not reproducible on demand).
>
>That form is quite complex and uses ctSchedule ActiveX control.
>
>How would I monitor possible memory leaks?
>
>What commands can I add to the code to help with that (assuming there are memory leaks leading to the crashes)?
>
>Thanks in advance.

Hi Naomi:

I have some steps I do when I have those cases (a few), from quicker to slower:

- Convert the SCX to text (SC2) with FoxBin2Prg and back to SCX: Sometimes the VCX/SCX table have some corruption in metadata that can cause this problems (normally, duplicated records). Others have solved this kind of problems (look at Msg.ID 1634833)

- Look for RETURNs inside WITH/ENDWITH (I read that someone posted that this is fixed in VFP 9, but just in case...)

- Are you using TYPE("var[1]")#"U" (or similar) to test if a var is an array? Previuos versions of VFP did crach randomly with this, don't know if fixed now, but it's better to use TYPE("ALEN(var,1)")="N"

- Use SYS(1011) to know the Number of Memory Handles used: This one is useful to detect memory leaks (problems with garbage collection with object references). Just take care that because the VFP automatic garbage collector is involved (if you do not garbage collect manually NULLing object vars and releaseing them), the number of memory handles can vary from one execution to another because VFP does not GC in real time and do it when IDLE, but at the end you should have approximately the same number of handles that before you started your main PRG.

Can't think on more options by now.
Fernando D. Bozzo
Madrid / Spain
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform