Just looking at the code, it appears that this could happen when you try and mine a lab which belongs to a force that I somehow haven't registered. Are you using any other mods? Would you be able to provide a save file in which I can easily reproduce the issue?
Thanks for the tip. I looked at the code for that mod, and it appears it creates all its entities without raise_built. This means that DiscoScience doesn't get any notification of their creation, and makes it much more difficult to track them. I'll raise the issue with the author.
Version 0.0.5 should prevent fatal errors in this sort of situation. This should make it 100% compatible with the Ruins mod, because ruined labs are never researching anything.
However, if other mods which create labs and don't raise a notification, those labs will have no animations with Disco Science.