In some packages I'm getting randomly and error that simple forces the application to exit without any control, after some debug I found a case where the profiler is being used without controlling if was setup.
After apply the fix the application start working perfectly without any error.
file "CustomEventHandler.cs"
public override void OnCustomEvent(TaskHost taskHost, string eventName, string eventText, ref object[] arguments, string subComponent, ref bool fireAgain)
{
// Here the custom event "OnPipelineRowSent" should be processed so that
// we can keep track of how many rows are processed in the DataFlow
// what happen in we don't have a profiler configure ?! add the validation before call the profiler
if (_profileDataFlow)
_dataFlowProfileHandler(taskHost, eventName, eventText, arguments, subComponent);
if ((_selectedEvents & PackageEvents.Custom) == PackageEvents.Custom)
{
fireAgain = true;
LogData("OnCustomEvent::" + eventName, taskHost, eventText);
}
else
{
fireAgain = _profileDataFlow;
}
}
Regard,
João