Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Figuring out VFP crashes
Message
 
 
À
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:
01648686
Vues:
105
>>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)

I haven't yet tried your program - can you please post a link and tell if it would preserve a very complex form based on a class with ActiveX? Of course, I do have backups (in TFS).

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

I took care of some of these (there are quite a lot in many places).

>- 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"
>

I don't remember such checks in the code, but double check.

>- 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.

Thanks again.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform