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

Offline rameshwar

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
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: 3055
  • Karma: 1000
    • Soft Service Company
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: 3055
  • Karma: 1000
    • Soft Service Company
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.

Offline rameshwar

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
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.

Offline rameshwar

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
I should have attached this image in my previous post. Thank you.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
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: 3055
  • Karma: 1000
    • Soft Service Company
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.

Offline Flominator

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
I have had this once or twice, too.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
We are working on this issue but still can't reproduce it.

Offline Flominator

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
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: 3055
  • Karma: 1000
    • Soft Service Company
Will do today and send to you. Thank you.

Offline Flominator

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
Creating a Ghost image of the current state, take your time.

Offline Flominator

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
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: 3055
  • Karma: 1000
    • Soft Service Company
Hi,

Have you tryed latest 6.11.4? Is problem still there?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
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 8 9