This originated from https://issues.apache.org/jira/browse/MNG-7161 and we saw that out of these changes 63bd892#diff-d59db8655d9ae2d11948e2b411c34fc9e8513f29065d82c978d7128dafbe3bafR414-R420 it can happen that the referenced outputstreams can be null and cause a NullPointerException.
This happens when other libraries get a hold of the System.out or System.err and then close the outputstreams before Jansi can close them.
A possible fix would be to check if they have already been disposed and then skip the uninstall() call.