I am using QGIS 2.18.13 on Windows. I have imported some shapes from KML, and saved them to ESRI shapefiles layers. I have tried to perform Vector > Geoprocessing Tools > Difference on some of the layers, but the results are either empty (if I check 'Ignore invalid input features') or an '1006 See log for more details' error. When I View > Panels > Log Messages Panel, I see an 'Uncaught error while executing algorithm' error in some .py Python routines.
The shapes I am working with have the same CRS. When I try to run 'Check validity' on the shapes, I get this error: '-2147483645 See log for more details' and again the log shows an 'Uncaught error while executing algorithm' error.
How can I make these into valid shapes that I can work with an manipulate in QGIS?