Enterprise 6 (R5P) + SDK 5 = fatal crash on Add Invoice

I apologize if the following is lengthy or incomprehensible. As you're well aware, when you get too close to a problem it becomes difficult to describe it clearly.

We have a small application that utilizes the SDK to pull data from a csv file produces by a web business and import it into Quickbooks. The application has been adapted to work through multiple versions of Quickbooks up from Enterprise 3 to Enterprise 5 without incident. The recent upgrade to Enterprise 6 has brought a bug with it however, and as near as I can tell, it is either in the SDK or in Quickbooks itself.

The nature of the problem is that Quickbooks experiences a fatal crash when the import sends a Message Request that includes InvoiceAddRequests. The crash is intermittent, apparently random, and most disturbingly seems to be linked to a particular company file. We have tried a great many things to narrow down the problem, including upgrading to the latest SDK, upgrading Quickbooks to the most recent patch (including the R5 patch just released), altering the code that sends the requests in many different ways, all to no avail.

Since it appears to only happen with one company file, we have performed multiple Verify and Rebuilds of the company file which never report any problems. I have even performed a Clean Up Company Data with all options checked, removing everything dated prior to 12/31/05 (obviously on a test copy of the company file). In addition, the SDK Test applications that are distributed with the SDK are able to successfully send the same requests that cause the crash through our application without fail.

In troubleshooting, it appears that specific rows of data were consistently causing the crash. As those "trouble" rows of data are removed from the file, continuing tests process data consistently past the removed rows (as would be expected) usually finding another "trouble" row to crash on.

The crashes are intermittent and random. Periodically, the program will run perfectly without a single error. Whenever an error occurs, however, it would occur on one of these discreet "trouble" rows. In analyzing these rows, I've been unable to determine any discernible pattern in the "trouble" rows compared to the rows that do not cause the crash.

In the QBWin.log file the error line that seems to be attached to the crash is: TransactionManager.cpp (2061) : MESSAGE: Mon Feb 27 11:26:01 LVL_FATAL_ERROR--Unexpected error condition 051012SLH in multi-user locking code acquiring the GlobalWriteLock.

The Report.xml file seems to confirm the TransactionManager.cpp problem:

- ProgrmmersFatalError C:\Program Files\Intuit\QuickBooks Enterprise Solutions

6.0\qbw32.exe

- 0 2061 .\.\src\TransactionManager.cpp

Code snippet wherein the crash occurs.

Dim qbSess As QBSessionManager qbSess = New QBSessionManager Dim objInvoice As New InvoiceQB Dim msgSetRs As IMsgSetResponse

qbSess.OpenConnection("WOP", AppSettings("ApplicationName").ToString) qbSess.BeginSession("", ENOpenMode.omMultiUser)

Dim msgSetRq As IMsgSetRequest = qbSess.CreateMsgSetRequest("US", 5, 0) msgSetRq.Attributes.OnError = ENRqOnError.roeContinue

// Add invoice request to msgSetRs

msgSetRs = qbSess.DoRequests(msgSetRq)

KABOOM.

Reply to
aszele
Loading thread data ...

Does being in single user vs multi-user mode make any differrence?

Are you adding all the invoices in one session or multiple sessions?

Post a short add request in XML.

Reply to
Karl Irvin

Caveat. I have not yet used the SDK. That said, as a long-time programmer working with database applications it sounds as if you might have a compatibility problem.

Looking in the Intuit SDK forums I found a post with an interesting 'nugget'

formatting link
&threadid$00&enterthread=y"It should be noted that all installs of QuickBooks share their common files directory so you could get yourself into trouble if, for example, you depend on QBXMLRP2 which was introduced with QB2004 and fail to install it yourself (using our redistributable packages which are part of the SDK) because you had 2004 on the same system with 2002 and 2003)." Is it perhaps the case that the QBXMLRP2 file needs to be explicitly installed?

Additionally, it seems you are not the only one with this problem. Again, the Intuit forums have a thread on this issue

formatting link
I suspect you will probably find more folks on the developers forums who will be able to help with the SDK than on this newsgroup. Here is a link
formatting link
Do post back and let us know if you have found the problem.

Reply to
L

To Karl Ivin: Does being in single user vs multi-user mode make any differrence?

- It has to be in multi-user mode. The way the application connects to Quickbooks is to group the open instance of it. Quickbooks therefore sees the logged on user and the application as two separate users and will only allow the dual access in multi-user mode.

Are you adding all the invoices in one session or multiple sessions?

- The application as originally written added all invoices and payments in a single large request object. In troubleshooting we've narrowed it down to just doing invoices, doing small batches of invoices, and eventually just doing a single invoice per session. All had the same result.

Post a short add request in XML:

- - - -

- EE30000-1134145831 93654O'ConNo Facility

- No Facility Virginia Oconnel 764 WEST HERBERT REEDLEY CA 93654

- No Facility Virginia Oconnel 764 WEST HERBERT REEDLEY CA 93654 0

- F0000-1091629981 WEB 200683

- 10000-1091636730 Ground 1

-

- BB0000-1112111575 0974998621 2 20.00

-

- 2E0001-1091564479 0974998605 2 36.00

-

- 052500000804 1 10.00

-

- 1150000-1119997921 056900000605 1 10.00

-

- 710000-1091554927 Shipping Shipping Charges - Ground 1 12.75

To L:

- Re the compatibility issue. We considered that. All necessary files are installed with the SDK. We've run a fresh install of all components on a machine that had never had Quickbooks on it previously, installing Quickbooks Enterprise 6, all updates/patches to it, the latest SDK, our application, and the company file. We had the exact same results.

- As for posting on the IDN forums. You'll find I've already pursued the issue in the exact thread you listed. They did not have an answer and so appear to be ignoring the problem. I've started a new thread on the IDN forums, but thought it might be nice to try here as well since they're being a bit reluctant to look into this.

Thanks for the help folks!

Reply to
aszele

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.