Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Severe situation on bug
Message
De
30/07/2001 01:28:31
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Severe situation on bug
Divers
Thread ID:
00537068
Message ID:
00537068
Vues:
63
I just discovered something extremly severe in regards to a specific bug. For years, I had an error handler which was working fine. Tonight, I discovered a specific situation where this is not the case.

At the end of my error handler, I have RETURN TO ProcessHit. This is within WWC, where after I have logged the error, I return the control back to that method. So, wherever the code was when the error occurs, after the error handler is completed, the continuation of code of the method where the error occured is stopped as the RETURN TO ProcessHit redirects to a upper method.

I never had any problem with that logic. This is also what is mentioned in WWC when using our own error handler. The problem is not there. As I said, it was working fine for years.

So, basically, here is scenario one from a specific function down the code:
LOCAL lcVariable
lcVariable='x'
lcNewVariable=z
MESSAGEBOX('test')
This will generate an error as z doesn't exist. So, what happens is that the error handler kicks in, log the error and return to somewhere else. So, the messagebox never fires.

So, whatever the type of error is this is what will happen. That has worked perfectly until now.

Scenario two:
SELECT Contact
COUNT FOR IRegion=lnRegion
MESSAGEBOX('test')
This will generate an error as lnRegion doesn't exist. In this particular situation, the RETURN TO ProcessHit never happens. After the error handler as completed, the control returns here to show the messagebox. The RETURN TO ProcessHit is for some kind of reason never done.

I did several tests. If I do:
SELECT * FROM Contact COUNT FOR IRegion=lnRegion
MESSAGEBOX('test')
That will work. The error handler will kick in, log the error, redirect to ProcessHit. The messagebox will never happens.

What I have discovered is that the COUNT function of Visual FoxPro seems to lock a process in memory which will interfere with a redirection. This will only happen during a COUNT function. I never had that for other errors.

I have to say this is the most ridiculous situation I ever saw in Visual FoxPro. What can I do in my error handler to disable the COUNT behavior on the error handler? I have CLOSE DATABASE ALL in my error handler right at the top and this happens also. It doesn't make any sense to me.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform