Skip to content

The board discovery might miss detecting detached board when the package index is being updated #1186

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

Open
3 tasks done
kittaakos opened this issue Jul 14, 2022 · 0 comments
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@kittaakos
Copy link
Contributor

Describe the problem

Originally from #1181:

There is a bug with #1167 that can be reproduced on my Windows machine with the following steps:

  • IDE2 is up and running, a board is connected and recognized by IDE2; it's the selected board,
  • Stop IDE2,
  • Start IDE2 (You can see the board is connected from the dropdown),
  • Disconnect the board when the Downloading .... notification message (this is when IDE2 initializes the core client),
  • Core client reinitialization is done, the board is not connected, but IDE2 still shows it as a connected board.

This PR fixes this issue, but IDE2 must stop the board discovery before re-initializing the core client and restarting after it. WheIDE2 stops the board discoveryE2 before the re-init; zero available board and ports must be broadcasted to the frontends. So users will see a disconnect/reconnect board before/after the index update and the core client re-init.

If the IDE2 misses the board detachment event, the boards selection dropdown will show the board as a connected one although it was detached. Attaching + detaching the board should solve this problem.

To reproduce

Note that the bug cannot be reproduced consistently.

Please reference the description of this issue.

Expected behavior

The detached board is tracked by the IDE2 during the indexes update/core client re-initialization.

Arduino IDE version

a003831

Operating system

macOS

Operating system version

12.3.1

Additional context

I could only reproduce the defect from my slow Windows env, running the IDE2 from the source.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@kittaakos kittaakos added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Jul 14, 2022
@kittaakos kittaakos self-assigned this Jul 14, 2022
@kittaakos kittaakos mentioned this issue Jul 14, 2022
4 tasks
@kittaakos kittaakos removed their assignment Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

1 participant