# Error when printing MasterPack

**URL:** <https://www.epiusers.help/t/error-when-printing-masterpack/37366>\
**Category:** Epicor ERP 10\
**Created:** [February 20, 2017, 6:27pm UTC](https://www.epiusers.help/t/error-when-printing-masterpack/37366 "2017-02-20T18:27:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nyamoga9](https://www.epiusers.help/user_avatar/www.epiusers.help/nyamoga9/32/16973_2.png) [@nyamoga9](https://www.epiusers.help/u/nyamoga9)\
**Post date:** [February 20, 2017, 6:27pm UTC](https://www.epiusers.help/t/error-when-printing-masterpack/37366/1 "2017-02-20T18:27:06Z")

</div>

I can’t print some MasterPacks in E10.1.500.12  
the following error comes

Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask: Object reference not set to an instance of an object.  
Stack Trace:  
at Erp.Internal.SR.MasterPackSlip.doShipHead() in c:\_Releases\ERP\RL10.1.500\Source\Server\Internal\SR\MasterPackSlip\MasterPackSlip.cs:line 4454  
at Erp.Internal.SR.MasterPackSlip.RunProcess(Int64 instanceTaskNum, String outputFileName) in c:\_Releases\ERP\RL10.1.500\Source\Server\Internal\SR\MasterPackSlip\MasterPackSlip.cs:line 864  
at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:\_Releases\ICE\3.1.500.12\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 88  
at Ice.Hosting.TaskCaller.ExecuteTask() in C:\_Releases\ICE\3.1.500.12\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 54  
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:\_Releases\ICE\3.1.500.12\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 63  
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:\_Releases\ICE\3.1.500.12\Source\Server\Services\Lib\RunTask\RunTask.cs:line 526  
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:\_Releases\ICE\3.1.500.12\Source\Server\Services\Lib\RunTask\RunTask.cs:line 526  
at Ice.Services.Lib.RunTaskSvcFacade.RunTask(Int64 ipTaskNum) in C:\_Releases\ICE\3.1.500.12\Source\Server\Services\Lib\RunTask\RunTaskSvcFacade.cs:line 87  
at SyncInvokeRunTask(Object , Object[] , Object[] )  
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)  
at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func`2 func) in C:\_Releases\ICE\3.1.500.12\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59 at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in C:\_Releases\ICE\3.1.500.12\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28  
at Epicor.Hosting.Wcf.EpiOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) in C:\_Releases\ICE\3.1.500.12\Source\Framework\Epicor.System\Hosting\Wcf\EpiOperationInvoker.cs:line 23  
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)  
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)  
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)  
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)  
at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)  
at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)  
at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)  
at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)  
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)  
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)  
at System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.InnerTryReceiveCompletedCallback(IAsyncResult result)  
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)  
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)  
at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceiveAsyncResult.OnReceive(IAsyncResult result)  
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)  
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)  
at System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state)  
at System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)  
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)  
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)  
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)  
at System.Net.Security.NegotiateStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)  
at System.Net.Security.NegotiateStream.ReadCallback(AsyncProtocolRequest asyncRequest)  
at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)  
at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)  
at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)  
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)  
at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)  
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)  
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)  
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped\* nativeOverlapped)  
at System.Threading.\_IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped\* pOVERLAP)

---

<div class="post-metadata">

**Author:** ![John\_Mitchell](https://www.epiusers.help/user_avatar/www.epiusers.help/john_mitchell/32/718_2.png) [@John\_Mitchell](https://www.epiusers.help/u/John_Mitchell)\
**Post date:** [February 4, 2019, 6:38pm UTC](https://www.epiusers.help/t/error-when-printing-masterpack/37366/2 "2019-02-04T18:38:28Z")

</div>

@nyamoga9 Did you ever find a cause or solution to this error?

---

<div class="post-metadata">

**Author:** ![John\_Mitchell](https://www.epiusers.help/user_avatar/www.epiusers.help/john_mitchell/32/718_2.png) [@John\_Mitchell](https://www.epiusers.help/u/John_Mitchell)\
**Post date:** [March 14, 2019, 2:03pm UTC](https://www.epiusers.help/t/error-when-printing-masterpack/37366/3 "2019-03-14T14:03:07Z")

</div>

I just wanted to post the answer in case anyone else runs into this. There is a bug with Master Pack Print BO when a ShipTo is attached to the Master Pack and does not have a country code. There are probably a few more fields in the dataset that cause the same problem we just haven’t run into them yet.

---

<div class="post-metadata">

**Author:** ![nyamoga9](https://www.epiusers.help/user_avatar/www.epiusers.help/nyamoga9/32/16973_2.png) [@nyamoga9](https://www.epiusers.help/u/nyamoga9)\
**Post date:** [May 13, 2019, 3:00pm UTC](https://www.epiusers.help/t/error-when-printing-masterpack/37366/4 "2019-05-13T15:00:28Z")

</div>

> [@John\_Mitchell](#):
>
> country

Thanks for posting the answer. We had since updated to a 10.1.600 and that error wasn’t there
