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

ngscopeclient Fix crash on Instrument empty nickname #500

Merged
merged 3 commits into from
Sep 22, 2022
Merged

ngscopeclient Fix crash on Instrument empty nickname #500

merged 3 commits into from
Sep 22, 2022

Conversation

bvernoux
Copy link
Contributor

No description provided.

@azonenberg
Copy link
Collaborator

Empty nicknames should not be possible, adding this check to every single place we use the nickname would be a huge amount of work and turn into constant whack-a-mole.

Better to add error detection when loading recent instruments and connecting to devices to reject any attempt to supply an empty name.

@bvernoux
Copy link
Contributor Author

bvernoux commented Sep 20, 2022

Yes it will be better to catch that as early as possible.
Code proposal (tested and working)

  • Use a default nickname for each instrument
  • Force user to choose a nickname not empty (if it is empty)

…ickname is empty" This reverts commit 74ea5d2.

Use a default nickname for each instrument
Force user to choose a nickname not empty (if it is empty)
@bvernoux bvernoux changed the title Fix crash with WindowSCPIConsoleMenu when SCPIInstruments m_nickname is empty Fix crash, use a default nickname for each instrument (if the nickname is empty force user to set a nickname) Sep 20, 2022
@bvernoux bvernoux changed the title Fix crash, use a default nickname for each instrument (if the nickname is empty force user to set a nickname) ngscopeclient Fix crash, use a default nickname for each instrument (if the nickname is empty force user to set a nickname) Sep 20, 2022
@bvernoux bvernoux changed the title ngscopeclient Fix crash, use a default nickname for each instrument (if the nickname is empty force user to set a nickname) ngscopeclient Fix crash on empty nickname Sep 20, 2022
@bvernoux bvernoux changed the title ngscopeclient Fix crash on empty nickname ngscopeclient Fix crash on Instrument empty nickname Sep 20, 2022
@azonenberg azonenberg merged commit cf3e09c into ngscopeclient:master Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants