Cfthread NullPointerException

does any one have NullPointerException when run a cfthread after upgrade to 5.3.8.189 ?
downgrading to 5.3.7.48 let cfthread to run again.
we have two server configuration, and both has the same problem:

1 server
OS : Ubuntu 20.4.2 LTS
JAVA : 11.0.11 (Ubuntu) 64bit
Tomcat Version: 9.0.35

server number 2
OS: debian 10
here we made a fresh installation from the new 5.3.8.189 bin file downloaded from luce download page

so java was the embedded packet in lucee and the same for tomcat
but we had the same problem

“ERROR”,“cfthread-2342”,“07/19/2021”,“19:21:36”,“cfthread-2342”,"java.lang.NullPointerException;java.lang.NullPointerException;java.lang.NullPointerException

can you share a bit more of the stacktrace? (5 more lines or so) you omitted all the interesting bits

hy, this is the only text in logs … thread.log … no stack trace inside in both servers

“ERROR”,“cfthread-2338”,“07/19/2021”,“19:03:03”,“cfthread-2338”,"java.lang.NullPointerException;java.lang.NullPointerException;java.lang.NullPointerException

"

“ERROR”,“cfthread-2339”,“07/19/2021”,“19:03:24”,“cfthread-2339”,"java.lang.NullPointerException;java.lang.NullPointerException;java.lang.NullPointerException

"

“ERROR”,“cfthread-2340”,“07/19/2021”,“19:12:34”,“cfthread-2340”,"java.lang.NullPointerException;java.lang.NullPointerException;java.lang.NullPointerException

"

“ERROR”,“cfthread-2341”,“07/19/2021”,“19:13:50”,“cfthread-2341”,"java.lang.NullPointerException;java.lang.NullPointerException;java.lang.NullPointerException

code is

then can you provide us with a little test case which demonstrates the problem?

i cannot give the access to developer server for security reason, also data are strictly secured and iam not autorizhed to do it… but i can write down 10 line of code to demostrate it… sorry for broken english… i ll setup the evoirment asap…

a 10 line simplified test case would be perfect, thanks

sorry, dont understand but is my problem i know)… do u need sample code or a server with the setup and code run on the test server?

Are you including files in your thread? I had issues with this…

yes i use include…

We rolled back back the version on the server performing the threading.

<cfsetting requestTimeOut="9999999999999">
<cfset url.secret = "123">
<cftransaction>
  <cfset taglicreati = ArrayNew(1)>
  <cfset ArrayAppend(taglicreati, 1)>
</cftransaction>
<cfthread action="run" name="cart_PL_#url.id_odlj#_#url.id#">
  <cfsetting requestTimeOut="999999999">
  <cfinclude template="/secure/bin/cart_taglio_multi.cfm">
</cfthread>

<!---- cart_taglio_multi.cfm ----->

<cfquery name="taglio" datasource="dbmaga">
select *
from xxxxx
where xxxxx.id1 = <cfqueryparam cfsqltype="cf_sql_integer" value="#url.id#">
and xxxxx.id2 = <cfqueryparam cfsqltype="cf_sql_integer" value="#url.id_odlj#">
and xxxxx.c = FALSE;
</cfquery>

<cfloop query="taglio">
    <cfinclude template="cart_taglio_multi_include.cfm">
	<cfexecute name="/usr/bin/convert" arguments='xxxxx'></cfexecute>
	<cfif not isdefined("url.noprint")>
	<cfexecute name="lpr" arguments="-H 127.0.0.1:631 -P #url.printerpl# xxxxxx.pdf"></cfexecute>
	</cfif>
</cfloop>   

we did the same… no way to run the 5.3.8.189 in production evoirment.

could be related to this https://luceeserver.atlassian.net/browse/LDEV-3627 (but I’m not sure if it windows only, or maybe linux too, i’m assuming it doesn’t fail on MacOS @micstriit ? )

i will try with full path on include… and i’ll let you know… thanks

Try the 5.3.8.199 snapshot?

sorry to everybody i cannot test at the moment… having developers working hard on dev server…
when they’ll finish i will give a try to both method… full path and snapshot…

Hello - I am not sure if I should create a new topic or not, but I am finding a similar problem. A NPE inside cfthread. I have upgraded to the latest production release 5.3.8.201 and the problem still persists.

I have found that I am getting a NullPointerException when using a custom tag inside a cfthread when the main page request has finished.

I can give you some simple code examples to recreate.

I have a customTag directory in the root of our application and it’s mapping is defined in the /lucee/admin/server.cfm page. I have create a trivial file in there called dollar.cfm

<cfif thisTag.executionMode is 'start'>
	<cfparam name='attributes.value' type='string' default='0'>
	<cfoutput>#DollarFormat(val(attributes.value))#</cfoutput></cfif>

Then I have a test page that runs:

<!--- This works --->
<cfoutput><cf_dollar value="100" /></cfoutput><br />

<!--- This will throw an error into the systemOut --->
<cfthread action="run" type="daemon">
    <cfset y = 55 />
    <cfset systemOutput("Sleeping 3 sec ...", true) />
    <cfset sleep(3000) />
    <cfset systemOutput("Awake", true) />
    <cftry>
        <cfsavecontent variable="x">
            <!--- <cfmodule template="/customTags/dollar.cfm" value="#y#"> If I use this instead, it will not error --->
            <cf_dollar value="#y#" />
        </cfsavecontent>
        <cfset systemOutput("x: #x#", true) />
        <cfcatch type="any">
            <cfset systemOutput(cfcatch, true) />
        </cfcatch>
    </cftry>
</cfthread>

Done ...
<!--- If I uncomment this, I do not get the NPE --->
<!--- <cfset threadJoin() /> --->

So the NPE only really happens if the main page request finishes (that is why the 3 second sleep in there)

Yes, this is regression in lucee latest versions and its start from 5.3.8.12-SNAPSHOT onwards. Can you file a bug here https://luceeserver.atlassian.net ?

No problem. Issue created: https://luceeserver.atlassian.net/browse/LDEV-3689

Thanks

hello everybody
also for us… in 5.3.8.201 the problem still persist…