[Gambas-bugtracker] Bug #2656: WebTimer into a Webform still exist after _free() event

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Fri Nov 18 15:28:11 CET 2022


Comment #3 by Olivier CRUILLES:

Hi Benoit,

I have tried 'WebTimer1.Delete()' but does not work.

I mean, when the WebForm is closed, there is no time to send to the Browser the information to Stop/Delete any objects.

Attached a project to show you the issue:

To reproduce the issue, proceed like that:

The project is a Web application running with the Embedded HTTP server of Gambas:

1 - Create an empty file in /tmp for the logs:

  touch /tmp/gbasstatsconsolenew.log

  tail -f /tmp/gbasstatsconsolenew.log

2 - Start the Web Application

  login:  admin
  passwd: admin

3 - You should see the Dashboard displayed as default page

  -> Click in the Orange Box -> View Details

4 - You shou see now multiple Gauges

  -> Click on the Button 'Start' to start animate the Gauges

5 - This start a WebTimer that get Top CPUs each second and update the Gauges with the new value

6 - Now let the animation running and click on the Button 'Dashboard' at the left of the page.

  -> By doing that, the Embedded WebForm showing the Gauges running is deleted of his parent container, so the WebTimer should be stopped.

7 - In the end, Click again in the Orange Box -> View Details to reopen the Gauges webForm

8 - Now take a look at the logs file created above and you should see the WebTimer1 still running but not animation of the Gauges.

I hope my explainations are correct.

Note:  Take a look at the Button 'Test 1', 'Test 2', 'Test 3', they are some new Web Components I'm developping (Not finished at all).
       I'm interested by you opinion about that.



Attachment: gbAsStatsConsoleBSNew2-0.9.4.tar.gz

Olivier CRUILLES changed the state of the bug to: Accepted.

More information about the Bugtracker mailing list