The cause of that error is that the hp (or mp) gauge is trying to draw itself using a value that isn't a number.
Normally, the gauge rate is calculated by dividing the current hp (or mp) by the maximum, if, however, for some reason, one or both of those numbers is not a number, it causes this error.
The most common reason for this to happen is that something has happened to your hp (or max hp) to cause it to no longer be a number. That happens when you try to perform math functions using a value that also isn't a number. Most times this happens when you try to subtract a value from your hp that isn't a number, via a mal-formed damage calculation, as subtracting 'undefined' from a number gives a result of NaN.
Since you said specifically that it happens when you apply a skill that provides a 5% parameter boost, the issue is most likely that it is calculating that boost incorrectly. Which caused the number it's trying to multiply your HP by to not actually be a number, or be undefined, which causes the hp result afterward to be NaN, causing the gauge to throw this error.
Double check however it is you are changing the parameters using this skill. A state that just adds a flat 5% boost to everything via traits should never be able to cause this problem, so the way you're applying the boost is relevant to the problem.