Search found 402 matches

by mzimmers
Fri Jul 27, 2018 3:26 pm
Forum: General Discussion
Topic: am I running out of heap?
Replies: 20
Views: 4353

Re: am I running out of heap?

I finally found the problem. I was mis-setting a queue entry size. m_queueScanDone = xQueueCreate(10, sizeof (system_event_t *)); was incorrectly coded as: m_queueScanDone = xQueueCreate(10, sizeof (system_event_t)); I'm not sure precisely how this caused the problem, but I believe that when an entr...
by mzimmers
Thu Jul 26, 2018 6:51 pm
Forum: General Discussion
Topic: am I running out of heap?
Replies: 20
Views: 4353

Re: am I running out of heap?

What big parameters are you referring to? One is a pointer; the other a reference (which I believe is handed like a pointer under the skin). The first parameter is a dereferenced pointer, which means you are putting a copy of the data structure on the stack. And you have a local var on the stack th...
by mzimmers
Thu Jul 26, 2018 5:54 pm
Forum: General Discussion
Topic: am I running out of heap?
Replies: 20
Views: 4353

Re: am I running out of heap?

I was thinking of commenting on the wisdom (or lack of) wrt putting big parameters on the stack, but he wasn't reporting a stack overflow error. Not sure if it's possible to overflow the stack and it show up as heap corruption. John A What big parameters are you referring to? One is a pointer; the ...
by mzimmers
Thu Jul 26, 2018 5:52 pm
Forum: General Discussion
Topic: am I running out of heap?
Replies: 20
Views: 4353

Re: am I running out of heap?

Before I began looking at heap problems, I experimented with doubling the task's stack size...no difference.
by mzimmers
Thu Jul 26, 2018 3:54 pm
Forum: General Discussion
Topic: am I running out of heap?
Replies: 20
Views: 4353

Re: am I running out of heap?

Thanks Angus. I followed your instructions regarding git, and it looks like I'm OK with my IDF. I used the heap checker to isolate the problem to a string assignment. Here's a code fragment; the offending line is noted near the end: void Worker::worker_task(TaskParams *params) { Message *msgOut; sys...
by mzimmers
Thu Jul 26, 2018 2:30 am
Forum: General Discussion
Topic: am I running out of heap?
Replies: 20
Views: 4353

Re: am I running out of heap?

Hi Angus - yeah, I think that's a given. I'll need to learn more about the various tools available for hunting this down, but two things make me wonder: 1. I recently moved to v3.2 of the IDF. I'm not sure I did this entirely correctly. First I tried doing an unzip, but somewhere along the line I go...
by mzimmers
Wed Jul 25, 2018 10:19 pm
Forum: General Discussion
Topic: am I running out of heap?
Replies: 20
Views: 4353

Re: am I running out of heap?

Actually, this topic still has some life left in it. On a lark, I decided to use the heap test that fly gave me. Got this: CORRUPT HEAP: Block 0x3a313638 is before prev block 0x3ffd4c48 So...I'm now in an area about which I know very little. Does heap corruption occur because of application-space pr...
by mzimmers
Wed Jul 25, 2018 10:07 pm
Forum: General Discussion
Topic: am I running out of heap?
Replies: 20
Views: 4353

Re: am I running out of heap?

Yeah, I've decided that this problem is almost definitely NOT caused by running out of memory. Thanks for the pointers, fly. I'm going to abandon this topic and start one with a refocused subject.
by mzimmers
Wed Jul 25, 2018 9:16 pm
Forum: General Discussion
Topic: am I running out of heap?
Replies: 20
Views: 4353

Re: am I running out of heap?

I made this call: uint freeRAM = heap_caps_get_free_size(MALLOC_CAP_INTERNAL); ESP_LOGI(TAG, "free RAM is %d.", freeRAM); very near the point of the crash; it said I have over 229K remaining. So, I guess this probably isn't a memory shortage after all, unless there's some artificial limit imposed on...
by mzimmers
Wed Jul 25, 2018 8:45 pm
Forum: General Discussion
Topic: am I running out of heap?
Replies: 20
Views: 4353

Re: am I running out of heap?

So, do you agree that it seems like I'm running out of memory?

Bluetooth isn't enabled in my make sdkconfig file. Is calling this routine really going to help in this case?

If I do call esp_bt_controller_mem_release(ESP_BT_MODE_BTDM), do I need to call esp_bt_controller_deinit() first?

Thanks...

Go to advanced search