Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hang and high cpu after device disconnect #16

Open
ettom opened this issue May 11, 2020 · 1 comment
Open

Hang and high cpu after device disconnect #16

ettom opened this issue May 11, 2020 · 1 comment

Comments

@ettom
Copy link

ettom commented May 11, 2020

Describe the bug
Smuview hangs and uses 100% CPU when the connection to the power supply is lost (e.g by turning the power supply off). The UI recovers after a while, but a process with the name of /tmp/.mount_smuvieD7pmN9/usr/bin/smuview --driver=korad-kaxxxxp:conn=/dev/ttyACM0 keeps using 100% CPU.

Driver: korad-kaxxxxp, actual model: Tenma 72-2540

To Reproduce
Steps to reproduce the behavior:

  1. smuview --driver=korad-kaxxxxp:conn=/dev/ttyACM0
  2. Interrupt the serial connection by turning the device off or by unplugging the cable
  3. SmuView hangs

Expected behavior
SmuView does not hang and indicates that the connection has been lost.

Screenshots or log

Configurable::init(): Init  "Tenma 72-2540"  - key  "Regulation"
Configurable::init(): Init  "Tenma 72-2540"  - key  "Over Current Protection Enabled"
Configurable::init(): Init  "Tenma 72-2540"  - key  "Over Voltage Protection Enabled"
Configurable::init(): Init  "Tenma 72-2540"  - key  "Enabled"
Configurable::init(): Init  "Tenma 72-2540"  - key  "Current Limit"
Configurable::init(): Init  "Tenma 72-2540"  - key  "Current"
Configurable::init(): Init  "Tenma 72-2540"  - key  "Voltage Target"
Configurable::init(): Init  "Tenma 72-2540"  - key  "Voltage"
Init channel  "V" , channel_start_timestamp =  "2020.05.11 20:46:10.535"
Init channel  "I" , channel_start_timestamp =  "2020.05.11 20:46:10.535"
Init analog base signal  "V [V DC]"
Init analog time signal  "V [V DC]" , signal_start_timestamp_ =  "2020.05.11 20:46:10.535"
Init analog base signal  "I [A DC]"
Init analog time signal  "I [A DC]" , signal_start_timestamp_ =  "2020.05.11 20:46:10.535"
Init channel  "" , channel_start_timestamp =  "2020.05.11 20:46:10.535"
Init analog base signal  "P [W]"
Init analog time signal  "P [W]" , signal_start_timestamp_ =  "2020.05.11 20:46:10.535"
Init channel  "" , channel_start_timestamp =  "2020.05.11 20:46:10.535"
Init analog base signal  "R [Ω]"
Init analog time signal  "R [Ω]" , signal_start_timestamp_ =  "2020.05.11 20:46:10.535"
Init channel  "" , channel_start_timestamp =  "2020.05.11 20:46:10.535"
Init analog base signal  "Wh [Wh]"
Init analog time signal  "Wh [Wh]" , signal_start_timestamp_ =  "2020.05.11 20:46:10.535"
Init channel  "" , channel_start_timestamp =  "2020.05.11 20:46:10.535"
Init analog base signal  "Ah [Ah]"
Init analog time signal  "Ah [Ah]" , signal_start_timestamp_ =  "2020.05.11 20:46:10.535"
Start aquisition for  "Tenma 72-2540" ,  aquisition_start_timestamp_ =  "2020.05.11 20:46:10.535"
sr: serial-libsp: Write error (5): Input/output error.
sr: korad-kaxxxxp: Error sending command: -1.
Configurable::set_config(): Failed to set config key  "Enabled" .  generic/unspecified error
sr: serial-libsp: Write error (5): Input/output error.
sr: korad-kaxxxxp: Error sending command: -1.

Enviroment (please complete the following information):
0.0.4 AppImage on Arch Linux

@knarfS
Copy link
Owner

knarfS commented May 14, 2020

This is a known problem with the underlying libsigrok or libserialport, but it's not very high on my priority list atm :)
A workaround is to disconnect the device in SmuView before unplugging it / turning it off.

I leave this issue open as a reminder for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants