[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GWorkspace file operation pause/stop problems
From: |
Wolfgang Lux |
Subject: |
Re: GWorkspace file operation pause/stop problems |
Date: |
Sun, 3 Aug 2014 17:11:56 +0200 |
Hi Riccardo,
> Wolfgang Lux wrote:
>> Did you check the value of executor? Is it a valid object at all or does the
>> thread perhaps crash inside the NSLog?
> I can't trap an exception and I hoped to print out something useful. How
> would you know if it is valid?
>
> I can't "p executor" inside gdb.
>
>
> (gdb) p executor
> No symbol "executor" in current context.
>
> I tried this:
>
> (gdb) p self->executor
> $1 = 0x283429a0
> (gdb) po self->executor
> FileOpInfo
>
> which doesn't make sense, it should be a FileOpExecutor or am I
> misinterpreting something?
I finally got around to upgrade my GNUstep tree and was able to reproduce your
problem.
Looking at the code, then, the problem is fairly obvious: When you click the
pause button for the first time, the paused flag is set to YES and once the
FileExecutorObject notices that the flag is set it exits the loop in
do{Move,Copy,Link,Remove,Duplicate,Trash}. This also means that the secondary
thread that was started to perform the operation in the FileOpExecutor
+setPorts: will terminate and the executor object will be released and probably
the connection to that object is closed as well. So it looks like the executor
attribute in the FileOpInfo class is no longer connected to a valid object that
could resume the file operation when you click the pause button again.
Wolfgang
- Re: GWorkspace file operation pause/stop problems,
Wolfgang Lux <=