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

Sample Code Crashes Unity Editor on Windows when connection with device is lost while recording #1

Closed ClaytonHughes closed 5 years ago

ClaytonHughes commented 5 years ago

I don't know whether this issue is specific to the sample or is inherent to the library, but I have reliable reproduction steps:

  1. Open the unity-sample project with Unity 2018.3.11f1 x64 on Windows 10 (Version 1809, Build 17763.379) (I haven't tried other versions of Unity or OS)
  2. Open the "AboutWindow" scene.
  3. Launch the application in-editor with the play button.
  4. Find Devices, Connect to a device (I have a 4-port plux)
  5. Begin recording data from channel one (it hardly seems relevant but I was using an EDA and had nothing in any of the other channels)
  6. Walk a fair distance away from the computer with the plux (50-100 meters?), so as to disrupt communications between them. (Presumably you could also put it in a Faraday cage or something.)
  7. The plux will continue to record data until the Unity Editor crashes. Nothing is logged to the Console or log file after Acquisition Thread Started with Success !.
GRamosPlux commented 5 years ago

Dear ClaytonHughes,

Thank you very much for your detailed explanation and kind support to our project ! After replicating the reported experimental procedure we reached the same "crash", your contribute was really useful.

Essentially we were not dealing with unexpected disconnect events, namely, the ones caused by the lost of connection between the computer and the PLUX device. Meanwhile we implemented some corrections (to fix this issue) and the first tests were positive.

You can access the new version on our repository !

We will carefully wait for your feedback, if you detect additional issues, please, do not hesitate to present them to us.

               My best and sincere regards,
               GRamosPlux