Page 2 of 2

Re: guru meditation error

Posted: Thu Dec 27, 2018 2:04 pm
by burkulesomesh43
fivdiAtESP32 wrote:
Thu Dec 27, 2018 2:00 pm
Try with an even bigger number, maybe 10000.
So if we use bigger value is it affects stack issue.
bacause I am using 7 to 8 tasks may it affects on other tasks.

Re: guru meditation error

Posted: Thu Dec 27, 2018 2:12 pm
by fivdiAtESP32
It will only change the main task stack size.
When the other 7 or 8 tasks are created the stack size is specified directly in the call to create those tasks.
Maybe the issue is being caused because the stacks for the other tasks are not big enough.

Re: guru meditation error

Posted: Thu Dec 27, 2018 3:00 pm
by burkulesomesh43
fivdiAtESP32 wrote:
Thu Dec 27, 2018 2:12 pm
It will only change the main task stack size.
When the other 7 or 8 tasks are created the stack size is specified directly in the call to create those tasks.
Maybe the issue is being caused because the stacks for the other tasks are not big enough.
If stack size is less then esp gives "stack overflow" error. but it is not giving that one

Re: guru meditation error

Posted: Thu Dec 27, 2018 3:17 pm
by fivdiAtESP32
burkulesomesh43 wrote:
Thu Dec 27, 2018 3:00 pm
fivdiAtESP32 wrote:
Thu Dec 27, 2018 2:12 pm
It will only change the main task stack size.
When the other 7 or 8 tasks are created the stack size is specified directly in the call to create those tasks.
Maybe the issue is being caused because the stacks for the other tasks are not big enough.
If stack size is less then esp gives "stack overflow" error. but it is not giving that one

Sometime it will display a stack overflow error but sometimes it won't. For example, the code posted above results in the stack overflowing. However, the error message doesn't indicate that there is a stack overflow. It says:

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

Re: guru meditation error

Posted: Thu Dec 27, 2018 4:38 pm
by burkulesomesh43
fivdiAtESP32 wrote:
Thu Dec 27, 2018 3:17 pm
burkulesomesh43 wrote:
Thu Dec 27, 2018 3:00 pm
fivdiAtESP32 wrote:
Thu Dec 27, 2018 2:12 pm
It will only change the main task stack size.
When the other 7 or 8 tasks are created the stack size is specified directly in the call to create those tasks.
Maybe the issue is being caused because the stacks for the other tasks are not big enough.
If stack size is less then esp gives "stack overflow" error. but it is not giving that one

Sometime it will display a stack overflow error but sometimes it won't. For example, the code posted above results in the stack overflowing. However, the error message doesn't indicate that there is a stack overflow. It says:

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
...
Hey,
I debugged my code.
I am using function extract_between() to find out string between two different strings in my task as follows.

Code: Select all

void extract_between(const char *str, char saveStr[] , const char *p1, const char *p2)
{

const char *i1 = strstr(str, p1);
if(i1 != NULL)
{
  const size_t pl1 = strlen(p1);
  const char *i2 = strstr(i1 + pl1, p2);
  if(p2 != NULL)
  {
    const size_t mlen = i2 - (i1 + pl1);
    memcpy(saveStr, i1 + pl1, mlen);
    saveStr[mlen] = '\0';
  }
}
else {

   saveStr[0] = '0';
   saveStr[1] = '\0';
}
}
Am calling it like
extract_between("abcdefg,XY",Output,",",","); -->>> it gives error(Guru meditation error..)
extract_between("abcdefg,XY",Output,"a",","); --->> it gives "bcdefg"
extract_between("abcdefg,XY",Output,"#",","); --->> it gives "0"

don't know why it could notgives out "0" with ",".

Re: guru meditation error

Posted: Thu Dec 27, 2018 6:54 pm
by fivdiAtESP32
It looks like there's a typo.

Replace:

Code: Select all

  if(p2 != NULL)
with:

Code: Select all

  if(i2 != NULL)
to see if it works.

Re: guru meditation error

Posted: Fri Dec 28, 2018 5:40 am
by burkulesomesh43
fivdiAtESP32 wrote:
Thu Dec 27, 2018 6:54 pm
It looks like there's a typo.

Replace:

Code: Select all

  if(p2 != NULL)
with:

Code: Select all

  if(i2 != NULL)
to see if it works.
it returns NULL not "0".
I am not getting why it is not giving output for only ",".

Re: guru meditation error

Posted: Fri Dec 28, 2018 8:17 am
by fivdiAtESP32
Did you make the change that was suggested here to your code? I'm fairly sure that if this change is made there will be no "guru meditation errors".

Re: guru meditation error

Posted: Tue Jun 11, 2019 10:50 am
by burkulesomesh43
fivdiAtESP32 wrote:
Fri Dec 28, 2018 8:17 am
Did you make the change that was suggested here to your code? I'm fairly sure that if this change is made there will be no "guru meditation errors".
It works,
thanks.