[mod.computers.vax] SWING problems!!

"MCCORE::THURY@ti-eg.CSNET".UUCP (03/04/87)

Well, I went through all the work of copying and building the SWING image
(it really sounded like a good utility).  When I ran the resulting image,
everything SEEMED to work ok; I was able to more around, create, move, and
rename directories just fine.  However, when I attempted to delete one of
my created test directories I got an array overflow message, and the program
bombed!

I then tried it again, showing it to some of my users (with the caveat about
the one bug with the delete function) to see what their impression of this
utility is.  During this show and tell, I tried the HARDCOPY command.  AGAIN
I got an array overflow error and the program bombed!

Anybody else experienced similar problems?  Did I lose something in the
transmission?  Guess it's time to start sharpening-up my FORTRAN debugging
skills!!!

	Denny Thury	                 CSnet : THURY%MCCORE@TI-EG
        VAX Systems Support              ARPA  : THURY%MCCORE$TI-EG.CSNET
        Texas Instruments Incorporated
        McKinney, Texas

u3369429@seismo.CSS.GOV@murdu.OZ.AU (03/06/87)

In article <8703041819.AA06135@ucbvax.Berkeley.EDU>
MCCORE::THURY@ti-eg.CSNET (Denny Thury -- VAX System Sup -- 952-2066) writes:
>Well, I went through all the work of copying and building the SWING image
>(it really sounded like a good utility).  When I ran the resulting image,
>everything SEEMED to work ok; I was able to more around, create, move, and
>rename directories just fine.  However, when I attempted to delete one of
>my created test directories I got an array overflow message, and the program
>bombed!

The message should have said something about subscript out of bounds.
I could re-construct that condition and the fix follows.

>I then tried it again, showing it to some of my users (with the caveat about
>the one bug with the delete function) to see what their impression of this
>utility is.  During this show and tell, I tried the HARDCOPY command.  AGAIN
>I got an array overflow error and the program bombed!

Sorry, I could not reproduce this error. Try to implement the revised
FIND_NODE and try again. But please, include some more info, e.g. trace back.
 
>	Denny Thury	                 CSnet : THURY%MCCORE@TI-EG
>        VAX Systems Support              ARPA  : THURY%MCCORE$TI-EG.CSNET


Thanks for this report.

I could reproduce the crash when one creates and deletes directories.
It occurred under certain circumstances when directories were created and
then deleted without having left SWING.

The guilty subroutine (FIND_NODE) follows (corrected).

If you still have the files SWING.OLB and SWING.OBJ, you can repair the program
using this:

$ Fortran/Check FIND_NODE
$ Library SWING FIND_NODE
$ Delete FIND_NODE.OBJ;*
$ Link SWING,SWING/Library


Apologetic,

Michael Bednarek (u3369429@murdu.oz.au)

P.S.: sysykl@hujimd.bitnet (Melnik Yehezkel) complained that he got only
      part 0 of my posting. I suggest somebody closer to him than me
      mails parts 1-6 to him.

X---X---X---X---X---X Cut here and execute (@) X---X---X---X---X---X---X---X
$write sys$error "extract FIND_NODE.FOR"
$copy sys$input FIND_NODE.FOR
$deck/dollars="Fix_Find_Node"
	logical function find_node(dir_spec,ptr)

! Returns the pointer (ptr) of a given dir_spec

	include 'swing.cmn/List'

	character dir_spec*(*)
	integer   ii,jj,ptr,ll
	logical   found_node

! Find the non-blank length of dir_spec
	ii=len(dir_spec)
	do while (ii.gt.0 .and. dir_spec(ii:ii).eq.' ')
	 ii=ii-1
	end do

! Now search through node.spec
	jj=1
	found_node=.false.
	do while (.not. found_node)
	 ll=node(jj).length
	 If (ll.gt.0) then
	  if (node(jj).spec(1:ll).eq.dir_spec(1:ii)) then
	   found_node=.true.
	   ptr=jj
	  end if
	 End If
	 jj=jj+1
	end do

	find_node=found_node

	return
	end
Fix_Find_Node