fix #3699 (try fix a frequent stacktrace failure on windows)