Uploaded image for project: 'Lucee Development'
  1. LDEV-1389

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

    Details

    • Type: Bug
    • Status: Need more details
    • Priority: Blocker
    • Resolution: Unresolved
    • Affects Version/s: 5.2.2.54
    • Fix Version/s: None
    • Environment:

      All

      Description

      I have no problem with this code:

      <cfthread name="#sThreadName#" action="run" args="#stThread#">
         <cfset Thread.stResult=1>
         <cfset Thread.searchArgs={}>
      </cfthread>
      

      But if I move the first line in the thread

      <cfthread name="#sThreadName#" action="run" args="#stThread#">
         <cfset Thread.searchArgs={}>
         <cfset Thread.stResult=1>
      </cfthread>
      

      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(ThreadsImpl.java:403)
      at lucee.runtime.thread.ThreadsImpl.set(ThreadsImpl.java:274)
      at lucee.runtime.type.util.StructSupport.set(StructSupport.java:249)
      at lucee.runtime.util.VariableUtilImpl.set(VariableUtilImpl.java:407)
      at lucee.runtime.PageContextImpl.set(PageContextImpl.java:1414)
      at core.search.searchgateway_cfc$cf.threadCall(/contenscms/core/search/searchgateway.cfc:99)

      My workaround was to move stResult as key of searchArgs.

      Maybe the issue was introduced with this changeset?
      https://github.com/lucee/Lucee/commit/f22a0573df89fe08ac0c97f869fc2aadcfac20a6

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              HarryK Harry Klein
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: