Skip to content

starting REPL crashes Prime hub when no user program/bad data present in flash memory #744

Closed

Description

@dlech

Bummer... spoke too soon. Now the Bluetooth connects but the hub seems to crash and reset when I try to open up the interactive Python session.

The REPL issue is also being worked on in #741.

REPL shouldn't currently crash, so feel free to open an issue if that persists.

Originally posted by @laurensvalk in #740 (comment)

Activity

  1. dlech commented on Oct 20, 2022

    @dlech
    MemberAuthor

    I was able to reproduce this as well.

  2. added
    hub: primehub/inventorhub
    software: pybricks-micropython
    on Oct 20, 2022
  3. laurensvalk commented on Oct 20, 2022

    @laurensvalk
    Member

    Possibly relevant: It's also worth doing some checks with the data area erased (using the official firmware).

    And/or a previous Pybricks firmware with a different persistent code layout.

  4. dlech commented on Oct 20, 2022

    @dlech
    MemberAuthor

    Confirmed that running a user program with the ▶️ button then trying the REPL again fixes the problem.

  5. laurensvalk commented on Oct 21, 2022

    @laurensvalk
    Member

    It would be good to review this carefully, also in situations where power is lost while loading a large program, after the write flag is already set due to another program having just run.

    Maybe it is all already taken care of; I just haven't double-checked this after the recent revisions to download-and-run.

  6. laurensvalk commented on Nov 22, 2022

    @laurensvalk
    Member

    We also need to check that you can't accidentally erase half of your user program when entering bootloader mode.

    This doesn't seem to be happening on Move Hub. Still need to try City Hub, Technic Hub.

  7. changed the title [-]starting REPL crashes Prime hub[/-] [+]starting REPL crashes Prime hub when no user program/bad data present in flash memory[/+] on Feb 17, 2023
  8. laurensvalk commented on Mar 11, 2024

    @laurensvalk
    Member

    This doesn't seem to be happening on Move Hub. Still need to try City Hub, Technic Hub.

    Entering bootloader does not erase flash, so there is nothing left to be done here. Closing.

  9. added theissue type on Aug 5, 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

    hub: primehub/inventorhubsoftware: pybricks-micropython

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions