Bug 37396 - "System.ArgumentException: 'jobject' must not be IntPtr.Zero." when calling gatt.Close();
Summary: "System.ArgumentException: 'jobject' must not be IntPtr.Zero." when calling g...
Status: RESOLVED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 6.0.1 (C6SR1)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2016-01-05 00:20 UTC by philip
Modified: 2016-01-07 21:52 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description philip 2016-01-05 00:20:01 UTC
The following code throws the exception:

var gatt = device.ConnectGatt(Application.Context, true, _gattCallback);
[run some other code but continue before we connect to device]
gatt.Disconnect();  // exception here
gatt.Close();       // exception also here
gatt.Dispose();
gatt = null;
Comment 1 philip 2016-01-05 03:06:32 UTC
It turns out I was freeing gatt somewhere else, so please ignore this report.