pluxbiosignals / unity-sample

Unity Sample APP intended to show a practical integration of PLUX devices with the Unity environment, encompassing functionalities such as: the search of compatible Bluetooth devices and also the start/stop of a real-time acquisition.
15 stars 3 forks source link

Connectivity issues #9

Closed jdevoldere closed 2 years ago

jdevoldere commented 3 years ago

The scanning thread starts with success but it either prints no messages after that whatsoever or I receive this error most of the time:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <599589bf4ce248909b8a14cbe4a2034e>:0 
  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <599589bf4ce248909b8a14cbe4a2034e>:0 
  at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <599589bf4ce248909b8a14cbe4a2034e>:0 
  at PluxInterface.ScanResults (System.Collections.Generic.List`1[T] listDevices) [0x0003b] in C:\Users\Gerbuiker\Documents\Unity Projects\PalletizingTraining\Assets\HitLab\PluxInterface.cs:106 
  at PluxDeviceManager.<ScanPluxDevs>b__53_0 () [0x00000] in C:\Users\Gerbuiker\Documents\Unity Projects\PalletizingTraining\Assets\PluxDeviceManager\PluxDeviceManager.cs:536 
  at UnityThreading.Task`1+<>c__DisplayClass5_0[T].<.ctor>b__0 (UnityThreading.Task t) [0x00001] in C:\Users\Gerbuiker\Documents\Unity Projects\PalletizingTraining\Assets\PluxDeviceManager\utils\Task.cs:414 
  at (wrapper delegate-invoke) System.Func`2[UnityThreading.Task,UnityThreading.Task+Unit].invoke_TResult_T(UnityThreading.Task)
  at UnityThreading.Task`1[T].Do () [0x00001] in C:\Users\Gerbuiker\Documents\Unity Projects\PalletizingTraining\Assets\PluxDeviceManager\utils\Task.cs:442 
  at UnityThreading.Task.DoInternal () [0x0001d] in C:\Users\Gerbuiker\Documents\Unity Projects\PalletizingTraining\Assets\PluxDeviceManager\utils\Task.cs:255 
UnityEngine.Debug:LogError(Object)
UnityThreading.Task:DoInternal() (at Assets/PluxDeviceManager/utils/Task.cs:269)
UnityThreading.Dispatcher:RunTask(Task) (at Assets/PluxDeviceManager/utils/Dispatcher.cs:495)
UnityThreading.Dispatcher:ProcessSingleTask(Task) (at Assets/PluxDeviceManager/utils/Dispatcher.cs:484)
UnityThreading.Dispatcher:ProcessTasksInternal() (at Assets/PluxDeviceManager/utils/Dispatcher.cs:475)
UnityThreading.Dispatcher:ProcessTasks() (at Assets/PluxDeviceManager/utils/Dispatcher.cs:392)
UnityThreadHelper:Update() (at Assets/PluxDeviceManager/utils/UnityThreadHelper.cs:243)

It seemingly only connects successfully by chance.

Script: https://drive.google.com/open?id=1hQs7IDNgZQK3YDEebmZcPGtiWkIMIZIS

GRamosPlux commented 3 years ago

Dear @jdevoldere,

I need to apologize for the undesirable delay linked to the current reply. Our team hopes that this message still reaches in an appropriate time, finding you well!

A few moments ago we did a new commit aimed to fix some problems in the scanning thread and I believe that this issue should now be fixed.

I will carefully wait for your kind and important feedback in order to understand if further actions will be needed ;-)

My best and sincere regards, GRamosPlux