Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Record Out of Range
Message
 
 
To
14/08/2018 04:10:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01661541
Message ID:
01661580
Views:
36
>>Hi,
>>
>>I have one or two customers where their error log shows an error in a method Start. And the error message is "Record out of range." The customers themselves never reported this error; I just see it in their log file.
>>
>>This method Start is of the global application object (oApp) is called at the top of the application.
>>
>>The code in the Start method is as follows:
>>
>>
>>PROCEDURE Start
>>
>>	do while .T. 
>>	
>>		read events
>>		if this.cleanup()
>>			on shutdown
>>			this.cleanup2()
>>			if type('oPassword') = 'O' .and. !ISNULL( oPassword )
>>				oPassword.Close_user_login_file()
>>				oPassword.destroy()  
>>				oPassword = .NULL.
>>				release oPassword
>>			endif
>>			exit
>>		endif
>>
>>	enddo
>>
>>
>>I don't see any line of the code above that would cause the "record out of range."
>>
>>I have two questions:
>>1. If the error happened in a method called by Start (cleanup() and cleanup2() and method .Close_User_Login_File()), the error should point to that method and not Start(); correct?
>>2. Do you see anything that maybe need to be changed in this method?
>>
>>
>>TIA
>
>I think the reason why it shows the Start method is, because the error happens out of scope, and here is the Read Events loop.
>
>That would mean it could happen during releasing of some object while the program already is closing. Maybe the user pressed the X button of the main Screen? One indication would be where the Clear Events happens, or a Quit or Cancel is being triggered. If it happens frequently a log would help where all those actions are logged to a text file to see if the error occurs before or after.

You maybe on to something. It does not happen often but I have seen this error several times. I will log what happens in this method and see if I can figure the cause.
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform