You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What versions are you using?
3.1.0, repro in python 3.9 and 3.12, issue is on client side I think, DB version is irrelevant
Is it an error or a hang or a crash?
Hard crash, segfault
What error(s) or behavior you are seeing?
Segmentation fault
Does your application call init_oracle_client()?
Reproduces both in thin and thick mode
Include a runnable Python script that shows the problem.
import oracledb
# this is copy&paste from doc
def output_type_handler(cursor, metadata):
def out_converter(d):
if isinstance(d, str):
return f"{d} was a string"
else:
return f"{d} was not a string"
if metadata.type_code is oracledb.DB_TYPE_NUMBER:
return cursor.var(
oracledb.DB_TYPE_VARCHAR,
arraysize=cursor.arraysize,
outconverter=out_converter,
)
conn = oracledb.connect("...")
# comment out the line below and the issue goes away
conn.outputtypehandler = output_type_handler
sql = "select 1 n from dual"
t = conn.fetch_df_all(sql)
print(t)
The text was updated successfully, but these errors were encountered:
One item on our task list is to look at type handling etc. Were you wanting something similar, or does your code base have the handler/converter in place for non-dataframe queries?
This patch can be used to avoid the segfault. More effort is needed to get to the true source of the issue, but this is will "work" for you. The other workaround is to simply not specify an output type handler -- since it won't do you any good anyway!
diff --git a/src/oracledb/impl/base/cursor.pyx b/src/oracledb/impl/base/cursor.pyx
index 3a78fa40..0815be2b 100644
--- a/src/oracledb/impl/base/cursor.pyx+++ b/src/oracledb/impl/base/cursor.pyx@@ -306,6 +306,8 @@ cdef class BaseCursorImpl:
cdef:
BaseConnImpl conn_impl
object type_handler
+ if self.fetching_arrow:+ return None
if self.outputtypehandler is not None:
type_handler = self.outputtypehandler
else:
What versions are you using?
3.1.0, repro in python 3.9 and 3.12, issue is on client side I think, DB version is irrelevant
Is it an error or a hang or a crash?
Hard crash, segfault
What error(s) or behavior you are seeing?
Segmentation fault
Does your application call init_oracle_client()?
Reproduces both in thin and thick mode
Include a runnable Python script that shows the problem.
The text was updated successfully, but these errors were encountered: