In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

QTIPS - Window Bug and Debugging Window Bug

A subscriber recently had a problem with a post prompt redisplay of fields. Setting WC_REDISPLAY_LIST%, WC_DISPLAY_ACTION% and WC_RESET% on a post prompt worked perfectly most of the time, but if the user had asked for help by pressing F1 before this point, the system crashed with a "Non Numeric Data When Numeric Required - Zero Used" after the post prompt.

The bug turned out to be that the help call (which utilised an HD code and command), modified WC_LABEL% and put non numeric information into it. The subsequent WC_DISPLAY_ACTION% of 7 forced a redisplay (including labels) and WINDOW, not finding a label number, crashed. The problem obviously lay in the help call, but without access to system source, debugging this type of problem can be difficult. At this point, a utility from the last diskette from Dave Woodley came in very useful. Display_Arev_Common is a useful little routine that displays all the values of WINDOW_COMMON% at any point in time. With a little modification it was adjusted to write out all values of WINDOW_COMMON% to a dos disk file.

The routine was then put onto a macro key, and a snapshot of the WINDOW_COMMON% variables taken before and after pressing the F1 key. A small program was then written to compare the two versions of common line by line and to print out the differences. One of the first things it printed out was the WB_LABEL% difference. If having problems with unusual window errors, this approach can be used simply to great effect.

(Volume 3, Issue 5, Pages 10-11)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel