Tuesday, March 27, 2012

Error reading variable

I keep receiving errors while using variables to pass values to different part of my package. For example ...

Error: 2006-05-04 10:31:59.84
Code: 0xC00470EA
Source: EdwPostProcess
Description: Reading the variable "User::GvPathRoot" failed with error code 0xC0010009.
End Error

The way my variables are constructed is :

First the global variables (Gv*) are set by the parent package; Then local variables (Lv*) are set using the EvaluateAsExpression property and giving it an expression that takes the Gv* variable and concatenate a string to it.

At execution time, while the expressions are resolved, I get the above error while it was resolved correctly in a previous task.

I tried different method including duplicating my variables but without success. I'm running out of ideas

Gilles

Sorry I don't have an answer. But just wanted to report a very similar problem I am having. I am also at my wits' end since the problem cannot be reproduced at will.

I am also passing variable from parent package to a child package. There is a loop in the parent package and in each iteration, the value of this variable changes. There are 9 iterations of the loop and so 9 different values of this variable. Most of the times all the loops are successful (particularly if the volume of data is less). If the volume of data processed by the child package is more then I sometimetimes get this error in the 5th or later iteration. I have changed the order of the values of the variable but looks like it does not matter - it fails at different values.

Ketan

|||

My variable was used in a script task and in expressions on other tasks. By re-arranging my tasks flow so the script task wouldn't be executed at the same time as another task with the same variable seem to have corrected the problem.

A variable used by a script task is lock in memory even when it is used for read only. So depending on how fast each task completes, it is possible that sometime we encounter the variable locked situation sometime not.

I found a way to eliminate the script task from my flow and everything is fine now.

Gilles

|||Another good technique to minimise locking is to reduce the scope of variables. You may end up with what seem like duplicates, by scoping variables to loops and containers or tasks, but this is more reliable than sharing variables when strictly speaking you never use the value outside of the lower scoped executable.

No comments:

Post a Comment