Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Catching error Record is out of Range
Message
 
 
To
13/04/2022 07:20:35
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01684146
Message ID:
01684161
Views:
29
Thank you for your input and for the detailed suggestions.
The positive of this thread is that Tamar confirmed having a very similar issue with one or some of her clients. Now I know where the problem occurs; I just can't duplicate it when running the application on my PC.
Before Tamar replied to one of my messages, I thought that the error messages Record is out of Range was something like a simple bug I have. But I know now that it is more difficult to duplicate and fix.
Fortunately, the error happens very infrequently (at least in my case) and very random.
I will test the case, once in a while, running the app on my PC, to see if all of sudden I can duplicate it.
Otherwise, I won't do anything else.

>Tore already explained my typing lazyness.
>If you don't have any coverage / profiling in your classes, either create a singleton object with rudimentary tracing / logging or add fuctionality to app class.
>I usually output "app milestones" to file and screen (nowait noclear) with simple info of
>datetime, time since last call, possible stopwatch time, function/method name and stacklevel
>which is controlled either via some external file setting or existance of flag files.
>
>Normal usage is unhindered, as both are disabled there, but in such cases
>user having problem can enable via editing ini / JSON / XML / DBF or creating a file with special name.
>
>If you have speed problems already and want to add fine grained analysis (calls on almost all functions or set coverage often active), you can double guard by creating a special version where these calls are also wrapped by compiler switch, user has to open "tracing app" with active calls.
>
>/upd:
>One thing to keep in mind: if error is caused by race condition, timing or similar,
>which also happens sometimes when an error only manifests when debugger is inactive,
>the error might not come up with wait window output active, as it calls some cleanup.
>Often such finer grained analysis is handled by simple numeric switch in logger class:
>comparing current setting with setting needed for "analysis that deep"
>
>If you call via
>= logger.loglevel >= YOURSPECIALCONSTANT and logger.Log()
>
>your code stays small enough even if you add often on entry and exit of method, as only 2 lines are added.
>
>If your logging needs are heavy and include timing needs,
>create routines in C with a simple clean interface
>c_log_on(numeric_ident)
>c_log_off(numeric_ident)
>and handle everything in C variable space to reduce added overhead by a factor of 4 - 10.
>
>If you have code taking exponential times (heavy calc depending on string length with different search patterns), sometimes special routines are needed to identify - you call it with second logger or parameter.
>
>Your case is easy: identify last running method, sprinkle in more loggers or set coverage to special file.
>
>>I can only understand the top of your message. Answers:
>>Yes, the error happens only on a client PC, not on my PC.
>>I don't know if user input is possible or not. They never tell me the facts.
>>What is 'fwk'?
>>
>>>Not enough info!
>>>Guessing:
>>>a) error crops up only clientside, not at your machine
>>>b) happens before user input is possible
>>>
>>>basically you should have a logging fwk IAC, which answers this (and timing problems)
>>>none exists, and b) is true or error happens with minimal user input,
>>>create a version starting with coverage set to a file you can analyze
>>>if you have stack in errorhandler, better start coverage at a time "in stack" guaranteed to run,
>>>cutting off MB of unneeded coverage log - typical "switch" for me is existance of a flag file.
>>>
>>>HTH
>>>thomas
>>>
>>>>
>>>>I read (again and again) all the messages regarding this problem (in threads I posted before). I also viewed the screen images (my error handler saves the screen image at the time of the error) at the time of the errors. And the images show one of the form (very complicated form) with the PageFrame.Page container showing the page with a Grid.
>>>>Note that the error message of this error is caught by the Start() method (the method which calls READ EVENTS and then closes the application.
>>>>So, I am convinced that the error is caused by some Thisform.referesh() or another call in this form, when something "odd" happens in the grid.
>>>>My question. What type of code do you suggest I add to this form and where to, hopefully, catch this error?
>>>>
>>>>TIA
"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