Hi @Ren-Hsien_Hsu welcome to the forum!
The first error is actually a bit weird, since we attach it to the finished signal, it should be receiving the exit status, see QProcess Class | Qt Core 5.15.3
First, does your
done method have the first
self parameter? Since it’s an object method, it needs this to receive the object.
def done(self, job_id, exit_code, exit_status):
Task/worker complete. Remove it from the active workers
dictionary. We leave it in worker_state, as this is used to
to display past/complete workers too.
If it does then we’ve got something weird going on. I’d try creating another method on your class…
def dump(self, *args):
…to print out everything that is being sent to the done method. You can then hook it up e.g.
(remove the connection to
self.done temporarily or it might crash before we see the print. When run there should be 3 variables, the
job_id, the exit code, and exit status. Can you post here what you see – and also any changes to the code – should be possible to debug what’s going on from that.
The segmentation fault is even weirder, perhaps you’re ending up with a reference to a destroyed object in your job table (job_id is pointing to something it shouldn’t be).