Skip to content

Bug: If you lower MAX_CONTACTS it will crash on next boot #2266

@petrkr

Description

@petrkr

Priority: do not know? Lower as official firmware probably will NOT lower MAX_CONTACTS too often and "support team" will tell to users "just do full erase".

But just keep this in mind root cause.

Reproduce:

  • compile with MAX_CONTACTS 100
  • wait until its full
  • recompille with some lower number MAX_CONTACTS (90 for example)
  • crash loop

I found from backtrace it is because of _serial object is null during boot process.

Here: https://github.com/meshcore-dev/MeshCore/blob/main/examples/companion_radio/MyMesh.cpp#L327

It is because order of called initialization is reversed.. First is called the_mesh.begin()

and later is called
the_mesh.startInterface(serial_interface);

which will actually set that interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions