Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Crash using smg$scroll_display_area

Seinhorst
Occasional Visitor

Crash using smg$scroll_display_area

When I use the smg$scroll_display_area subroutine in a pascal program, it crashes when the first and the last line are empty, and scrolling a full screen minus one line (see example).

Are we using it the wrong way, or is it a (known) bug?

OS: HP OpenVMS Industry Standard 64 Operating System, Version V8.3-1H1
Patches: NO
HW: Integrity



[INHERIT('SYS$LIBRARY:STARLET.PEN',
'SYS$LIBRARY:PASCAL$SMG_ROUTINES.PEN')] PROGRAM TEST(INPUT,OUTPUT);

VAR
disp: UNSIGNED;
pasteboard: UNSIGNED;
I: INTEGER;
rows,cols:INTEGER;
testlen:INTEGER;
doScroll:BOOLEAN;
BEGIN
testlen:=19;
doScroll:=TRUE;

smg$create_pasteboard(pasteboard,,rows,cols);
smg$create_virtual_display(testlen,60,disp,smg$m_border);
smg$paste_virtual_display(disp,pasteboard,2,5);

FOR I := 2 TO (testlen-1) DO
smg$put_chars(disp,DEC(I,2,1),I,1);

IF doScroll THEN
smg$scroll_display_area(disp,,,,,,testlen-1);
END.
7 REPLIES
P Muralidhar Kini
Honored Contributor

Re: Crash using smg$scroll_display_area

Hi Seinhorst,

Some info on "smg$scroll_display_area", in case you have not already referred -
http://www.itec.suny.edu/scsys/vms/OVMSDOC0731/731final/5841/5841pro_058.html
http://pupgg.princeton.edu/HELP/RTL_ROUTINES/SMG_/SMG_SCROLL_DISPLAY_AREA

Regards,
Murali
Let There Be Rock - AC/DC
Hoff
Honored Contributor

Re: Crash using smg$scroll_display_area

My Pascal is rusty, but I don't see any error-handling in the posted code.

If that's the case, then you might want to revisit that and implement some error handling.

The SMG manual looks to be somewhat spotty here in this regard (as various Pascal examples lack any error handling), though I do see error handling in a Pascal example for the SMG$SELECT_FROM_MENU call, located on page SMG-344 in the SMG manual at:

http://h71000.www7.hp.com/doc/73final/documentation/pdf/ovms_73_rtl_smg.pdf

Failure to have error handling means errors can cascade, of course, and can make an entire application harder to support and harder to maintain.

The other programming document to read through here (if you've not already done so) is the OpenVMS Programming Concepts Manual, which describes the format and structure and usage of condition handling; of errors and returns and related handling. That's the generic model used underneath all OpenVMS languages.

The Pascal and OpenVMS manuals are available via:

http://www.hp.com/openvms/doc

You might also want to apply the current mandatory ECOs, but that's secondary to the problems in the code.

John Gillings
Honored Contributor

Re: Crash using smg$scroll_display_area

Seinhorst,

I think you've found a bug. Your code, run on OpenVMS/IA64 V8.3-1H1, gets an ACCVIO in OTS$MOVE called from SMG$FLUSH_BUFFER.

The same code run on OpenVMS/Alpha V8.3 is successful (or, at least, doesn't result in an ACCVIO).

> I don't see any error-handling in the posted code.

Error handling might be appropriate when calling routines that are documented to signal expected errors, but in this case, no RTL routine passed with correct arguments should ever signal an ACCVIO.

Your arguments are valid. My experiments show the ACCVIO occurs if the count is 18 or higher, but only on Itanium. I believe it's a bug.

My version of your program is in MACRO32, so it's not a Pascal issue. Most likely something in SMGRTL. Please raise a case with HP customer support.

(and, BTW, it's very nice to see such a succinct reproducer!)
A crucible of informative mistakes
Ranjan Sarangi
Occasional Advisor

Re: Crash using smg$scroll_display_area

Hi Seinhorst,

This problem has been fixed. Latest kit of SMGRTL will have this fixed image included. We verified this problem on V8.3-1H1 system with the latest image.

$ test_program_given

â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â
$ â â
â â
â â
â â
â â
â â
â â
â â
â â
â â
â â
â â
â â
â â
â â
â â
â â
â â
â â
â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â

This test program with new SMGSHR image succesfully creates a rectangular box.

Regards
Ranjan
Shriniketan Bhagwat
Trusted Contributor

Re: Crash using smg$scroll_display_area

Hi Ranjan,

It looks to me like (from your update) the kit is not yet out for the customers. An idea about the kit name/number and probable release date for the kit?

Regards,
Ketan
Ranjan Sarangi
Occasional Advisor

Re: Crash using smg$scroll_display_area

Hi Sriniketan,

VMS831H1I_SMGRTL-V0200 kit will have the fix for OpenVMS IA64 V8.3-1H1 version. Usually it takes 8-9 weeks of time to make it available for customers.

- ranjan
Seinhorst
Occasional Visitor

Re: Crash using smg$scroll_display_area

Hi Ranjan,

On 23-jun-2010 I received your message:

" VMS831H1I_SMGRTL-V0200 kit will have the fix for OpenVMS IA64 V8.3-1H1 version. Usually it takes 8-9 weeks of time to make it available for customers.

- ranjan "

Do you know the status of this kit. I can't find this kit.

Regards,
Maarten Seinhorst