Static variable values seem to occasionally "reset"

Description

Consider this code:

When I run this, I get:

On subsequent hits to number.cfm, I get this:

This is what I'd expect.

However on a couple of occasions when I've been distracted for some period of time (could be a coupla min, could be longer), and I reload that page, then the value has been reset to 0 again. This is different from the situation I detailed in issue [270].(https://bitbucket.org/lucee/lucee/issue/270). This is definitely with the "block" style syntax.

It does not seem to be based on a specific period of time (like some sort of timeout), because I've seen it in the space of a coupla minutes. However I've just left it sitting there for over half an hour, and cannot replicate. It has not been a one off though, I have seen it happen a few times whilst testing.

I dunno what else to look for by way of troubleshooting, TBH. Any ideas?

Environment

None

Activity

Show:
Michael Offner
June 12, 2020, 7:38 PM

when a Component is removed from Page Pool, for example when pagePoolClear() is executed, the static scope is refreshing .

Michael Offner
June 13, 2020, 12:31 AM
Edited

found and fixed the issue “Component from type [Foo] has no accessible static Member with name [bar]“

This did happen even the function in that case “bar“ was defined inside the component.

Problem was a multi threading issue, it turned out to be unrelated to this ticket, so we created an other ticket for it

 

Michael Offner
June 13, 2020, 12:48 AM

Most likely this happens when a page is cleared from page pool, for example when you call pagePoolClear

Michael Offner
June 13, 2020, 3:25 AM

Michael Offner
June 13, 2020, 3:27 AM

moved the static scope from an instance variable in ComponentImpl to be a static variable in the class created.

Fixed

Assignee

Michael Offner

Reporter

Adam Cameron

Priority

Critical

Labels

Fix versions

Sprint

5.3.8 Sprint 3

Affects versions