[Libreoffice-bugs] [Bug 122779] FILEOPEN (BASE) Connection to Oracle DB via ODBC ends in [ODBC][ORACLE] Optional Feature not implemented

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed May 13 11:19:51 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=122779

--- Comment #29 from Julien Nabet <serval2412 at yahoo.fr> ---
(In reply to Lionel Elie Mamane from comment #26)
> ...
> The backtrace looks like a crash in the deletion of m_pRowStatusArray.
> Weird, unless the ODBC driver takes ownership of the pointer when we pass
> it... which would be *really* unexpected.

I tested several things:
1) I put in OResultSet dtr:
osl_atomic_increment( &m_refCount );
m_pSkipDeletedSet.reset();
m_pRowStatusArray.reset();
osl_atomic_decrement( &m_refCount );

since m_pSkipDeletedSet is initialized with m_pSkipDeletedSet.reset( new
OSkipDeletedSet(this) );

Same thing

2) I also tried to convert unique_ptr to simple pointer like in OStatement
osl_atomic_increment( &m_refCount );
m_pSkipDeletedSet.reset();
delete[] m_pRowStatusArray;
osl_atomic_decrement( &m_refCount );

Idem

I also tried to add:
setStmtOption<SQLUSMALLINT*, SQL_IS_POINTER>(SQL_ATTR_ROW_STATUS_PTR, nullptr);
before deleting or reset, idem.

It doesn't crash only if it's simple pointer and no delete[] (but I suppose it
would leak here)

with all mechanism of dispose, release, close, weak ref, component helper,
Reference, dtr + the fact that ODBC driver does its own ressource management
and LO must adapt to it, it's not easy to disantangle all this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200513/a8e914dc/attachment.htm>


More information about the Libreoffice-bugs mailing list