Possible BIND bug in Clarion 13630 - crashes with Array DIM variable

Hi,
I think this clarion crashes if bind is done on DIM variable. I created new application and just this procedure and it crashes. I do not see any problem with the code.
Can someone confirm this?
Thanks

   MEMBER('bug.clw')                                       ! This is a MEMBER module


   INCLUDE('ABTOOLBA.INC'),ONCE
   INCLUDE('ABWINDOW.INC'),ONCE

                     MAP
                       INCLUDE('BUG001.INC'),ONCE        !Local module procedure declarations
                     END


!!! <summary>
!!! Generated from procedure template - Window
!!! </summary>
Main PROCEDURE 

xxx real,dim(40)
Window               WINDOW('Caption'),AT(,,395,224),FONT('Segoe UI',9),RESIZE,GRAY,SYSTEM
                       BUTTON('&OK'),AT(297,201,41,14),USE(?OkButton),DEFAULT
                       BUTTON('&Cancel'),AT(342,201,41,14),USE(?CancelButton),STD(STD:Close)
                     END

ThisWindow           CLASS(WindowManager)
Init                   PROCEDURE(),BYTE,PROC,DERIVED
Kill                   PROCEDURE(),BYTE,PROC,DERIVED
                     END

Toolbar              ToolbarClass

  CODE
  GlobalResponse = ThisWindow.Run()                        ! Opens the window and starts an Accept Loop

