View Issue Details

IDProjectCategoryView StatusLast Update
00028703 - Current Dev ListBugpublic2018-09-01 19:47
ReporterK7ZCZAssigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status newResolutionopen 
Product Version6.4.0.877 
Target VersionFixed in Version 
Summary0002870: Logbook: crashes when connecting to down MySQL server instance
DescriptionThe MySQL ODBC drivers cause the Logbook to crash if the Logbook is configured to use a MySQL database that's not available at the startup of the Logbook. The Logbook crashes, but the problem is that the Logbook's code (inside MFC, actually -- internal to the library) queries the MySQL ODBC driver for error information. When it does so, the drivers cause a crash instead of returning a useful error message.

The callstack shows that the crash is when the Logbook tries to connect to the database (with the OpenEx() call). There's no way for the Logbook to know not to make that call -- it has to make that call, and expects an exception or a failure to be reported.
Steps To Reproduce1) Start up the Logbook
2) Configure the Logbook to use a MySQL server instance
3) Set that MySQL Server instance as the Default database
4) Close the Logbook
5) Stop your MySQL server instance
6) Start the Logbook

BUG#1) Crash at startup with the attached call stack
Additional Information
     odbc32.dll!_SQLErrorW@32()	Unknown
     HRDLogbook.exe!CDBException::BuildErrorString(CDatabase * pdb=0x0ecda204, void * hstmt=0x00000000, int bTrace=1) Line 142	C++
     HRDLogbook.exe!AfxThrowDBException(short nRetCode=-1, CDatabase * pdb=0x0ecda204, void * hstmt=0x00000000) Line 60	C++
     HRDLogbook.exe!CDatabase::ThrowDBException(short nRetCode=-1) Line 38	C++
     HRDLogbook.exe!CDatabase::Connect(unsigned long dwOptions=12) Line 808	C++
     HRDLogbook.exe!CDatabase::OpenEx(const wchar_t * lpszConnectString=0x17853728, unsigned long dwOptions=12) Line 299	C++
>	HRDLogbook.exe!CBackgroundProcessingThreadLookups::DatabaseList(HWND__ * const hWnd=0x00000000, CLogbookDatabases * pList=0x0ed13130) Line 902	C++
     HRDLogbook.exe!CDXClusterDlg::LookupThreadProc(void * pParam=0x0cf9edb0) Line 339	C++
     HRDLogbook.exe!_callthreadstartex() Line 376	C
     HRDLogbook.exe!_threadstartex(void * ptd=0x0cfa7e10) Line 359	C
     kernel32.dll!@BaseThreadInitThunk@12()	Unknown
     ntdll.dll!__RtlUserThreadStart()	Unknown
     ntdll.dll!__RtlUserThreadStart@8()	Unknown
TagsNo tags attached.
ModuleLogbook
Sub-ModuleData
TestingNot Started

Activities

K7ZCZ

2018-09-01 19:47

administrator   ~0006047

I'm using MyODBC5W version 5.3.10

Issue History

Date Modified Username Field Change
2018-09-01 19:46 K7ZCZ New Issue
2018-09-01 19:47 K7ZCZ Note Added: 0006047