nullPointerError with threads

Description

The following code throws an nullpointer error inside the thread. If you remove the code from the thread you do not get the error. This is causing MAJOR issues in my environment. In my environment the function you see inside the thread is that returns the message is a call to another cfc. I upgraded to the most recent release do to another issue of variable cannot be modified outside the thread scope (which I cannot give you code to dupliate yet)

cfthread(
action="run"
emailid = 'AA75EDEF-8004-47A9-B1E6-5D3C9FBD3FA5'){

function getMessageId(){
return
}

function getMessage(){
local.retVal = {
message: "'to' parameter is not a valid address. please check documentation"
}

return local.retVal;
}

local.ret = getMessage();

local.queryoptions = {'datasource': application.companyid};

//not a campaign so just note the error in the outbox
local.queryparams = {
'emailid' : {'value' : attributes.emailid, 'cfsqltype':'cf_sql_varchar'}
, 'status' : {'value' : 'E', 'cfsqltype':'cf_sql_varchar'}
, 'mail_gateway_messageid' : {'value':'', 'cfsqltype':'cf_sql_varchar'}
, 'senderr' : {'value' : local.ret.message, 'cfsqltype':'cf_sql_varchar'}
}

savecontent variable="sql" {
writeoutput("
UPDATE mailoutbox
SET Status = :status
, mail_gateway_messageid = :mail_gateway_messageid
, senderr = :senderr

WHERE EmailID = :emailid
");
}

local.rsUpdate = QueryExecute(sql, local.queryparams, local.queryoptions);
}

dump(cfthread);

Environment

Windows / Tomcat

Attachments

1

relates to

Activity

Former user 
2 November 2020 at 15:09

Thanks everyone.

Pothys - MitrahSoft 
2 November 2020 at 13:50

I've checked this ticket with fixed version 5.3.8.99-SNAPSHOT. Yes, it works fine now.

Michael Offner 
2 November 2020 at 13:03

please give it an try with 5.3.8.99 and if ok move to deployed

Pothys - MitrahSoft 
2 November 2020 at 10:19

, I've added a stack trace here

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 23 October 2020 at 23:15
Updated 24 June 2021 at 15:56
Resolved 2 November 2020 at 13:50