WEBLISTBOX empty same query after some refresh

I have page with a weblistbox realtime creation.

Before launch a new query I’m closing the weblistbox.

After launch the query and remove/draw the weblistbox (more or less 3 or 4 times), the grid is filled like a blank rectangle (with the menu) but it’s completely empty.

After this, if I run the query again the weblistbox is allways empty

Can someone help me?

I’m managing all exceptions but there is no exception

catch err as COM.COMException
App.ErrorSistema(“COMException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as CryptoException
App.ErrorSistema(“CryptoException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as DatabaseException
App.ErrorSistema(“DatabaseException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as EndException
App.ErrorSistema(“EndException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
Catch err as FunctionNotFoundException
App.ErrorSistema(“FunctionNotFoundException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
'catch err as HTMLViewerException
'App.ErrorSistema(“HTMLViewerException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as IllegalCastException
App.ErrorSistema(“IllegalCastException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as IllegalLockingException
App.ErrorSistema(“IllegalLockingException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as InvalidArgumentException
App.ErrorSistema(“InvalidArgumentException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as InvalidParentException
App.ErrorSistema(“InvalidParentException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as IOException
App.ErrorSistema(“IOException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as IteratorException
App.ErrorSistema(“IteratorException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as JSONException
App.ErrorSistema(“JSONException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as KeychainException
App.ErrorSistema(“KeychainException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as KeyNotFoundException
App.ErrorSistema(“KeyNotFoundException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as MenuHasParentException
App.ErrorSistema(“MenuHasParentException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as NamespaceException
App.ErrorSistema(“NamespaceException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as NetworkException
App.ErrorSistema(“NetworkException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as NilObjectException
App.ErrorSistema(“NilObjectException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as ObjCException
App.ErrorSistema(“ObjCException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as OLEException
App.ErrorSistema(“OLEException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as OutOfBoundsException
App.ErrorSistema(“OutOfBoundsException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as OutOfMemoryException
App.ErrorSistema(“OutOfMemoryException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as PlatformNotSupportedException
App.ErrorSistema(“PlatformNotSupportedException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as RegExException
App.ErrorSistema(“RegExException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as RegExSearchPatternException
App.ErrorSistema(“RegExSearchPatternException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as RegistryAccessErrorException
App.ErrorSistema(“RegistryAccessErrorException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as RuntimeException
App.ErrorSistema(“RuntimeException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as ServiceNotAvailableException
App.ErrorSistema(“ServiceNotAvailableException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as SessionNotAvailableException
App.ErrorSistema(“SessionNotAvailableException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as ShellNotAvailableException
App.ErrorSistema(“ShellNotAvailableException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as ShellNotRunningException
App.ErrorSistema(“ShellNotRunningException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as SpotlightException
App.ErrorSistema(“SpotlightException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as StackOverflowException
App.ErrorSistema(“StackOverflowException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as ThreadAccessingUIException
App.ErrorSistema(“ThreadAccessingUIException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as ThreadAlreadyRunningException
App.ErrorSistema(“ThreadAlreadyRunningException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as ThreadEndException
App.ErrorSistema(“ThreadEndException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as TypeMismatchException
App.ErrorSistema(“TypeMismatchException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as UnsupportedFormatException
App.ErrorSistema(“UnsupportedFormatException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as UnsupportedOperationException
App.ErrorSistema(“UnsupportedOperationException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as XmlDomException
App.ErrorSistema(“XmlDomException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as XmlException
App.ErrorSistema(“XmlException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as XmlReaderException
App.ErrorSistema(“XmlReaderException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as XojoScriptAlreadyRunningException
App.ErrorSistema(“XojoScriptAlreadyRunningException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
catch err as XojoScriptException
App.ErrorSistema(“XojoScriptException”, err.ErrorNumber.ToString + “-” + err.Message, “Container1_Filtrar_Pressed”)
end try

What version of Xojo are you using?
When you say query, are you using a database? Is that sqlite, mysql, postgres?
Do you have an app on the web that we can see the problem or do you have sample code?

Same problem on the last 3 versions.

DDBB connection is with MYSQL

I don’t have a sample. It’s an internal big app, but more or less the order is.

If control exist (weblistbox) - delete

Var control As WebControl

For ControlIndex As Integer = 0 To self.LastControlIndex
control = self.ControlAt(ControlIndex)
If control IsA WebListBox Then
WebListBox(control).close
end if
next

Conect to DDBB
Dim DDBB as New MySQLCommunityServer
'Session.DDBB = New MySQLCommunityServer
DDBB.Host = …
DDBB.Port = 3306
DDBB.DatabaseName = …
DDBB.UserName = …
DDBB.Password = …
DDBB.TimeOut = …
DDBB.Connect
DDBB.SQLExecute(“SET NAMES utf8;”)

Create a rowset via SelectSQL

Create weblistbox
Dim grid as New Weblistbox

Fill weblistbox with cellrender
Add weblistbox to the page.
self.AddControl(grid)

close dataset
close connection

After click on the botton and do all the process 3 or 4 times the app doesn’t show info in the weblistbox
and there is no exception

That’s Xojo 2022r3.0, r3.1 and r3.2? or Xojo 2022r1.x, r2.x and r3.x?
Is your WebListBox directly on the page, container or dialog?
Why you need to close the WebListBox and create it again?
Have you tried using a datasource (see Examples - Platforms - Web - Listbox - Listbox with a Datasource)?

It will be great if you can create a sample project and open a ticket using Issues.

That’s with Xojo 2022r1, 2022r2 and 2022r3

I will try to contact to technical department to know if they can connect to my machine and view the code.

I’m creating it inside a container.

I’m closing weblistbox, because users can change the fields or the query and I’m recreating the query every time (in this case is allways with the same one that crashes and if i change the query the weblistbox is always a white box).

Using Close on a control removes it from the page. This is generally a bad idea and I think you’re using it wrong. There are other ways to remove all the rows and set new column headers.

Same problem removing all rows and refreshing the weblistbox data and headers.

And no exception.

I will try in production to know if i is a debug error or a general error

What about instead of closing the control, you have a “results page” that you create anew each time? Haven’t tested anything, just a thought.

By the way, on the documentation page for Introspection is a sample that shows how to condense your exception catching for exactly the same cause. You might find it useful: Introspection — Xojo documentation