vtkbool crash when execute SetOperModeToDifference

Recently I’ve been using vtkbool to do difference operation of two vtkPolyData. When the program run to CombineRegions() method, it will crash. And I found that the crash happened at Line2894~Line2895 in vtkPolyDataBooleanFilter.cxx file. When the crash happens, the number of ‘regsB->GetNumberOfCells()’ is larger than the number of ‘scalarsB->GetSize()’, so when the iteration variable ‘i’ is larger than the number of ‘scalarsB->GetSize()’, access violation occurs. I tried to change the code to avoid the access violation problem, and the program can run and get the output vtkPolyData, but the result vtkPolyData seems to be the result of Union instead of Difference, and if I use SetOperModeToUnion, the result seems to be the result of Difference, very strange. Can anyone give any help about this problem? I’ve created a repository for my test program and test data used in my code. You can find the repository by the following link - vtkboolTest. Thanks in advance!