Simplified PyQT5 Application Code that causes as segfault when passing functions from JS to python.