WebListBox: random hiccup when rendering list

Hello all,

I’ve been using a WebListBox in a Web 2.0 project I’ve deployed on-prem behind a Caddy server.
The Listbox is inside a Container and when Shown, it displays the contents of a database table.

Normally, it renders to something like this:

The problem is that, on random occasions, it renders like this:+

When it does, I navigate to some other container, then return to this one and it will most likely work ok again. Most likely, not always. It does glitch annoyingly often though.

The setup is as follows:

  • Xojo 2023R4 on Windows 10 , Web 2.0 app.
  • Deployed on a Windows 10 server
  • Single instance: Caddy server only does SSL offloading, no load balancing.
  • Manifests almost always during production (when connecting from a remote client). Don’t remember ever seeing it during debug, but I might be wrong.
  • Manifests both when connecting via Caddy and directly on the port the app is listening to.
  • List populate code on Shown event of the container
  • Minimal load, usually 1-2 sessions active, not doing much
  • List is 19 columns wide, less than 100 rows
  • The code clears the list if rowcount>0 , executes the query, gets the rowset, sets column count and then column names and goes on to create the rows. Nothing unusual there.

Can’t think of anything else that could be relevant.
Any ideas?

Thanks!

George

A few observations:

  1. The row count is the same as when everything is correctly displayed, then the query seems to work.

  2. Since the contents of the WebListBox is malformed, it looks like it is not connected to the row the quey returned

Did you try to connect back the ListBox to the data returned ?

HTH

Logically, the Listbox is in order. If inquired in code, it has the correct number of rows, columns and cell values. Visually, it’s messed up!

Can you take a look at the browser’s console to see if there is a JavaScript error reported there?

I managed to bypass the initial issue in this particular case, by setting the (fixed) column count in the IDE to 19 and not resetting it in the refresh code. I only set the Header names then, and now I stumbled into another issue:
Every now and then (still, annoyingly often), I get the correct column count but (visually) empty Headers. Logically, they carry their names properly, they just don’t display them

Also, no errors in the console

Tested with latest Firefox and Edge browsers.

It would be great to report this in Issues, with a sample project.

Thanks Ricardo, I will when I get some time to figure out how to put the case together.
The problem is that it might not be reproducible.
Even for me, I don’t get it in debug, only in production.

So maybe triggered by concurrent access? Multiple users/sessions?

Busy hiccups are a very common behavior in Xojo doing “parallel tasks”.

Good guess, but it can happen when I’m the only user connected

There’s another thing, that could have the same root cause:
The listbox also has a contextual menu. Sometimes, the custom menu fails to show. I get the generic browser menu instead. Then I navigate to some other form, come back, this form reloads and it shows okay.
It’s more rare and always on production, but it does happen.