Silverfrost Forums

Welcome to our forums

Bug in SF8.3 Clearwin when trying to close 2+ child windows?

26 Jun 2018 8:18 #22267

Hi Support,

We think we've found a bug in the Window_update@ routine when trying to close 2 or more child windows in SF8.3. Our sample code works fine in SF8.1 but not SF8.3. Are you able to investigate and confirm please?

We provide further details below and the sample code to reproduce the problem.

Sample application:

In Clearwin, the program generates a format window containing 3 child windows side-by-side (with vertical scroll bar) and another pivoted child window at the bottom.

The issue:

The application hangs without closing just after or at Window_update@ line when running in Windows 7. If we're running Windows 10, the application crashes instead of hanging, generating two Werfault messages . In Windows 10, the event viewer shows the failure occurring in the SF 8.3 Salfibc.dll. However, if we run the same compiled executable but using SF 8.1 Salflibc.dll it successful completes without any errors.

We subsequently ran some further tests with different combinations of clearwin windows. The application worked fine in SF8.3 if there was only one child window but failed if two or more child windows were used. SF8.1 worked with all combinations.

If you need any more information, please let us know.

Many thanks

Ian

[I've had to attach the code as separate post to fit in the space available]

26 Jun 2018 8:28 #22268
      PROGRAM MAIN
C
      common /win32/ modef,ictrlgr,ihwgr,ictrl0,ihcw0,ictrltx,
     +               ihcwtx, iwin0, ictrlwindy, ictrlaux
C
      integer*4 winio@
      external fccwindy
C 
C-following is necessary for SET_ALL_MAX_LINES@ ?
C otherwise integer definition of @winio@ sufficient?
      include <windows.ins>
C
      CHARACTER*80 K80
C      
C******** WINDY_PROBLEM_MIN
C
C
C-call to SET_ALL_MAX_LINES moved after ClearWin windows created
C as this is consistent with SET_MAX_LINES which requires handles 
      CALL SET_ALL_MAX_LINES@ (100)
C
      K80 = 'WINDY_PROBLEM'
      i=winio@('%ca@&',K80)
      i=winio@('%ob[named][Ass/Sim Convergence]&')
      i=winio@('%23.20cw[vscroll]%cb&',60)
      i=winio@('%ob[named][Assignment]%23.20cw[vscroll]%cb&',61)
      i=winio@('%ob[named][Simulation]%23.20cw[vscroll]%cb&',62)
      i=winio@('%ff%nl%pv%80.6cw[vscroll]&',63)
      i=winio@('%cc&',fccwindy)
      i=winio@('%ww%lw',ictrlwindy)
C
      do j=1,2
          do k=60,63
            call DOSOME(K,10)
          end do
      end do
C
      CALL PROGF_WINDOWS
C
      STOP
      END
C
C
      SUBROUTINE DOSOME(K,N)
      do i=1,N
        write(K,'(I3,I8)') k,i
        call sleep1@(0.1)
        end do
      END
C      
C
      integer*4 function fccwindy()
C
c This function is an argument of %cc in winio@ that
c create some 'windy' windows
c I made it to prevent the windy window from being closed
c accidently by the user.
C
      common /win32/ modef,ictrlgr,ihwgr,ictrl0,ihcw0,ictrltx,
     +               ihcwtx, iwin0, ictrlwindy, ictrlaux
      fccwindy=-ictrlwindy
      return
      end
C
C
C
      SUBROUTINE PROGF_WINDOWS
C
C     BIT OF PROGF THAT DEALS WITH CLOSING WINDOWS
C     CALLED BY PROGF IN GLIB AFTER PROGF_CTL AND PROGF_FILES IN CASE
C     THERE ARE ANY PROBLEMS WITH WINDOWS NOT SHUTTING DOWN PROPERLY AND
C     LEAVING A PROGRAM HANGING.
C
      common /win32/ modef,ictrlgr,ihwgr,ictrl0,ihcw0,ictrltx,
     +               ihcwtx, iwin0, ictrlwindy, ictrlaux
C
C
         if (ICTRLWINDY.NE.0) then
          ictrlwindy = 0       
          call window_update@ (ictrlwindy)   
         end if
C
      RETURN
C
      END
26 Jun 2018 11:34 #22270

Ian

Your program fails at runtime for me when compiling for 64 bits. It runs OK but with a delay when terminating for 32 bits.

I have now identified and fixed a related bug in ClearWin+ but I don't know why this did show in earlier releases. Your program now runs correctly for me and there is no delay when terminating for 32 bits.

Let me know how urgently you need a update. An intermediate beta release is probably due anyway.

27 Jun 2018 8:20 #22273

Paul

Thanks for the speedy reply. We are only using 32bit executables at present. The delay we encountered was around 5-10 seconds for each of the two WerFaults in Windows 10. Are you running with Windows 10?

We would be grateful for an immediate update as we're planning a major release in mid-July and we wish to run some tests over the next couple of weeks. In terms of the next full release (SF 8.40?), do you have an indication of the timeframes?

Thanks

Ian

27 Jun 2018 11:14 #22275

Ian

I will see what I can do for an intermediate beta release of the DLLs. I don't have any information about a date for the next full release.

30 Jun 2018 1:31 #22287

Please see...

https://forums.silverfrost.com/Forum/Topic/3403

19 Jul 2018 6:20 #22374

John

I have looked at this and fixed it to the extent that it is now OK in the tests that I have run. The fixes are in the latest download.

2 Aug 2018 9:53 #22423

Thanks for the quick response to the problem Ian raised. Now using the latest we get a failure in a simple yes/no question box...

Compiled with the 8.40 beta and accompanied by the 30th June 2018 salflibc.dll (32 bit) the winio@ returns 0.

If I replace the salflinc.dll accompanying the executable with the 2017 version, this appears to work fine?

      integer*4 winio@
      integer*4 ianswer

      character*256 form
      character*256 form2
      character*256 caption
      character*256 body

      body = 'Ask yes/no - expect 1/2 respectively'


      caption = 'all in one winio'

      form = '%ca@%si!' // 
     1  trim(body) //
     2  '%nl%nl%cn%bt[&YES]%ta%`bt[&NO]'

      ianswer = winio@ (form,trim(caption))
      print *,ianswer

      ianswer = winio@ (form,trim(caption))
      print *,ianswer


      caption = 'split over two winio'

      form = '%ca@%si!' // 
     1  trim(body) //
     2  '%nl%nl&'

      form2 = '%cn%bt[&YES]%ta%`bt[&NO]'

      ianswer = winio@ (form,trim(caption))
      ianswer = winio@ (form2)
      print *,ianswer

      ianswer = winio@ (form,trim(caption))
      ianswer = winio@ (form2)
      print *,ianswer


      stop
      end
3 Aug 2018 6:48 #22430

Please try the later download which is at

https://www.dropbox.com/s/g3ir4nx0wjxqba1/acw.zip?dl=0

Please login to reply.