Usually you initialise the user:variable before the package starts with a non relevant string, such as "1234" then updated it to the correct value once the process starts.
The problem is that when you use the Derived Coulmn Transformation Editor and add a Derived Column as
So if you update the user:variable string to a length of 5 characters SSIS fails!
My work around is to make sure that you initialise the user:variable string with a value which has a length of the maximum possible string which you are likely to encouter.
Hopefully this will be resolved in future releases.