Mattersphere Developers Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
Heather@FootAnstey
Posts : 57
Join date : 2018-12-19

Value cannot be null. Parameter name: task (when search list open at same time) Empty Value cannot be null. Parameter name: task (when search list open at same time)

Sat 1 Feb 2020 - 8:38
Original post 13/01/2011 Gareth Ahmun (Morgan Cole LLP)

"Hello, We're getting the attached error (“Value cannot be null. Parameter name: task”[attachment]error.bmp[/attachment] This occurs in the situation where one user has the Milestone Plan open and another user has the Tasks (SCHFILTASKDUE) search list open at the same time. The user in the milestone plan does some work which completes, removes or adds tasks, the user in the Tasks search list then either clicks 'Search' or 'Refresh' and gets the error.
I've also emailed this to support as this is somewhat urgent. Regards, Gareth"

15/11/2012 Gareth Ahmun (Morgan Cole LLP)

"I'm just bumping this as we are now also getting the error when a task gets added directly to the dbTasks by a stored procedure. (Unless we disconnect / reconnect Sad ) Does anybody have any suggestions before I raise a support call?
Cheers, Gareth"

Response 15/11/2012 technical
"Do you know what stored procedure is calling as it looks like that when you search or refresh, whatever stored procedure its calling is looking for a parameter called @Task but it isn't being passed to it. Whatever the stored procedure does it cannot cope with the null.
You could maybe rewrite the Procedure to include an IF statement which says
if @Task is not null don't run the code or do something else? That should sort the error message but wont tell you why @Task isn't being populated. You could try to run SQL Profiler while your 2 users are doing their things and see if the SQL Trace shows anything like why the parameter isn't being set or at what point its failing.
That should also show you the stored procedure name if you don't know it. Don't know if any of that rambling helps but just an idea or 2.
Phil"

Gareth Ahmun (Morgan Cole LLP) 16/11/2012
"A good shout Phil but unfortunately I can't find a parameter 'task' being used in any of the Stored Procedures being called (used Profiler). I think I logged this one with the support desk a long time ago - could be time to raise it again."

technical 19/11/2012 09:32:41
"Morning Gareth,
Strange, maybe its a code thing instead then. I notice from the stake trace that it errors when running the code for the ItemHover event on the SearchControl. After that it tries to run a GetTask method which I'm guessing is what is returning the null.
Can you post the code so we can see if we can spot anything? Phil"

RichardA 19/11/2012
"Hi,
Can you log a support call for this. My best guess is that computer you get the error on has no knowledge of the task added on the other computer. The searchlist is direct to sql and gets all the tasks but taskflow works with an in memory collection of tasks.
Seems that the searchlist hovered event passes the task id that taskflow doesn't know about.
Instead of disconnecting to overcome the problem I think that an OMSFile.Tasks.Refresh() might fix it. You'll have to add a button to do this but better user experience than reconnecting.
Regards Rich"

Gareth Ahmun (Morgan Cole LLP) 28/11/2012 15:57:41
"Phil, Richard - thanks for the replies
Phil - I've had a look and it seems the ItemHover may be causing this, but this is not an event in our code, something in the core code perhaps.
Richard - I have also logged a support call, Muzzy is looking into it for me. The most immediate problem is that the same user can insert a task this way then switch to the tasks tab and receive the error. I tried CurrentFile.Tasks.Refresh() on the searchlist and it doesn't work unfortunately.
My colleague Mike had a similiar error message a while back and posted it here http://support.fwbs.net/Support/Forum/tabid/182/forumid/1/postid/1090/scope/posts/language/en-GB/Default.aspx#1090"

technical 29/11/2012 08:35:27
"No problems, you'll have to let me know if Muzzy solves it for you. Cheers Phil"




Back to top
Permissions in this forum:
You cannot reply to topics in this forum