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

Crash when loading UI when sendUpdate is part of a task #151

Open
skarfacegc opened this issue Mar 4, 2023 · 6 comments
Open

Crash when loading UI when sendUpdate is part of a task #151

skarfacegc opened this issue Mar 4, 2023 · 6 comments

Comments

@skarfacegc
Copy link

I have a task that handles gathering the data that I want to show on the dashboard. Whenever I call sendUpdate I get a LoadProhibited error. Any idea where I should be looking?

SDK 4.43
ESP32
using platformio with everything updated (not sure it's actually current versions of everything)

@skarfacegc
Copy link
Author

moving sendUpdate out of my task and into the main loop seems to have worked, just needed to add a vTaskDelay to the main loop. If I had passed dashboard into the task via params, would that have worked as well?

@skarfacegc skarfacegc reopened this Mar 7, 2023
@skarfacegc
Copy link
Author

skarfacegc commented Mar 7, 2023

So, there's definitely something going on here. When I move send update into the task that is issuing the card.update I start to get crashes immediately after the dashboard loads. Looks like it crashes on the first post load sendUpdate?

Moving sendupdate from main loop to this line breaks things.
https://github.com/skarfacegc/Probeinator/blob/b6d99cec3c06d846e662dd320c99dc3e1c1467a0/src/main.cpp#L189

This seems to be working fine when I put sendUpdate in the main loop.
Crashes look like what I pasted below. Done a ton of dev in my life, very little C. This may come down to I don't understand scoping well enough, but I /think/ I've dug through most of that.

Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x4010cf3b  PS      : 0x00060834  A0      : 0x8010bee6  A1      : 0x3ffd3b10  
A2      : 0x3ffc5e20  A3      : 0x00000000  A4      : 0x0000ffff  A5      : 0x00000000  
A6      : 0x3f41bf50  A7      : 0x00000070  A8      : 0x00000002  A9      : 0x3ffd3a80  
A10     : 0x00000374  A11     : 0x9ad29925  A12     : 0x9ad29925  A13     : 0x3ffc5e78  
A14     : 0x00000354  A15     : 0x00000004  SAR     : 0x00000000  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00010047  LBEG    : 0x40089678  LEND    : 0x4008968e  LCOUNT  : 0xffffffff 

@skarfacegc
Copy link
Author

sorry. I suck at github.

@skarfacegc skarfacegc changed the title sendUpdate between tasks? Crash when loading UI when sendUpdate is part of a task Mar 7, 2023
@skarfacegc
Copy link
Author

Trying this again.

@skarfacegc skarfacegc reopened this Mar 7, 2023
@ayushsharma82
Copy link
Owner

Hi @skarfacegc,

Internally the sendUpdate function broadcasts data ( more than 10KB depending on how much cards you have on dashboard ) to all websocket clients. You may have low memory allocated for that particular task which causes the ESP to crash.

You can try increasing this value to something like 10240: https://github.com/skarfacegc/Probeinator/blob/b6d99cec3c06d846e662dd320c99dc3e1c1467a0/src/main.cpp#L225

Copy link

stale bot commented Feb 11, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you are still facing the problem, please tag the author of repository and state your concern.

@stale stale bot added the wontfix label Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants