ODBC Call crashes when executing as a service

  • Thread starter Thread starter JohnCanessa
  • Start date Start date
J

JohnCanessa

Guest
Good day,

I have a 32-it app that can run interactively or as a service.

When the app is called from a command prompt the software comes up.

When the software is invoked as a service it crashes at the ODBC call SQLDriverConnect.

The software (more than 10 years old) has always worked in both modes.

Not too long ago it stopped working as a service.

To narrow it down the code is written in VS 2019 and is compiles for 32-bit and I am using Windows 10.

The log file when the issue occurs:

3/02/20 11:29:16 0x00003e80 - SDM <<< starting line: 313 ...
03/02/20 11:29:16 0x00003e80 - SDM <<< _WIN32 defined line: 397
03/02/20 11:29:16 0x00003e80 - SDM <<< _WIN64 NOT defined line: 405
03/02/20 11:29:16 0x00003e80 - SDM <<< bitFileTrailers: 1 (bool) controlled by NoBitFileTrailers line: 594
03/02/20 11:29:16 0x00003e80 - SDM <<< deDup: 0 (bool) controlled by DeDup line: 633
03/02/20 11:29:16 0x00003e80 - SDM <<< sdmServerIP ==><== controlled by SDMServerIP (blank to DISABLE failover) line: 672
03/02/20 11:29:16 0x00003e80 - SDM <<< sdmServerPort: 4444 controlled by SDMServerPort line: 718
03/02/20 11:29:16 0x00003e80 - SDM <<< sdmMyIP ==><== controlled by SDMMyIP line: 757
03/02/20 11:29:16 0x00003e80 - SDM <<< sdmStandByIP ==><== controlled by SDMStandByIP (blank to DISABLE failover) line: 796
03/02/20 11:29:16 0x00003e80 - SDM <<< iCAS NOT configured for failover line: 809
03/02/20 11:29:16 0x00003e80 - SDM <<< debugFlag: 0 (bool) line: 812
03/02/20 11:29:16 0x00003e80 - SDM <<< extendFlag: 0 line: 813
03/02/20 11:29:16 0x00003e80 - SDM <<< recoverFlag: 0 (bool) line: 814
03/02/20 11:29:16 0x00003e80 - SDM <<< reloadFlag: 0 (bool) line: 815
03/02/20 11:29:16 0x00003e80 - SDM <<< BEFORE CompareSoftwareVersions line: 820 ...
03/02/20 11:29:16 0x00003e80 - LicDongleVersionAndBuild <<< LicReadDongle WAR_NO_DONGLE line: 8749
03/02/20 11:29:16 0x00003e80 - CompareSoftwareVersions <<< LicDongleVersionAndBuild WAR_NO_DONGLE line: 37525
03/02/20 11:29:16 0x00003e80 - SDM <<< AFTER CompareSoftwareVersions line: 828
03/02/20 11:29:16 0x00003e80 - SDM <<< CompareSoftwareVersions WAR_NO_DONGLE line: 842
03/02/20 11:29:16 0x00003e80 - SDM <<< BEFORE GetSDMPath line: 868 ...
03/02/20 11:29:16 0x00003e80 - SDM <<< AFTER GetSDMPath status: 0 sdmInstallationPath ==>c:\sdm\bin<== line: 876
03/02/20 11:29:16 0x00003e80 - SDM <<< BEFORE SetCurrentDirectory sdmInstallationPath ==>c:\sdm\bin<== line: 916 ...
03/02/20 11:29:16 0x00003e80 - SDM <<< AFTER SetCurrentDirectory status: 1 sdmInstallationPath ==>c:\sdm\bin<== line: 924
03/02/20 11:29:16 0x00003e80 - SDM <<< BEFORE SDMDatabaseAvailable customerString ==><== line: 941 ...
03/02/20 11:29:16 0x00003e80 - ServerReadConfig <<< serverConfig->sqlServer ==>localhost<== line: 2789
03/02/20 11:29:16 0x00003e80 - SDBOpen <<< sizeof(SQLLEN): 4 line: 264
03/02/20 11:29:16 0x00003e80 - SDBOpen <<< sizeof(SQLULEN): 4 line: 265
03/02/20 11:29:16 0x00003e80 - SDBOpen <<< sizeof(long): 4 line: 266
03/02/20 11:29:16 0x00003e80 - SDBOpen <<< sizeof(unsigned long): 4 line: 267
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< sqlPassword ==>sdmsql<== line: 780
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< BEFORE calloc statement line: 795 ...
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< AFTER calloc statement line: 805
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< BEFORE calloc dbProc line: 826 ...
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< AFTER calloc dbProc line: 836
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< BEFORE SQLAllocHandle SQL_HANDLE_ENV line: 855 ...
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< AFTER SQLAllocHandle SQL_HANDLE_ENV status: 0 line: 866
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< BEFORE SQLAllocHandle SQL_HANDLE_DBC line: 891 ...
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< AFTER SQLAllocHandle SQL_HANDLE_DBC status: 0 line: 902
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< odbcDriver ==>ODBC Driver 17 for SQL Server<== line: 963
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< BEFORE SQLDrivers line: 969 ...
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< AFTER SQLDrivers status: 0 line: 986
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< driverFound: 1 (bool) description ==>ODBC Driver 17 for SQL Server<== odbcDriver ==>ODBC Driver 17 for SQL Server<== line: 1019
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< driverAttributes ==>UsageCount=1<== line: 1072
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< BEFORE SQLSetConnectAttr SQL_ATTR_LOGIN_TIMEOUT SDB_LOGIN_TIMEOUT: 5 sec line: 1081 ...
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< AFTER SQLSetConnectAttr SQL_ATTR_LOGIN_TIMEOUT status: 0 line: 1093
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< BEFORE SQLSetConnectAttr SQL_ATTR_CONNECTION_TIMEOUT SDB_CONNECTION_TIMEOUT: 5 sec line: 1122 ...
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< AFTER SQLSetConnectAttr SQL_ATTR_CONNECTION_TIMEOUT status: 0 line: 1134
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< hostName ==>Condor<== line: 1223
03/02/20 11:29:16 0x00003e80 - sdbOpen <<< BEFORE SQLDriverConnect inConnStr ==>DRIVER=ODBC Driver 17 for SQL Server;SERVER=Condor;UID=sdmsql;PWD=sdmsql;WSID=Condor;DATABASE=sdmsql;<== line: 1245 ...

The application log file:

Log Name: Application
Source: Application Error
Date: 3/2/2020 11:29:16 AM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: Condor
Description:
Faulting application name: sdm.exe, version: 0.0.0.0, time stamp: 0x5e5d411b
Faulting module name: MSVCR80.dll, version: 8.0.50727.9659, time stamp: 0x5c7d6589
Exception code: 0xc0000005
Fault offset: 0x00001637
Faulting process id: 0x38b0
Faulting application start time: 0x01d5f0b818fe7dee
Faulting application path: C:\sdm\bin\sdm.exe
Faulting module path: C:\WINDOWS\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.9659_none_d08cfd96442b25cc\MSVCR80.dll
Report Id: 5f0a72a7-5bc8-41cc-b721-97031ae8d6b9
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2020-03-02T17:29:16.875908100Z" />
<EventRecordID>27931</EventRecordID>
<Channel>Application</Channel>
<Computer>Condor</Computer>
<Security />
</System>
<EventData>
<Data>sdm.exe</Data>
<Data>0.0.0.0</Data>
<Data>5e5d411b</Data>
<Data>MSVCR80.dll</Data>
<Data>8.0.50727.9659</Data>
<Data>5c7d6589</Data>
<Data>c0000005</Data>
<Data>00001637</Data>
<Data>38b0</Data>
<Data>01d5f0b818fe7dee</Data>
<Data>C:\sdm\bin\sdm.exe</Data>
<Data>C:\WINDOWS\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.9659_none_d08cfd96442b25cc\MSVCR80.dll</Data>
<Data>5f0a72a7-5bc8-41cc-b721-97031ae8d6b9</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>


The contents of the folder holding the DLL which is causing the issue:

C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.9659_none_d08cfd96442b25cc>dir /A
03/18/2019 10:44 PM 479,232 msvcm80.dll
03/18/2019 10:44 PM 548,864 msvcp80.dll
03/18/2019 10:44 PM 626,688 msvcr80.dll

I have removed every thing (including SQL Server:

Microsoft SQL Server 2012 (SP2-GDR) (KB3194719) - 11.0.5388.0 (X64)
Sep 23 2016 16:56:29
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.3 <X64> (Build 18363: )


and then reinstalling SQL, the ODBC driver, and the C runtime library for 2019.

The issue appears to me to be with access.

If you need something else please let me know.

John

Continue reading...
 
Back
Top