BUILD() with progress events stops after one event in 11.1

Hi Everyone…

It seems to me that BUILD() with progress events is broken in Clarion 11.1

My utilities for rebuilding keys (TPS, CLARION) with progress feedback are failing after compiling in C11.1. After the first Event:Buildkey is posted, no further such events occur - the build never proceeds past that point.

The code has always worked fine under Clarion 11 and still does.
Has anyone else encountered this?

This must be a bug:

  1. I ran the example program in the Clarion help (search for PROP:ProgressEvents)
    It fails to build the keys after creating the sample records; it hangs but responds to user input and then CLAIMS the build was successful. However, I ran Topscan which showed the keys are empty.
  2. I then told Topscan to build the keys. I hangs like my code does.
  3. I then ran Topscan from C10. It showed the keys are empty, but on my command it successfully completed the build process and then confirmed the keys are good (by showing the records in the key-order tabs.

Make an example program to demonstrate the bug. Make it as small and focused as possible. Submit it on PTTS. Also post it here so others will test it and confirm.

Also please resort your post to include the Clarion build number of 11.1 you are using.

Thanks for the suggestion, Carl.

I am using C11.1 build 13768.

I believe you can see the problem in Topscan if you try to have it build ANY tps file or clarion file via rebuild-all-keys.

Below is small program, the sample program from the Clarion help. I am using it to make sure the problem is not due to my faulty code (i.e. my misunderstanding of how it is supposed to be done). (I removed an unnecessary bit where it offers to create a duplicate-key record)

It creates mytps.tps. When you click on the “build file (with events)” button, it seems to work, but then if you click on the close window (X) button, nothing seems to happen; pressing it again shows a “BUILD OK” Message box, but then if you exit and look in topscan, the keys are empty.

Under Clarion 11 (not 11.1) my build-keys-with-progress-events code is working fine, as is topscan from Clarion 11. In this 11.1 environment, it is broken.

At this point, I’m pretty sure it’s a clarion bug. I can work around it (though some aesthetic quality is lost), but I am concerned that the underlying bug in the runtime code that causes this may also cause problems for me and others in unexpected ways.

I did post an entry in the problem tracker system.

Here is the sample program:

  PROGRAM

                    MAP
                      CheckError(), bool
                    END
 
Window  WINDOW('Event:BuildDone Example'),AT(,,209,76),| 
          FONT('MS SansSerif',8,,FONT:regular,CHARSET:ANSI), |
          CENTER,SYSTEM,GRAY,DOUBLE
          BUTTON('Create file'),AT(3,5,57,22),USE(?Button:CreateFile)
          BUTTON('Build File (With Events)'),AT(71,7,84,22),USE(?Button:Build)
        END
 
MyTPS   FILE, DRIVER('TOPSPEED'), CREATE, RECLAIM, NAME('MyTPS.tps'),PRE(MYT)
PK_IDKey  KEY(MYT:ID), PRIMARY
K_DescKey KEY(MYT:Description), DUP, NOCASE
Record    RECORD
ID          LONG
Description CSTRING(256)
          END
        END
 
COUNT LONG, AUTO
  CODE
  OPEN(Window)
  ACCEPT
    CASE EVENT()
    OF Event:Accepted
      CASE FIELD()
      OF ?Button:CreateFile
        ?Button:CreateFile{Prop:Disable} = TRUE
        CREATE(MyTPS)
        IF CheckError()
          POST(Event:CloseWindow)
          CYCLE
        END
        OPEN(MyTPS)
        IF CheckError()
          POST(Event:CloseWindow)
          CYCLE
        END
        STREAM(MyTPS)
        LOOP Count = 1 to 100
          CLEAR(MyTPS)
          MYT:ID = Count
          MYT:Description = 'Desc#: ' & Count
          APPEND(MyTPS)
          IF CheckError() THEN BREAK.
        END
        FLUSH(MyTPS)
        CLOSE(MyTPS)
        ?Button:CreateFile{Prop:Disable} = FALSE
      OF ?Button:Build
        ?Button:Build{Prop:Disable} = TRUE
        MyTPS{Prop:ProgressEvents} = 100
        SEND(MyTPS, 'FULLBUILD=on')
        BUILD(MyTPS)
        IF CheckError() THEN POST(Event:CloseWindow).
      END
    OF Event:BuildFile OROF Event:BuildKey
    OF Event:BuildDone
      IF CheckError()
        MESSAGE('BUILD FAILED !', 'BUILD', Icon:Hand)
      ELSE
        MESSAGE('BUILD OK', 'BUILD', Icon:Asterisk)
      END
      ?Button:Build{Prop:Disable} = FALSE
    END
  END
 
!------------------------------------------------
CheckError          FUNCTION()
  CODE
  IF ERRORCODE()
    MESSAGE(ERROR(), 'CheckError: ' & ERRORCODE(), Icon:Hand)
    RETURN TRUE
  END

RETURN FALSE

1 Like

Posted as PTSS #43303

1 Like

I did last December and it has not been addressed…

Problem Reference: 43267
Date Received: 2021-12-03
Status: Opened for Review
Fixed in Build Number:
Product: Clarion11
Build No: 11013768
Operating System: Win 10 Pro
Category ID: Clarion RTL
Summary: PROP:ProgressEvents - Broken

noted as fixed in build 11.1.13810