SDK Crash to create a Customer instance

I have developed an application that get customer information from Sage 50, this application never is stopped until the user decide to do it, I mean, when the user starts the process to get customer information from Sage 50, the application connects to Sage 50 and begins to get customer information for undefined time until the user decide stop the process. The process works well for a while, but after, the application sends me the following exception:

"Error in the application."

With the following stack trace:

at Sage.Peachtree.API.Factories.FactoryBase.AssertOpenContext()
at Sage.Peachtree.API.Factories.CustomerFactory.Create()
at PeachtreeConectionNet.Model.API_Model.Customer_Internal..ctor()

This happens when I try to create a Customer Instance.