Author Topic: Why is sometimes, though rare, IsInRange causing System.NullReferenceException?  (Read 42532 times)

rameshwar

  • Guest
Why is sometimes, though very rare, IsInRange causing System.NullReferenceException?

Application: MyApp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception.

Exception Info:

System.NullReferenceException Stack:

at <Module>.wcl.wcl_int.CwclSDPParser.Parse(wcl.wcl_int.CwclSDPParser*, Byte*, UInt32)
at <Module>.wcl.wcl_int.CwclSDPParser.{ctor}(wcl.wcl_int.CwclSDPParser*, Byte*, UInt32)
at <Module>.wcl.wcl_int.CwclBluetoothDevice.EnumServicesMicrosoft(wcl.wcl_int.CwclBluetoothDevice*, wcl.wcl_int.CwclBluetoothServices*, _GUID*)

at <Module>.wcl.wcl_int.CwclBluetoothDevice.EnumServices(wcl.wcl_int.CwclBluetoothDevice*,
wcl.wcl_int.CwclBluetoothRadio*, wcl.wcl_int.CwclBluetoothServices*, _GUID*)

at <Module>.wcl.wcl_int.CwclBluetoothDevice.IsInRange(wcl.wcl_int.CwclBluetoothDevice*, wcl.wcl_int.CwclBluetoothRadio*, Boolean*)

at wcl.wclBluetoothDevice.IsInRange(wcl.wclBluetoothRadio, Boolean ByRef)

at MyApp.Server.DiscoveryService.wclBluetoothDiscovery_OnDiscoveryComplete(System.Object, wcl.wclBluetoothDiscoveryCompleteEventArgs)

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Hello,

Looks like a bug in SDP parser. We will check that out and fix.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Hello,

Can you please try BluetoothDiscovery demo application and its Enum services button: I helps to check were bug is. It works or does not.

rameshwar

  • Guest
I tried BluetoothDiscovery demo application and its Enum services button. It works.

I am not sure, I'll investigate more and then report to you, it seems to me that the exception occurs when two applications are using WCL at the same time. In our program one app is for configuration and the other is the main app. I guess, when both access WCL at the same time then the exception occurs. I'm not sure, I'll investigate and report to you. Thank you.

rameshwar

  • Guest
I should have attached this image in my previous post. Thank you.

[attachment deleted by admin]

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Hello,

Thank you for so detailed information. I will recheck it once again and try to reproduce the issue. WCL should work even used from few apps at the same time so, as I told before, it looks as our bug in WCL and we will do all our best to fix it as soon as possible.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Hello,

I have rechecked the IsInRange code (and SDP Parser code as well). Unfortunately I couldn't reproduce the issue with debices we have but that doesn't mean that there is no bug. So I'll continue working on this matter and hopefully can find where problem is.

Flominator

  • Guest
I have had this once or twice, too.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
We are working on this issue but still can't reproduce it.

Flominator

  • Guest
I can, but the pc is not within our LAN. Do you maybe want to build me some version that collects the info you need?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Will do today and send to you. Thank you.

Flominator

  • Guest
Creating a Ghost image of the current state, take your time.

Flominator

  • Guest
Do you still want me to test it or can I get rid of the image?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Hi,

Have you tryed latest 6.11.4? Is problem still there?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Hi,

Finally issue has been reproduced and fixed. If you need fixed version send us a request as it is not published yet.

 

Sitemap 1 2 3 4 5 6 7