This is related to this post: https://www.klayout.de/forum/discussion/1406/drc-input-output#latest
When running the sample given in the post from 2020-01-09, a crash happens and strange error messages are generated.
The reason are invalid layer indexes which trigger strange behaviours in "Layout#get_info" (BTW: should not segfault). The main reason is that the list of output layers is not cleared in the DRCEngine's "_finish" function.