<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - FILEOPEN (BASE) Connection to Oracle DB via ODBC ends in [ODBC][ORACLE] Optional Feature not implemented"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=122779#c29">Comment # 29</a>
on <a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - FILEOPEN (BASE) Connection to Oracle DB via ODBC ends in [ODBC][ORACLE] Optional Feature not implemented"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=122779">bug 122779</a>
from <span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span></b>
<pre>(In reply to Lionel Elie Mamane from <a href="show_bug.cgi?id=122779#c26">comment #26</a>)
<span class="quote">> ...
> 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.</span >
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>