!---------------------------------------------------------------------------
DefineListboxStyle ROUTINE
!|
!| This routine create all the styles to be shared in this window
!| It`s called after the window open
!|
!---------------------------------------------------------------------------

ThisWindow.Init PROCEDURE

ReturnValue          BYTE,AUTO

  CODE
  GlobalErrors.SetProcedureName('Main')
  SELF.Request = GlobalRequest                             ! Store the incoming request
  ReturnValue = PARENT.Init()
  IF ReturnValue THEN RETURN ReturnValue.
  SELF.FirstField = ?OkButton
  SELF.VCRRequest &= VCRRequest
  SELF.Errors &= GlobalErrors                              ! Set this windows ErrorManager to the global ErrorManager
     bind('xxx_1',xxx[1])
     bind('xxx_2',xxx[2])
     bind('xxx_3',xxx[3])         
     bind('xxx_4',xxx[4])
     bind('xxx_5',xxx[5])
     bind('xxx_6',xxx[6])
     bind('xxx_7',xxx[7])
     bind('xxx_8',xxx[8])
     bind('xxx_9',xxx[9])            
     bind('xxx_10',xxx[10])
     bind('xxx_11',xxx[11])
     bind('xxx_12',xxx[12])         
     bind('xxx_13',xxx[13])
     bind('xxx_14',xxx[14])
     bind('xxx_15',xxx[15])
     bind('xxx_16',xxx[16])
     bind('xxx_17',xxx[17])
     bind('xxx_18',xxx[18])  
     bind('xxx_19',xxx[19])
     bind('xxx_20',xxx[20])
     bind('xxx_21',xxx[21])         
     bind('xxx_22',xxx[22])
     bind('xxx_23',xxx[23])
     bind('xxx_24',xxx[24])
     bind('xxx_25',xxx[25])
     bind('xxx_26',xxx[26])
     bind('xxx_27',xxx[27])  
     bind('xxx_28',xxx[28])
     bind('xxx_29',xxx[29])
     bind('xxx_30',xxx[30])         
     bind('xxx_31',xxx[31])
     bind('xxx_32',xxx[32])
     bind('xxx_33',xxx[33])
     bind('xxx_34',xxx[34])
     bind('xxx_35',xxx[35])
     bind('xxx_36',xxx[36])  
     bind('xxx_37',xxx[37])
     bind('xxx_38',xxx[38])
     bind('xxx_39',xxx[39])         
     bind('xxx_40',xxx[40])
  CLEAR(GlobalRequest)                                     ! Clear GlobalRequest after storing locally
  CLEAR(GlobalResponse)
  SELF.AddItem(Toolbar)
  SELF.Open(Window)                                        ! Open window
  Do DefineListboxStyle
  INIMgr.Fetch('Main',Window)                              ! Restore window settings from non-volatile store
  SELF.SetAlerts()
  RETURN ReturnValue


ThisWindow.Kill PROCEDURE

ReturnValue          BYTE,AUTO

  CODE
  ReturnValue = PARENT.Kill()
  IF ReturnValue THEN RETURN ReturnValue.
  IF SELF.Opened
    INIMgr.Update('Main',Window)                           ! Save window data to non-volatile store
  END
  GlobalErrors.SetProcedureName
  RETURN ReturnValue
1 Like

This doesnā€™t crash, maybe itā€™s something else.

  PROGRAM

  MAP
  END


xxx                 REAL,DIM(40)
Ndx                 LONG

    CODE

        LOOP Ndx = 1 TO 40
            BIND('xxx_' & Ndx, xxx[Ndx])
        END
        
        xxx[40] = 1234.4
        MESSAGE(EVALUATE('xxx_40'))

I take that back. I was not using 13630. Sorry about that. My program crashes too.

Here is a workaround that seems to work, but I didnā€™t test extensively.

 PROGRAM

  MAP
  END


xxx                 REAL,DIM(40)
Ndx                 LONG
R                   &REAL

    CODE

        LOOP Ndx = 1 TO 40
            R &= xxx[Ndx]
            BIND('xxx_' & Ndx, R)
        END
        
        xxx[40] = 1234.4
        MESSAGE(EVALUATE('xxx_40'))
1 Like

Thanks for confirming.
The code I put is simulation of template generated code so I can not use the workaround.

Does the GPF happen on the BIND() or when using the variable e.g. Evaluate()?

If the BIND() does not fail then you could append the @jslarve BIND loop after the generated. Since it will have the same BIND(ā€˜nameā€™ā€¦) it will replace.

If the BIND fails then in the Templates donā€™t specify those variables, embed Jeffā€™s code.

The code should use Maximum():

xxx                 REAL,DIM(40)
    CODE
        LOOP Ndx = 1 TO  Maximum(xxx[],1)  !was  40
            BIND('xxx_' & Ndx, xxx[Ndx])
        END

GPF happens on BIND. I have decided to switch back to previous clarion version as this is unreliable.

Anyone here going to post this bug to PTSS?

If not I can email it to SoftVelocity as it seems significant and someday they will be releasing fixes to 13630 issues, right?

Can someone running 13630 test the APP Help File name:

  1. Does it default to a .CHM if no extension is entered?
  2. Can it be left blank and not have (.hlp) ?

If this is an APP where you do NOT want a Help file then be sure to open it fresh and make NO changes so you can CANCEL without saving; otherwise, the only way to get rid the of Help file is to do a TXA Export / Edit / Import.

Since .HLP cannot be used the IDE should not default to it. Also it should also NOT having a Help File.

I am just an external consultant connecting to my client pc. I told him to post bug report, but do not know if he has done. Feel free to post bug report if you want and can. Thanks

Might as well email it, but thereā€™s been a build coming forthwith since late September to fix that other big bug in 13630. Not sure if a PTSS is used any more.

From: Robert
Subject: Re: Silent Failure of Function called as Procedure in 13630
Date: 24 Sep 2020 17:05:44 -0400
Newsgroups: sv.clarion.clarion11

Yes, coming forthwith, indeed the new release is.

On Thu, Sep 24 2020 3:33 pm, Jeff Slarve [email protected] said:

If a fix is not coming forthwith, Iā€™d think a notification could be
sent to your registered users. The ones who donā€™t read the newsgroups
or Clarionhub will have to discover this bug in their own little
bubble, when a heads up could have saved them a lot of trouble.

On 22 Sep 2020 16:28:48 -0400, Robert wrote:

Everyone -

We saw this thread Sunday, and it was fixed on Sunday. The reason its
documented as it is - the donā€™t worry its ā€˜just a warningā€™ - is because of the
same outcries
about ~30 years ago - it seems old habits are here to stay. Anyways, the
behavior is preserved as it was, so no one need worry ā€“ the behavior change
was an unintended consequence from the new compiler support.

Robert

Where do you see the ā€œSoftVelocity download serverā€?

On PTSS I see 13639 in the version drop list. It is specified in some bugs, but it is the default so likely an error.

Robert phrases that like Yoda :frog:. The OED makes that sound great versus saying ā€œsometimeā€. Would Pierre Trembly say the release was coming ā€œtout de suiteā€?

adverb: forthwith

  1. (especially in official use) immediately; without delay.

Similar:

immediately - at once - instantly - directly - right away - straight away - now - this/that (very) minute - this/that instant - then and there - there and then - here and now - in/like a flash - instantaneously - by return - posthaste - without delay - without further/more ado - without hesitation - unhesitatingly - quickly - as quickly as possible - fast - speedily - with all speed - promptly - as soon as possible - ASAP - expeditiously - momentarily - in short order - tout de suite - straight off - toot sweet - pronto - double quick - p.d.q. (pretty damn quick) - in double quick time - at warp speed - ekdam - straightway - instanter - forthright

Opposite:

sometime

I donā€™t seem to have that email. Could it be the result of your participation in Anyscreen sub?

1 Like

My email links are to softvelocity.cachefly.net that I cannot find a way to change the link to see a list of anything. Changing the 13630 Readme link to 13677 is a 404.

Graham your account prefs here under Notifications must not have ā€œAllow other users to send me personal messagesā€ checked so cannot send PM. You can send me a PM by clicking on my Avatar and the blue ā€œMessageā€ button will show.

What Iā€™m missing, is how you know that.

Hi Graham,

I got it, thank you!

Best regards
Jeffrey

Well, maybe there exists 13899, who knows :slight_smile:

I just know itā€™s there (donā€™t ask :slightly_smiling_face:)

You have been very, very bad. Soon to be SV banned for 10 years.

Wondering if it has any AnyScreen fixes?
Currently unfinished and unusable to me, Feb should be my renewal month.
No chance SV gets more $$$ without a working product this time.

I emailed Robert @jslarve example Bind Failure code and he replied ā€œThe Bind issue seems to have been resolvedā€ so I would assume he tested it in his current build > 13630. He also tested my Blank Help file name and it has not been fixed.