esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

Error since 2024.7.x: api_frame_helper.cpp: In member function 'esphome::api::APIError esphome::api::APINoiseFrameHelper::state_action_()': #6099

Open pos-ei-don opened 1 month ago

pos-ei-don commented 1 month ago

The problem

I could compile it in 2024.6.x, but since i updated to

2024.7.0, i have this error. I already waited for Bugfix version .1 and .2, but the error still exists.

Unfortunately, the error does not point me in any direction where i should start looking.

INFO ESPHome 2024.7.2
INFO Reading configuration /config/esphome/esp1temperaturbatterie.yaml...
INFO Detected timezone 'Europe/Vienna'
INFO Generating C++ source...
INFO Compiling app...
Processing esp1temperaturbatterie (board: nodemcuv2; framework: arduino; platform: platformio/espressif8266@4.2.1)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.4
Compiling .pioenvs/esp1temperaturbatterie/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/esp1temperaturbatterie/src/esphome/components/api/api_frame_helper.cpp.o
during RTL pass: expand
src/esphome/components/api/api_frame_helper.cpp: In member function 'esphome::api::APIError esphome::api::APINoiseFrameHelper::state_action_()':
src/esphome/components/api/api_frame_helper.cpp:276:10: internal compiler error: Illegal instruction
  276 | APIError APINoiseFrameHelper::state_action_() {
      |          ^~~~~~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
*** [.pioenvs/esp1temperaturbatterie/src/esphome/components/api/api_frame_helper.cpp.o] Error 1
during RTL pass: expand
src/esphome/components/api/api_connection.cpp: In member function 'virtual esphome::api::ConnectResponse esphome::api::APIConnection::connect(const esphome::api::ConnectRequest&)':
src/esphome/components/api/api_connection.cpp:1368:17: internal compiler error: Illegal instruction
 1368 | ConnectResponse APIConnection::connect(const ConnectRequest &msg) {
      |                 ^~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
*** [.pioenvs/esp1temperaturbatterie/src/esphome/components/api/api_connection.cpp.o] Error 1
========================== [FAILED] Took 2.89 seconds ==========================

Which version of ESPHome has the issue?

2024.7.2

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.07.03

What platform are you using?

ESP8266

Board

nodemcuv2

Component causing the issue

api_frame_helper.cpp.o

Example YAML snippet

esphome:
  name: nameabc
  friendly_name: nameabc
substitutions:
  mqtt_prefix: external

esp8266:
  board: nodemcuv2
#  framework: Arduino

#  board: esp01_1m
# Enable logging
logger:
#  level: DEBUG #WARN #DEBUG NONE
  esp8266_store_log_strings_in_flash: false

# Enable Home Assistant API
api:
  encryption:
    key: "xxxxxx"
  reboot_timeout: 5 min

ota:
  - platform: esphome  
    password: "xxxxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  reboot_timeout: 5min
  fast_connect: true

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Modbustemperatur"
    password: "....."

  domain: .k1.local

#captive_portal:

# Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: homeassistant_time
 # Text sensors with general information.

text_sensor:
  - platform: template
    name: Uptime Human Readable
    id: uptime_human
    icon: mdi:clock-start

one_wire:
  - platform: gpio
    pin: GPIO5
    id: dallas5

#     #mode:
#     #  input: true
#     #  pullup: true
#     update_interval: 120s 

switch:
  - platform: restart
    name: "Living Room Restart"

#Individual sensors
sensor:
  - platform: dallas_temp
    one_wire_id: dallas5
    address: 0xba041692ad4fff28
    resolution: 10      # 9 to 12
    update_interval: 60s
    name: "ug.batterie.lynx2-main"
    id: lynx2
    unit_of_measurement: "°C"
    icon: "mdi:thermometer-plus"
    device_class: "temperature"
    state_class: "measurement"
    accuracy_decimals: 1
    filters:
      - round: 1
      - delta: 0.2

Anything in the logs that might be useful for us?

-

Additional information

-

jesserockz commented 1 month ago

I am unable to reproduce this on the current dev branch or the release versions.

Have you tried cleaning the build files?

pos-ei-don commented 1 month ago

Yes, I have. I dont think that there is anything special in my Installion, so i have no idea what to do. I thought about downgrading again, but as I am not in a hurry, I waited for 2024.7.2. The Board is still working and sending values with the Version from 2024.6.x,.

I know that 2024.06 worked, becauseI had to migrate the 1wire to the new module, (from Dallas), where I needed to read some docs before I could figure out how to update the code.

pos-ei-don commented 1 month ago

2024.7.3 gives me the same error (afrer a clean). Code Validation says everything is ok. Do you need access to the system?

INFO ESPHome 2024.7.3
INFO Reading configuration /config/esphome/esp1temperaturbatterie.yaml...
INFO Detected timezone 'Europe/Vienna'
INFO Generating C++ source...
INFO Compiling app...
Processing esp1temperaturbatterie (board: nodemcuv2; framework: arduino; platform: platformio/espressif8266@4.2.1)
--------------------------------------------------------------------------------
Library Manager: Installing esphome/noise-c @ 0.1.4
INFO Installing esphome/noise-c @ 0.1.4
Unpacking  [####################################]  100%
Library Manager: noise-c@0.1.4 has been installed!
INFO noise-c@0.1.4 has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
Library Manager: Installing esphome/libsodium @ 1.10018.1
INFO Installing esphome/libsodium @ 1.10018.1
Unpacking  [####################################]  100%
Library Manager: libsodium@1.10018.1 has been installed!
INFO libsodium@1.10018.1 has been installed!
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.4
Compiling .pioenvs/esp1temperaturbatterie/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/esp1temperaturbatterie/src/esphome/components/api/api_frame_helper.cpp.o
during RTL pass: expand
src/esphome/components/api/api_frame_helper.cpp: In member function 'esphome::api::APIError esphome::api::APINoiseFrameHelper::state_action_()':
src/esphome/components/api/api_frame_helper.cpp:276:10: internal compiler error: Illegal instruction
  276 | APIError APINoiseFrameHelper::state_action_() {
      |          ^~~~~~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
*** [.pioenvs/esp1temperaturbatterie/src/esphome/components/api/api_frame_helper.cpp.o] Error 1
during RTL pass: expand
src/esphome/components/api/api_connection.cpp: In member function 'virtual esphome::api::ConnectResponse esphome::api::APIConnection::connect(const esphome::api::ConnectRequest&)':
src/esphome/components/api/api_connection.cpp:1368:17: internal compiler error: Illegal instruction
 1368 | ConnectResponse APIConnection::connect(const ConnectRequest &msg) {
      |                 ^~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
*** [.pioenvs/esp1temperaturbatterie/src/esphome/components/api/api_connection.cpp.o] Error 1
========================== [FAILED] Took 7.04 seconds ==========================
ssieb commented 1 month ago

What are you running HA on?

pos-ei-don commented 1 month ago

HaOS on Proxmox

ssieb commented 1 month ago

This kind of error almost always indicates a system problem. Make sure your system is up-to-date. There's nothing that esphome can do about this.

pos-ei-don commented 1 month ago

I dont think so, my system is almost clean. For Test i downgraded esphome to 2024.6.6 and it worked like a charme. I attached the logs, maybe it helps?!?

esphome2024.6.6.txt

pos-ei-don commented 1 day ago

It seems to work I 2024.8.3, but get an error on a different device now. Will have to debug more.