Skip to content

Crash on startup after upgrade to 2.5.0 #1152

@rhussman

Description

@rhussman

After upgrading to version 2.5.0 my program crashes at startup

_ESP_ERROR_CHECK failed: esp_err_t 0x103 (ESP_ERR_INVALID_STATE) at 0x40095d90
file: ".pio/libdeps/stable/NimBLE-Arduino/src/nimble/porting/npl/freertos/src/npl_os_freertos.c" line 445
func: npl_freertos_callout_init
expression: esp_timer_create(&create_args, &co->handle)

abort() was called at PC 0x40095d93 on core 0_

After reverting to 2.4.0 the problem disappeared.

Environment:

  • PlatformIO 6.1.19
  • ESP32-WROOM-32UE (DfRobot)

The program crashes while trying to create a timer. Probably it's the timer mentioned in the release notes, which has been newly added.

My guess: It's something like an out-of-timer-error. My program uses other libraries, which also need timers (e.g. crankyoldgit/IRremoteESP8266). When NimBLE tries to create the additional timer, there is no one left.
So it's not really a bug, but more a kind of problem with existing code.

I don't know, how severe the problem is, that's addressed by the new timer. My program doesn't use NimbleScan, so it's probably not affected. It would be nice, if the use of this timer could be optional. I can imagine some possible ways:

  • Add an configuration switch to use the old 2.4.0 behaviour.
  • When create_timer fails, do not crash, create a warning and revert to 2.4.0. behaviour.
  • Create the timer only, when NimbleScan is used.

Thanks for your work.

Regards
Rainer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions