mkromberg / jswc

Experiments with JavaScript-based GUI
MIT License
0 stars 3 forks source link

Queue problems #47

Open mbaas2 opened 3 weeks ago

mbaas2 commented 3 weeks ago

As I ran automated tests repeatedly, I often noticed a problem which seemed mainly related to TestButtons (understandably, because that test clicks a lot of buttonsd consequently there's some event handling going on).

The event handling seemed to get out of sync with the frontend (which I still find puzzling because the Test waits for the controls to update). As I ran TestButtons several times in a row (please test this using branch Issue_47 in which it is possible to do that, otherwise we're doing a ∪ of tests), I often saw this message on the JSWC server: image001

The problem is that one thread has already switched to DemoMenu while the crashing thread is still processing "something" to do with the prior test - which is no longer visible in the browser (which shows DemoMenu).

Unfortunately I am unable to come up with a reliable repro. The command

]dtest C:\Git\jswc\Tests\eWC_Browser.dyalogtest TestButtons TestEdit TestButtons TestLines TestButtons TestButtons  -clear

has often behaved as described, but not always.

mbaas2 commented 3 weeks ago

While we're at it, some more observations while running this series of tests:

Almost in every session I saw at least once a warning:

Link Warning: FileSystemWatcher error on directory: C:/Git/jswc watching may no longer be reliable.

I wasn't editing at all while tests were running.

And this came up once: (somehow something is out of sync as well) grafik

mkromberg commented 3 weeks ago

Do the tests create lots of temporary files in the Link’ed folder?

From: Michael Baas @.> Sent: 22. august 2024 12:59 To: mkromberg/jswc @.> Cc: Subscribed @.***> Subject: Re: [mkromberg/jswc] Queue problems (Issue #47)

While we're at it, some more observations while running this series of tests:

Almost in every session I saw at least once a warning:

Link Warning: FileSystemWatcher error on directory: C:/Git/jswc watching may no longer be reliable.

I wasn't editing at all while tests were running.

And this came up once: grafik.png (view on web) https://github.com/user-attachments/assets/314d099e-3ca4-4350-9c9e-eeaf54d15959

— Reply to this email directly, view it on GitHub https://github.com/mkromberg/jswc/issues/47#issuecomment-2304379676 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVLLRMXQUQUKDQXAX5PYDDZSXABBAVCNFSM6AAAAABM5XYZU6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBUGM3TSNRXGY . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/AAVLLRI4JOUI532NK5NP7KLZSXABBA5CNFSM6AAAAABM5XYZU6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUJLIFRY.gif Message ID: @. @.> >

mbaas2 commented 3 weeks ago

Depends on how you define "lots" 😉 They might save screenshots or save .rng files, but < 10 files... This all happens in the Tests folder which I had LINKed for my convencience, but actually it probably makes sense to not do that by default - I will take care of that.

mkromberg commented 3 weeks ago

I have a fix that needs to be applied to Link 4.0 that should make it much better at ignoring files which are not APL source code. I suspect that this will fix things. But for now, see if it helps.

From: Michael Baas @.> Sent: 22. august 2024 13:24 To: mkromberg/jswc @.> Cc: Morten Kromberg @.>; Comment @.> Subject: Re: [mkromberg/jswc] Queue problems (Issue #47)

Depends on how you define "lots" 😉 They might save screenshots or save .rng files, but < 10 files... This all happens in the Tests folder which I had LINKed for my convencience, but actually it probably makes sense to not do that by default - I will take care of that.

— Reply to this email directly, view it on GitHub https://github.com/mkromberg/jswc/issues/47#issuecomment-2304425854 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVLLRPVHL5FEURTN42ANK3ZSXC3RAVCNFSM6AAAAABM5XYZU6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBUGQZDKOBVGQ . You are receiving this because you commented. https://github.com/notifications/beacon/AAVLLROP7SVCOJPKS5OMXI3ZSXC3RA5CNFSM6AAAAABM5XYZU6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUJLK7X4.gif Message ID: @. @.> >

mbaas2 commented 3 weeks ago

Yep, it did. No more messages.

mbaas2 commented 3 weeks ago

Another instance of the issue mentioned in the initial post:

 48:22.029 w:  {Caller: "Demo_Issue82", Action:"WC", ID:"F1", Type:"Form", Properties:["Type","Caption","Posn","Size","Coord"]},
 48:22.089 w:  {Caller: "Demo_Issue82", Action:"WC", ID:"F1.S1", Type:"SubForm", Properties:["Type"]},
 48:22.093 w:  {Caller: "Demo_Issue82", Action:"WC", ID:"F1.S1.S2", Type:"SubForm", Properties:["Type"]},
 48:22.118 w:  {Caller: "Demo_Issue82", Action:"WG", ID:"F1",Properties:["Size"]},
880:Not returned:  Size 
∆WG[86] r←msg WaitForWG d ID(⍕WGID)
              ∧
 48:28.034 w:  {Caller: "DemoMenu", Action:"WC", ID:"LOGO", Type:"BitMap", Properties:["Type","File"]},
 48:28.043 w:  {Caller: "DemoMenu", Action:"WC", ID:"F1", Type:"Form", Properties:["Type","Caption","BCol","Coord","Size","Picture","Event"]},
 48:28.054 w:  {Caller: "DemoMenu", Action:"WC", ID:"F1.L1", Type:"Label", Properties:["Type","Caption","Posn","Size"]},
 48:28.241 w:  {Caller: "addDemoMenu", Action:"WG", ID:"F1",Properties:["Size"]},
 48:28.246 w:  {Caller: "addDemoMenu", Action:"WC", ID:"F1.MENU", Type:"Combo", Properties:["Type","Items","Text","Size","Event","Attach","Posn"]},
 48:28.250 w:  {Caller: "addDemoMenu", Action:"WC", ID:"F1.SCALE", Type:"Button", Properties:["Type","Caption","Style","State","Size","Event","Attach","Posn"]},
 48:28.256 w:  {Caller: "addDemoMenu", Action:"WC", ID:"F1.STOP", Type:"Button", Properties:["Type","Caption","Size","Event","Attach","Posn"]},