nbenn commented on issue #323:
URL:
https://github.com/apache/arrow-nanoarrow/issues/323#issuecomment-1825997458
> I think what is happening in your last example is that
convert_array_stream() does not call res$release() (whereas
as.data.frame.nanoarrow_array_stream() does).
Yes, that is correct.
> The stream is getting released after the statement and causing a crash.
Also my understanding.
What I don't understand is what exactly is causing the crash in the end.
Releasing the statement before the stream seems to work. And the stream does
eventually get auto-released, so that's also fine. From the lldb output above
```
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=2, address=0x15580fce0)
* frame #0: 0x000000015580fce0
frame #1: 0x00000001035b225c adbcsqlite.so`StatementReaderRelease + 92
frame #2: 0x000000010340de6c nanoarrow.so`finalize_array_stream_xptr + 44
frame #3: 0x0000000100938440
libR.dylib`R_RunWeakRefFinalizer(w=<unavailable>) at memory.c:1498:2 [opt]
frame #4: 0x0000000100938980 libR.dylib`RunFinalizers at memory.c:1565:3
[opt]
...
```
it looks like releasing the stream re-triggers release of the (previously
released) statement. I might be reading this the wrong way though.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]