title: Cannot find unhandled exception error due to code not showing
body: <p>I have an error I can't find. it produces this message: System.NullReferenceException: Object reference not set to an instance of an object.
  There is no code shown as it is excecuting externally. This project is based on ble and uses this plugin: <a href="https://github.com/xabre/xamarin-bluetooth-le" rel="nofollow noreferrer">https://github.com/xabre/xamarin-bluetooth-le</a></p>
  
  <pre><code>private BluetoothAdapter adapter;
      protected override async void OnCreate(Bundle bundle)
      {
          TabLayoutResource = Resource.Layout.Tabbar;
          ToolbarResource = Resource.Layout.Toolbar;
          base.OnCreate(bundle);
          global::Xamarin.Forms.Forms.Init(this, bundle);
          LoadApplication(new App());
          adapter = BluetoothAdapter.DefaultAdapter;
          MainActivity main = new MainActivity();
          adapter.Enable();
          //main.enableBluetoothOnDevice();
          await scanAsync();
      }
      List&lt;Plugin.BLE.Abstractions.Contracts.IDevice&gt; deviceList = new List&lt;Plugin.BLE.Abstractions.Contracts.IDevice&gt;();
      public async System.Threading.Tasks.Task scanAsync()
      {            
          MainPage page1 = new MainPage();            
          var ble = CrossBluetoothLE.Current;
          var adapter = CrossBluetoothLE.Current.Adapter;
          var state = ble.State;
          ble.StateChanged += (s, e) =&gt;
          {
          };
          adapter.DeviceDiscovered += (s, a) =&gt; deviceList.Add(a.Device);
          await adapter.StartScanningForDevicesAsync();            
          int index = deviceList.FindIndex(item =&gt; item.Name == "CTQBLE");
          if (index &gt;= 0)
          {         
              try
                  {
                  await adapter.ConnectToDeviceAsync(deviceList.Where(i =&gt; i.Name == "CTQBLE").FirstOrDefault());
                  bleRecieveAsync();  //Error occurs here
                  page1.deviceConnected();
  
                  }
              catch (DeviceConnectionException e)
                  {
                      page1.deviceNotConnected();
                  }
          }    
          else
          {
              page1.deviceNotConnected();
              return;
          }
      }
  
      public async void  bleRecieveAsync()
      {
          var service1 = await deviceList.Where(i =&gt; i.Name == "CTQBLE").FirstOrDefault().GetServiceAsync(Guid.Parse("abcd0021-9c79-4ed6-a382-50946d830c3f"));
          var characteristicFirmware = await service1.GetCharacteristicAsync(Guid.Parse("abcd0022-9c79-4ed6-a382-50946d830c3f"));
          var bytesFirmware = await characteristicFirmware.ReadAsync();
  
          var service2 = await deviceList.Where(i =&gt; i.Name == "CTQBLE").FirstOrDefault().GetServiceAsync(Guid.Parse("abcd0021-9c79-4ed6-a382-50946d830c3f"));
          var characteristicRunState = await service2.GetCharacteristicAsync(Guid.Parse("abcd0023-9c79-4ed6-a382-50946d830c3f"));
          var bytesRunState = await characteristicRunState.ReadAsync();
  
          var service3 = await deviceList.Where(i =&gt; i.Name == "CTQBLE").FirstOrDefault().GetServiceAsync(Guid.Parse("abcd0021-9c79-4ed6-a382-50946d830c3f"));
          var characteristicConfig = await service3.GetCharacteristicAsync(Guid.Parse("abcd0024-9c79-4ed6-a382-50946d830c3f"));
          var bytesConfig = await characteristicConfig.ReadAsync();
  
          var service4 = await deviceList.Where(i =&gt; i.Name == "CTQBLE").FirstOrDefault().GetServiceAsync(Guid.Parse("abcd0021-9c79-4ed6-a382-50946d830c3f"));
          var characteristicError = await service4.GetCharacteristicAsync(Guid.Parse("abcd0025-9c79-4ed6-a382-50946d830c3f"));
          var bytesError = await characteristicError.ReadAsync();
  
          var service5 = await deviceList.Where(i =&gt; i.Name == "CTQBLE").FirstOrDefault().GetServiceAsync(Guid.Parse("abcd0021-9c79-4ed6-a382-50946d830c3f"));
          var characteristicCommand = await service5.GetCharacteristicAsync(Guid.Parse("abcd0026-9c79-4ed6-a382-50946d830c3f"));
          var bytesCommand = await characteristicCommand.ReadAsync();
      }
  </code></pre>