Closed xjrsanchezx closed 6 years ago
I've never tried this on a Raspberry pi. That will take time.
It's strange. asl::sleep on non-Windows just calls sleep() or usleep(). May it be that it is calling itself and producing a stack overflow?
What if you change in time.h:73:
inline void sleep(int s)
{
sleep((unsigned)s);
}
to
inline void sleep(int s)
{
::sleep((unsigned)s);
}
so it calls the global unix function. Or to usleep(1000000*s)
.
Thanks! You are right. In fact it only crashes with the int version of the function. Another alternative to fix the problem is calling the version that uses double:
inline void sleep(int s)
{
sleep((double)s);
}
:thumbsup::thumbsup:
I guess this is fixed. Please reopen if needed.
Using Linux raspberrypi 4.14.50+ gcc version 6.3.0 20170516
asl::sleep triggers SEGFAULT