Skip to content

[Bug] Deadlock when pressing start and pressing button simultaneously #301

Closed

Description

@laurensvalk

Describe the bug

Buttons remain grayed out after clicking the Technic Hub button and the Pybricks Code play button at the same time.

This happens 100% of times for me on Ubuntu 18.04 and on Android 11.

To reproduce
See program in screenshot below. Then press Technic Hub button and the Pybricks Code play button at the same time.

Expected behavior
Either one of the programs to run successfully, or nothing at all; at least no deadlock.

It's a bit of an edge case, but it may help us uncover some of the other issues we are seeing.

Screenshots

It happens whichever you press first.

This happens usually when physical button is pressed first:

image

The other way around, you can usually get to this state:
image

Activity

  1. added
    triage
    software: pybricks-code
    software: pybricks-micropython
    and removed
    triage
    on Apr 12, 2021
  2. added a commit that references this issue on Apr 12, 2021
  3. dlech commented on Apr 12, 2021

    @dlech
    Member

    Should be fixed in beta 13

  4. dlech commented on Apr 12, 2021

    @dlech
    Member

    There is still the edge case where pressing the hub button during download "cancels" the download and prints ValueError: incompatible .mpy file but the buttons don't get stuck anymore.

  5. laurensvalk commented on Apr 13, 2021

    @laurensvalk
    MemberAuthor

    Should be fixed in beta 13

    Confirmed.

    There is still the edge case where pressing the hub button during download "cancels" the download and prints ValueError: incompatible .mpy file but the buttons don't get stuck anymore.

    Confirmed, and this sounds fine to me.

  6. added theissue type on Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    software: pybricks-codesoftware: pybricks-micropython

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions