I have programmed an application using PySide2 with some 800 lines of code and now when I want to show a variable in the progress bar it crashes after a short while without any
Try using QThreads instead of regular threads. They work in a very similar fashion, but they provide thread safe invoke to the UI thread.
Example