I have inherited a VS SDK enhancement that at various points, attempts to calculate payment terms information.
This enhancement was working great under GP2010 and GP2013 however with a recent upgrade to GP2015, this particular routine is causing GP to crash out periodically.
My initial thought is with the changes to the payment terms in GP2015 the routine needs to be updated but from what I can tell, everything matches correctly.
Below is the relevant call that's being made
Microsoft.Dexterity.Applications.DynamicsDictionary.SyPaymentTermsMstrTable syPaymentTermsTable = Dynamics.Tables.SyPaymentTermsMstr; Microsoft.Dexterity.Applications.DynamicsDictionary.McDefStructureCompositeData mcDefStructureComposite = new McDefStructureCompositeData(); syPaymentTermsTable.Key = 1; syPaymentTermsTable.PaymentTermsId.Value = strPaymentTerms; err = syPaymentTermsTable.Get(); if (err == TableError.NoError) { mcDefStructureComposite.CurrencyId = cCurrencyId; mcDefStructureComposite.DecimalPlaces = cDecimalPlacesCurrency; Microsoft.Dexterity.Applications.Dynamics.Procedures.PaymentTermsCalculateAvail.Invoke( decDocAmount, decDiscountDlrAmount, decDiscountPctAmount, ref decTermsAvailAmount, 0, syPaymentTermsTable, mcDefStructureComposite); } syPaymentTermsTable.Close();
The crashes that we are seeing are random. Usually when attempting to close the card in question and/or sometimes after repeated calls. The crash is always a generic GP has stopped working with a trace of a stack issue. Even stack dumps show nothing that pinpoints the cause. It was only after some trial and error that I was able to determine that the above procedure call is the fault.
If I remove the procedure call, all is well.
As a test, I rewrote the routine to call the PaymentTermsCalculate procedure which results in the same random crashes.
With the enhancements in this area with GP2015, does anyone see any particular issues with the calls or reason that the crashes are occurring?
*This post is locked for comments