2 Replies Latest reply on Apr 12, 2018 9:41 PM by Dan Craw

    Solidworks EdmInterface.dll fault

    Dan Craw

      All,

      My organization is receiving exceptions inside a web service that uses the following interop dlls: EPDM.Interop.epdm.dll and EPDM.Interop.EPDMResultCode.dll. The web service returns documents stored in the PDM vault to an in-house application used by our employees. Most of the time it returns documents fine but periodically the server's application event log records the following exception:

       

      Application Event Log:

      Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8

      Faulting module name: EdmInterface.dll, version: 15.1.1.745, time stamp: 0x548eb873

      Exception code: 0xc0000005

      Fault offset: 0x00077182

      Faulting process id: 0x1a98

      Faulting application start time: 0x01d3d26aa063326c

      Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe

      Faulting module path: C:\Program Files (x86)\SOLIDWORKS Enterprise PDM\EdmInterface.dll

      Report Id: 92e2c0ff-3e5e-11e8-be69-005056895e59

       

       

      Additionally, we see thousands of the following entries inside the PDM Administration Log File:

      ========= LAST COMMAND ========

      Select Username From Users Where UserID=45

      Server: <mysolidworkspdmserver>

      Database: <mysolidworkssqlserver>

      Date: 2018-04-12 07:36:07.506

      Module: w3wp.exe

      Function: hGetErrCode

      Code: E_EDM_DATABASE_ACCESS

      Code Description: Could not access the item in the database.

      Error running query in SpDbOdbc

      State=S1000

      Msg=[Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt

      ========= LAST COMMAND ======== ...etc.

       

      There are thousands more errors of this exact kind happening. No other errors except this show up in the log file. I cannot correlate the exceptions inside PDM to the exceptions recorded in the application event log but I also cannot rule out that they are not related to one another.

       

      Does anyone have any tips on what I can do to debug either of these errors? I have admin access to both the sql server and the windows server running PDM.

       

      To make this more (less) fun, the web service appears to run fine. It does not appear to generate exceptions when it calls into the interops. The only telltale sign I have that something is amiss is the application that calls the web service times out.

       

       

      Thanks!

      -Dan

       

       

      ***Update 1***

      I was able to narrow down the call that is generating the E_EDM_DATABASE_ACCESS error to GetComputedBOM (2014 SOLIDWORKS API Help - GetComputedBOM Method (IEdmFile7)).

       

      We are calling it with the following arguments: edmFile.GetComputedBOM(2, 0, "@", 1).

       

      I still do not have a lead on the application event error or if it is directly related to the EDM error.

        • Re: Solidworks EdmInterface.dll fault
          Clark Honzik

          Do the errors occur around the same time of the day or is it all over the map when the exceptions are thrown?

            • Re: Solidworks EdmInterface.dll fault
              Dan Craw

              Hello Clark. I am uncertain, also see my Update 1. As best as I can tell, they happen close to one another but not close enough for me to for certain say one is causing the other.

               

              To clarify, the web service calls GetComputeBOM(..) frequently (100s of times a day) because every time one of my users needs the bill of materials for a given part they need to check it's BOM. The w3wp error also happens when they are using that web service.

               

              Since we are passing valid values into GetComputedBOM() and it does return the correct BOM, I suspect there is some bug inside GetComputedBOM() that is causing the ODBC error. I did some more digging into the vault database and it appears that bit of SQL (Select Username From Users Where UserID=45) is being called from user defined function Crd_GetSpecDefVal.

              "

              When 3 Then --Logged in user

              (Select Username From Users Where UserID=@UserID)

              "

               

              Thanks!

              -Dan