[Migrated content. Thread originally posted on 17 August 2010]
We have a small sub-program which we call to display a progress bar while we are setting up a mail merge for Microsoft Word. Sometimes (we don't really don't know when) we get a Memory Access Violation which APPEARS to be at the exit program instruction. We have been chasing this smoke ring for over a year now and are no nearer to finding a solution. We are using Acucobol 7.2. Here is the acucobol listing of the main loop of the program showing addresses, the error occurs at address 00033. This call (88 level = show-destroy-window) destroys the progress bar when Word is ready to be used. Can anyone help please?Main-Logic.
00000A if show-destroy-window
000019 if screen1-handle not = null
000022 accept event before time 1
000030 destroy screen1-handle
end-if
000033 exit program
end-if.
000035 initialize ws-counts
frame-title.
00004D if wait-msg-only
00005C move 0 to ws-percent
000060 move "Processing - Please wait ..." to frame-title
else
00006A compute ws-percent rounded = (wait-curr-rec
/ wait-num-recs)
* 100
00008B move ws-percent to disp-percent
000091 string disp-percent
" % Processed"
into frame-title
end-string
end-if.
00009D if screen1-handle = null
0000A6 perform acu-screen1-create-win
end-if.
0000A9 modify screen1-progress fill-percent = ws-percent
title frame-title.
0000C8 modify screen1-handle title wait-title.
main-logic-exit.
0000DA exit program.
Regards
Nick Brook
CCS (2002) Limited



