<div dir="ltr">[Update]<div><br></div><div>Further debugging I have found that the problematic objects are the "<span style="font-family:Menlo;font-size:12px">virConnectCredential</span>" instances; these are created as part of the callback procedure. If I keep these instances from getting GC'ed, there are no issues.</div><div>Also, as part of testing with esx driver, I see two instances of "<span style="font-family:Menlo;font-size:12px">virConnectCredential</span>" getting created (one for user name and another one for password). But both these instances seem to be backed by the same native pointer; is this expected?</div>





<div><br></div>





<div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>Thanks & Regards<br>Sachin Soman<br><br></div>
<div> </div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 23, 2019 at 5:20 PM Daniel P. Berrangé <<a href="mailto:berrange@redhat.com">berrange@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Apr 23, 2019 at 05:02:12PM +0530, Sachin Soman wrote:<br>
> [Update]<br>
> <br>
> Instead of passing an auth callback to Connect, if I store the credentials<br>
> in an INI file and pass the file path as authfile URI parameter, I dont see<br>
> these errors.<br>
<br>
That makes it sound like some kind of memory handling bug in the JNI<br>
native calls. I looked the libvirt-java code for the auth callback<br>
but I don't entirely understand what JNI requires here. Probably needs<br>
someone who is more expert in JNI to take a look at the libvirt bindings<br>
I'm afraid.<br>
<br>
Regards,<br>
Daniel<br>
-- <br>
|: <a href="https://berrange.com" rel="noreferrer" target="_blank">https://berrange.com</a>      -o-    <a href="https://www.flickr.com/photos/dberrange" rel="noreferrer" target="_blank">https://www.flickr.com/photos/dberrange</a> :|<br>
|: <a href="https://libvirt.org" rel="noreferrer" target="_blank">https://libvirt.org</a>         -o-            <a href="https://fstop138.berrange.com" rel="noreferrer" target="_blank">https://fstop138.berrange.com</a> :|<br>
|: <a href="https://entangle-photo.org" rel="noreferrer" target="_blank">https://entangle-photo.org</a>    -o-    <a href="https://www.instagram.com/dberrange" rel="noreferrer" target="_blank">https://www.instagram.com/dberrange</a> :|<br>
</blockquote></div>