guru meditation error

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

Re: guru meditation error

Postby burkulesomesh43 » Thu Dec 27, 2018 2:04 pm

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.
--
Somesh Burkule

fivdiAtESP32
Posts: 47
Joined: Thu Dec 20, 2018 9:47 am

Re: guru meditation error

Postby fivdiAtESP32 » 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.

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

Re: guru meditation error

Postby burkulesomesh43 » 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
--
Somesh Burkule

fivdiAtESP32
Posts: 47
Joined: Thu Dec 20, 2018 9:47 am

Re: guru meditation error

Postby fivdiAtESP32 » 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.
...

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

Re: guru meditation error

Postby burkulesomesh43 » Thu Dec 27, 2018 4:38 pm

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 ",".
--
Somesh Burkule

fivdiAtESP32
Posts: 47
Joined: Thu Dec 20, 2018 9:47 am

Re: guru meditation error

Postby fivdiAtESP32 » 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.

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

Re: guru meditation error

Postby burkulesomesh43 » Fri Dec 28, 2018 5:40 am

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 ",".
--
Somesh Burkule

fivdiAtESP32
Posts: 47
Joined: Thu Dec 20, 2018 9:47 am

Re: guru meditation error

Postby fivdiAtESP32 » 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".

burkulesomesh43
Posts: 132
Joined: Tue Aug 14, 2018 6:21 am
Location: India

Re: guru meditation error

Postby burkulesomesh43 » Tue Jun 11, 2019 10:50 am

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.
--
Somesh Burkule

Who is online

Users browsing this forum: Baidu [Spider] and 153 guests