Bad head mask reconstruction and error messages when adjusting erode or fill hole factor

I have never encountered this error, and I'm not sure I understand where it comes from from the error message. I would need to reproduce the error on my computer to be able to fix it.

Could you please share an example MRI file (via private message), together with the parameters you used to reproduce this error?

Thanks