Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The program crashes for an unknown reason. Suspect: esp_timer_impl_lac.c (IDFGH-14284) #15077

Closed
3 tasks done
xixxi opened this issue Dec 22, 2024 · 3 comments
Closed
3 tasks done
Assignees
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@xixxi
Copy link

xixxi commented Dec 22, 2024

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

ESP-IDF v5.3.1-dirty

Espressif SoC revision.

ESP32 chip revision: v1.0

Operating System used.

Windows

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

CMD

Development Kit.

Custom Board

Power Supply used.

External 5V

What is the expected behavior?

Particle system run as usual...

What is the actual behavior?

after half second crash

Steps to reproduce.

run program.
click 3 times.
particle system run.
some particles emitted.
Crash.

Debug Logs.

load:0x40080404,len:4060                                                                                                                                                                                                                   entry 0x400806b8                                                                                                                                                                                                                           I (30) boot: ESP-IDF v5.3.1-dirty 2nd stage bootloader                                                                                                                                                                                     I (30) boot: compile time Dec 22 2024 08:28:07                                                                                                                                                                                             I (30) boot: Multicore bootloader                                                                                                                                                                                                          I (35) boot: chip revision: v1.0                                                                                                                                                                                                           I (39) boot.esp32: SPI Speed      : 40MHz                                                                                                                                                                                                  I (44) boot.esp32: SPI Mode       : DIO                                                                                                                                                                                                    I (48) boot.esp32: SPI Flash Size : 4MB                                                                                                                                                                                                    I (53) boot: Enabling RNG early entropy source...                                                                                                                                                                                          I (58) boot: Partition Table:                                                                                                                                                                                                              I (62) boot: ## Label            Usage          Type ST Offset   Length                                                                                                                                                                    I (69) boot:  0 nvs              WiFi data        01 02 0000a000 00006000                                                                                                                                                                  I (76) boot:  1 phy_init         RF data          01 01 00010000 00001000                                                                                                                                                                  I (84) boot:  2 factory          factory app      00 00 00020000 00200000                                                                                                                                                                  I (91) boot:  3 storage          Unknown data     01 82 00220000 00100000                                                                                                                                                                  I (99) boot: End of partition table                                                                                                                                                                                                        I (103) esp_image: segment 0: paddr=00020020 vaddr=3f400020 size=3715ch (225628) map                                                                                                                                                       I (168) esp_image: segment 1: paddr=00057184 vaddr=3ffb0000 size=03f90h ( 16272) load                                                                                                                                                      I (173) esp_image: segment 2: paddr=0005b11c vaddr=40080000 size=04efch ( 20220) load                                                                                                                                                      I (180) esp_image: segment 3: paddr=00060020 vaddr=400d0020 size=c676ch (812908) map                                                                                                                                                       I (385) esp_image: segment 4: paddr=00126794 vaddr=40084efc size=11c20h ( 72736) load                                                                                                                                                      I (418) boot: Loaded app from partition at offset 0x20000                                                                                                                                                                                  I (418) boot: Disabling RNG early entropy source...                                                                                                                                                                                        I (430) cpu_start: Multicore app                                                                                                                                                                                                           I (438) cpu_start: Pro cpu start user code                                                                                                                                                                                                 I (438) cpu_start: cpu freq: 240000000 Hz                                                                                                                                                                                                  I (438) app_init: Application information:                                                                                                                                                                                                 I (441) app_init: Project name:     PromoDisplayPrj                                                                                                                                                                                        I (447) app_init: App version:      1                                                                                                                                                                                                      I (451) app_init: Compile time:     Dec 22 2024 08:27:58                                                                                                                                                                                   I (457) app_init: ELF file SHA256:  a55b8d066251da6c...                                                                                                                                                                                    I (463) app_init: ESP-IDF:          v5.3.1-dirty                                                                                                                                                                                           I (468) efuse_init: Min chip rev:     v1.0                                                                                                                                                                                                 I (473) efuse_init: Max chip rev:     v3.99                                                                                                                                                                                                I (478) efuse_init: Chip rev:         v1.0                                                                                                                                                                                                 I (483) heap_init: Initializing. RAM available for dynamic allocation:                                                                                                                                                                     I (490) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM                                                                                                                                                                                  I (496) heap_init: At 3FFBB9D0 len 00024630 (145 KiB): DRAM                                                                                                                                                                                I (502) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM                                                                                                                                                                               I (509) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM                                                                                                                                                                              I (515) heap_init: At 40096B1C len 000094E4 (37 KiB): IRAM                                                                                                                                                                                 I (523) spi_flash: detected chip: generic                                                                                                                                                                                                  I (526) spi_flash: flash io: dio                                                                                                                                                                                                           I (533) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0                                                                                                                                               I (539) : EventPool Constructor. numOfLayer = 1                                                                                                                                                                                            I (544) StateManager: Reset all settings done.                                                                                                                                                                                             I (550) main_task: Started on CPU0                                                                                                                                                                                                         I (560) main_task: Calling app_main()                                                                                                                                                                                                      I (560) app_main() : : PromoDisplay by -=Diyarov.Denis=- 2024. @mexito                                                                                                                                                                     I (580) >>> nvs_init(): : NVS partition inited ok.                                                                                                                                                                                         I (630) spiffs_init_f(): : Mount: ok.                                                                                                                                                                                                              Partition size: total: 956561, used: 542662. (percentage: 56.730515)                                                                                                                                                               This is esp32 chip with 2 CPU core(s), WiFi/BT/BLE, silicon revision v1.0, I (640) displayTask: ====================================================================================                                                       I (640) MEM INFO: : smallest amount of stack mem for DisplayTask = 11744                                                                                                                                                                   I (650) displayTask: ========================[ D E B U G........B U I L D ]==============================                                                                                                                                  I (650) MEM INFO: : free: 207844, minFree: 207844                                                                                                                                                                                          I (660) displayTask: ====================================================================================                                                                                                                                  I (680) leddisplay: (64 * 1)x32 (8bits)                                                                                                                                                                                                    I (680) leddisplay: frame buffers: size=32768 (available total=207640, largest=110592)                                                                                                                                                     I (700) leddisplay: init done                                                                                                                                                                                                              I (700) HUB75Display::: leddisplay driver init OK. 8-)                                                                                                                                                                                     I (1410) MainScene: clicks = -1                                                                                                                                                                                                            I (1670) MEM INFO: : smallest amount of stack mem for DisplayTask = 11688                                                                                                                                                                  I (1670) MEM INFO: : free: 121124, minFree: 121092                                                                                                                                                                                         I (2670) MEM INFO: : smallest amount of stack mem for DisplayTask = 11688                                                                                                                                                                  I (2670) MEM INFO: : free: 121124, minFree: 121092                                                                                                                                                                                         I (2910) MainScene: clicks = 3                                                                                                                                                                                                             I (3670) MEM INFO: : smallest amount of stack mem for DisplayTask = 11688                                                                                                                                                                  I (3670) MEM INFO: : free: 118924, minFree: 118924                                                                                                                                                                                         I (4670) MEM INFO: : smallest amount of stack mem for DisplayTask = 11688                                                                                                                                                                  I (4670) MEM INFO: : free: 118484, minFree: 118308                                                                                                                                                                                         Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.                                                                                                                                                                                                                                                                                                                                                                                                    Core  1 register dump:                                                                                                                                                                                                                     PC      : 0x400da48b  PS      : 0x00060830  A0      : 0x800dc769  A1      : 0x3ffcc2a0                                                                                                                                                     0x400da48b: ParticleEmitter::emit(long) at C:/MyDevEnv/Projs/PromoDisplay/CodeESP32/components/particles/src/ParticleEmitter.hpp:856                                                                                                                                                                                                                                                                                                                                                  A2      : 0xfffda810  A3      : 0x00000013  A4      : 0x3ffb5fa0  A5      : 0x00000000                                                                                                                                                     A6      : 0x3ffb60b0  A7      : 0x3ffdb910  A8      : 0xfa000000  A9      : 0x00000000                                                                                                                                                     A10     : 0x2b400000  A11     : 0x00000000  A12     : 0x11c40000  A13     : 0x3ffda81c                                                                                                                                                     A14     : 0x3ffda828  A15     : 0x3ffdb970  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c                                                                                                                                                     EXCVADDR: 0xfffda894  LBEG    : 0x40082dc1  LEND    : 0x40082dc9  LCOUNT  : 0x00000027                                                                                                                                                     0x40082dc1: esp_timer_impl_get_counter_reg at C:/Espressif_v5/frameworks/esp-idf-v5.3.1/components/esp_timer/src/esp_timer_impl_lac.c:119                                                                                                  0x40082dc9: esp_timer_impl_get_counter_reg at C:/Espressif_v5/frameworks/esp-idf-v5.3.1/components/esp_timer/src/esp_timer_impl_lac.c:129                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Backtrace: 0x400da488:0x3ffcc2a0 0x400dc766:0x3ffcc330                                                                                                                                                                                     0x400da488: ParticleEmitter::emit(long) at C:/MyDevEnv/Projs/PromoDisplay/CodeESP32/components/particles/src/ParticleEmitter.hpp:853                                                                                                       0x400dc766: ParticleSystem::run(long) at C:/MyDevEnv/Projs/PromoDisplay/CodeESP32/components/particles/src/ParticleSystem.hpp:144                                                                                                           (inlined by) displayTask(void*) at C:/MyDevEnv/Projs/PromoDisplay/CodeESP32/main/display/displayTask.cpp:2925

