asterics / AsTeRICS

The Assistive Technology Rapid Integration & Construction Set
http://www.asterics.eu
Other
57 stars 27 forks source link

CIM Port Scanning and usage causes AsTeRICS to freeze or crash #220

Closed klues closed 6 years ago

klues commented 6 years ago

We encountered some strange situations, where CIM Port scanning or usage of CIM Ports caused AsTeRICS to crash. Unfortunately we could not reproduce all errors or causes of errors. These errors occur:

These issues should be resolved or at least improved.

klues commented 6 years ago

https://github.com/asterics/AsTeRICS/pull/221/files

changes in functionality:

other changes regarding performance and stability:

klues commented 6 years ago

Did tests with the following CIM devices:

Testing steps I did:

  1. connected all devices, started ARE
  2. all devices were found and listed after startup
  3. set model Acceleration_test.acs as autostart
  4. on ARE start, model start waits until rescan is finished - afterwards Acceleration_test.acs starts and works without errors
  5. start/stop/redeploy of Acceleration_test.acs works without problems
  6. furter tests:
    • DigitalIn_test.acs with digital in module
    • RemoteMouse_test.acs with HID actuator module (bluetooth)
    • start/stop/redeploy worked without problems
  7. Started each of the test models mentioned above, unplugged the corresponding USB device -> no ARE freeze or shutdown, ports are correctly closed and redeploy of model shows error message, that device is not found.
  8. Other models with connected devices still work, after another device was disconnected
  9. Re-connected Accelerometer -> rescan triggered -> found it and Acceleration_test.acs works again
  10. Reconnecting the other devices -> rescan triggered -> devices were not found.

So all looks good, except of (10). The reason for not finding a re-connected device again is probably that the close() method of the RXTX-library does not correclty close the device in every case and therefore rescan() fails because of an "already in use" error. After restarting ARE, the devices are found again, normally.

klues commented 6 years ago

merged https://github.com/asterics/AsTeRICS/pull/221 -> closing issue