-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iODBC Mac EXC_BAD_ACCESS #23
Comments
I have a fix for the issue but I am not able to push it back to the repository. |
You could create patch/diff and put it here in message, I will recheck it and apply to source code |
Like this: diff --git a/iodbc/herr.c b/iodbc/herr.c
|
I am doing a SQLConnect to a datasource that does not exist and when I try to get the number of errormessages I SQLGetDiagField SQL_DIAG_NUMBER. It checks if con has a value but it also need the con->henv to get at the driver but since there is no datasource with that name then there is not driver and (((ENV_t *) con->henv)->dodbc_ver Fails with a memory exception
/bhc
From: Sergey Malinin [mailto:notifications@github.com]
Sent: 5. juli 2017 10:56
To: openlink/iODBC
Cc: cybearinsight; Author
Subject: Re: [openlink/iODBC] iODBC Mac EXC_BAD_ACCESS (#23)
You could create patch/diff and put it here in message, I will recheck it and apply to source code
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#23 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AI6rv3Czb3l0Yb03L7fdRl_i7XfP4EkSks5sK0-zgaJpZM4OI9fV> . <https://github.com/notifications/beacon/AI6rv7qJO6E_5OZnojKmfq9iY87bHSZHks5sK0-zgaJpZM4OI9fV.gif>
|
Ok, thanks, it will be added. |
Hello Sergey,
Is there an ETA for new OSX binaries on the iODBC.org web pages.
I have a couple of new customers that have hit the same issue.
/bhc
From: Sergey Malinin [mailto:notifications@github.com]
Sent: 5. juli 2017 17:19
To: openlink/iODBC
Cc: cybearinsight; Author
Subject: Re: [openlink/iODBC] iODBC Mac EXC_BAD_ACCESS (#23)
Closed #23 <#23> .
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#23 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AI6rvx4m6tlKt85amfGF0noy9WFU6AAqks5sK6lngaJpZM4OI9fV> . <https://github.com/notifications/beacon/AI6rv3fU2gHVHSI-b-__W4qwj2hEoU7lks5sK6lngaJpZM4OI9fV.gif>
|
I have started to use iODBC on mac and when I connect to a Datasource name that does not exist I get an error, that is fine, but when I try to get the diagnostic information the iODBC Driver manager crashes:
I am calling the SQLGetDiagField to get the number of diagnostic record.
From Debugger:
(lldb) bt
SQLGetDiagField_Internal + 2766, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x538) frame #0: 0x0000000101c1a56e iODBC
SQLGetDiagField_Internal + 2766frame Can't built on OSX #1: 0x0000000101c1aeb3 iODBC`SQLGetDiagField + 163
AddDiagRecord(pObj=0x000000010070f5d0, no=2, rowNo=0) + 442 at sqodbc.c:276 frame #3: 0x0000000101bd1719 cxdya63u64i.dylib
CheckErrorRow(pObj=0x000000010070f5d0, lErrorCode=-1, rowNo=0) + 105 at sqodbc.c:374Frame 2 where I call SQLGetDiagField:
276 lErrorCode=SQLGetDiagField(handletype,handle,0,SQL_DIAG_NUMBER,&diagCount,sizeof(diagCount),&ressize);
277 // LOG2File("AddDiagRecord1 %d %d %d",lErrorCode,diagCount,ressize);
278 if ( lErrorCode != noErr || diagCount==0)
279 {
280 // SQLGetDiagField failed try to get error info using SQLError through function ODBCErrorText
281 PAA pRes,pAA;
282 UI4 shape;
283
284 SI4 Nativ,ErrLen=0;
285 CH1 ErrText[MaxErrorLen];
(lldb) fr v
(POBJ) pObj = 0x000000010070f5d0
(SI4) no = 2
(SI4) rowNo = 0
(SI4) lErrorCode = 0
(SI4) lE = 0
(SQLINTEGER) diagCount = 0
(SQLINTEGER) i = 0
(long) errorRow = 0
(SQLSMALLINT) ressize = 0
(SQLHANDLE) handle = 0x000000010180f430
(SQLSMALLINT) handletype = 2
The code to extract diagnostic information seems to would with other Datasource managers, Native Windows, unixODBC 2.2 , unixODBC 2.3 and DataDirect 7.1.6 on AIX
The text was updated successfully, but these errors were encountered: