Threading issue: the thread scope cannot be modified from outside the owner thread


I have no problem with this code:

But if I move the first line in the thread

I receive this error:

"ERROR","cfthread-0","06/22/2017","09:06:59","","cfthread-0;the thread scope cannot be modified from outside the owner thread;lucee.runtime.exp.ApplicationException: the thread scope cannot be modified from outside the owner thread
at lucee.runtime.thread.ThreadsImpl.errorOutside(
at lucee.runtime.thread.ThreadsImpl.set(
at lucee.runtime.type.util.StructSupport.set(
at lucee.runtime.util.VariableUtilImpl.set(
at lucee.runtime.PageContextImpl.set(

My workaround was to move stResult as key of searchArgs.

Maybe the issue was introduced with this changeset?




Lyle Karstensen
October 19, 2020, 8:48 PM

Thanks Zac. I have not reported any of the issues in the past. I will double check everything and report back if there is an issue still

Lyle Karstensen
October 21, 2020, 3:33 AM

The link below is the dump saying <cfset thread.actionsevents = ''> is modifying the thread scope outside the thread which it is obviously not.

Version Lucee
Version Name Gelert
Release date Oct 19, 2020
Remote IP 0:0:0:0:0:0:0:1
Servlet Container Apache Tomcat/9.0.0.M21
Java 1.8.0_191 (Oracle Corporation) 64bit
Host Name localhost
OS Windows Server 2012 R2 (6.3) 64bit
Architecture 64bit
Inspect Templates (CFM/CFC) Once ( Good )
Key case Convert to upper case (CFML Default)
Null Support Partial Support (CFML Default)
Local scope mode Classic (CFML Default)

Zac Spitzer
October 21, 2020, 4:10 AM

ok, can we move this discussion to a new issue and link it back?

also it really helps to strip back the test case to the bare minimum required… no need for all that sql

We need something which we can run to reproduce

Lyle Karstensen
October 21, 2020, 5:25 AM

I gave you the full code so it you could see everything it is doing. This is seriously causing me major issues everywhere I am using threads it looks like. I am getting this error all over my thread.log.


Wherever you want to move this is fine, I only posted here because it was something someone else had an issue with and it is marked as fixed yet I am still seeing it all over the place.

Zac Spitzer
October 21, 2020, 6:22 AM

but your example is currently useless, as nobody else can run it

I tried reducing your code down to just this, but it works

With Lucee and jira, once a bug is marked deployed, you should always create a new one and link back

please file a new bug, with a reduced test case. happy to help



Michael Offner


Harry Klein



Fix versions



Affects versions