Bug #79124 myodbc5w.dll causes crash in Web Application using Crystal Reports
Submitted: 4 Nov 2015 17:32 Modified: 11 Feb 2016 12:17
Reporter: Phil Smith Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.3.4 OS:Windows
Assigned to: CPU Architecture:Any
Tags: crash, crystal, myodbc5w, ODBC, windows

[4 Nov 2015 17:32] Phil Smith
Description:
I have a .Net web application which uses "SAP Crystal Reports, developer version for Microsoft Visual Studio" to process reports.  All the reports get all their data from MySQL via ODBC.  Occasionally the application crashes.  

DebugDiag 2 Crash Dump excerpts:

WARNING - DebugDiag was not able to locate debug symbols for \myodbc5w.dll, so the information below may be incomplete.

In iisexpress__PID__3556__Date__11_04_2015__Time_04_16_00PM__533__Second_Chance_Exception_C0000005.dmp the assembly instruction at myodbc5w!SQLGetCursorNameW+2672f in C:\Program Files (x86)\MySQL\Connector ODBC 5.3\myodbc5w.dll from Oracle Corporation has caused an access violation exception (0xC0000005) when trying to read from memory location 0x00000000 on thread 53

Thread 53 - System ID 9212

Entry point   msvcr80!_threadstartex 
Create time   04/11/2015 16:16:00 
Time spent in user mode   0 Days 00:00:00.015 
Time spent in kernel mode   0 Days 00:00:00.015 

This thread is not fully resolved and may or may not be a problem. Further analysis of these threads may be required.

.NET Call Stack

Function

Full Call Stack

Function

myodbc5w!SQLGetCursorNameW+2672f 
myodbc5w!SQLGetCursorNameW+23f83 
myodbc5w!SQLGetCursorNameW+25e9c 
odbc32!ToAnsi_SQLDescribeCol+5f8 
odbc32!SQLColAttributeW+f3 
crdb_odbc!DbAttachToRowset+13328 

How to repeat:
I can reproduce the error fairly reliably by running code to open and close a single report repeatedly.  Over a number of tests with the same report, the number of successful open/close iterations before the crash occurs can vary from a handful to several hundred.

Some reports don't ever seem to cause a crash during 1000 iterations, but I haven't been able to determine which differences (if any) between "good" and "bad" reports are significant.

I'm now debugging on my Windows 7 box with iisexpress (32-bit), but I get the same problem on a production server 2012 (64-bit).

I suspect this is going to be almost impossible for anyone else to reproduce.  I just hoped the DebugDiag might give some clues.  I can supply trace and query logs too, if that helps.
[1 Feb 2016 11:35] Chiranjeevi Battula
Hello  Phil Smith,

Thank you for the bug report.
I tried to reproduce the issue at my end using Microsoft Visual Studio 2013,  with  MySQL Connector / ODBC 5.3.4, but not seeing any issue in calling Crystal Reports.
Could you please provide repeatable test case (exact create table statements, MySQL version, sample data, sample rpt etc. - please make it as private if you prefer) to confirm this issue at our end?

Thanks,
Chiranjeevi.
[11 Feb 2016 11:03] Phil Smith
Chiranjeevi,

Many thanks for your efforts so far.  I knew this would be difficult to track down and at the moment I can't even reproduce it myself.  However, on the production server (2012) I mentioned, it's still happening on average about once a day.

I will keep trying to produce a repeatable test case, but in the mean time is it possible to glean anything from the DebugDiag crash dump?  Or is there anything else I can run on the production server to give us useful information whenever the crash occurs?

Thanks,

Phil.
[11 Feb 2016 12:17] Chiranjeevi Battula
Hello  Phil Smith,

Thank you for your feedback.
I could not repeat this issue at my end with the provided information. 
If you can provide more information with exact test case, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Thanks,
Chiranjeevi.