More Information.

There is plenty of memory, and the same code runs perfectly on a PC. During execution, no specific calls are made except for rendering on HUB75.

@xixxi xixxi added the Type: Bug bugs in IDF label Dec 22, 2024
@github-actions github-actions bot changed the title The program crashes for an unknown reason. Suspect: esp_timer_impl_lac.c The program crashes for an unknown reason. Suspect: esp_timer_impl_lac.c (IDFGH-14284) Dec 22, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 22, 2024
@ESP-Marius
Copy link
Collaborator

Crash seems to be coming from 0x400da488: ParticleEmitter::emit(long) at C:/MyDevEnv/Projs/PromoDisplay/CodeESP32/components/particles/src/ParticleEmitter.hpp:853 accessing an invalid address 0xfffda894.

Does not seem related to esp_timer_impl_lac from what I can see

@xixxi
Copy link
Author

xixxi commented Dec 23, 2024

Crash seems to be coming from 0x400da488: ParticleEmitter::emit(long) at C:/MyDevEnv/Projs/PromoDisplay/CodeESP32/components/particles/src/ParticleEmitter.hpp:853 accessing an invalid address 0xfffda894.

Does not seem related to esp_timer_impl_lac from what I can see

I think I found the problem. It's stack and heap overlap.

@ESP-Marius
Copy link
Collaborator

Marking this as closed then as it seems to be not an issue with esp-idf.

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Opened Issue is new labels Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

3 participants