discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gworkspace / clang / libobjc2 hang problem


From: Richard Frith-Macdonald
Subject: Re: gworkspace / clang / libobjc2 hang problem
Date: Fri, 26 Dec 2014 11:47:45 +0000

On 25 Dec 2014, at 10:34, Riccardo Mottola <riccardo.mottola@libero.it> wrote:
> 
> Hi David,
> 
> David Chisnall wrote:

>> 2) It is*not*  safe to pass an NSInvocation constructed with 
>> -forwardInvocation: that returns an NSRect between threads.  Doing so will 
>> corrupt the stack in the caller context.  It may work due to timing 
>> sometimes, but it should never be relied upon.  The argframe contains a 
>> pointer to the caller's stack where the result will be written.
> I don't know the whole code here either, but I don't think I am calling 
> between threads here. True that operations have a worker thread, but I should 
> not be calling it.

Well, I looked at the code and it seemed to be that the call to the -winRect 
method is  being sent to a file operation and, presumably, the file operation 
is a proxy to an object in another thread/process.  That seems to match what 
David said.  I wonder if this is an issue with invocations that we could fix 
some way?
Anyway, I tried changing that method from -(NSRect)winRect to 
-(void)getWinRect:(NSRect*)rptr./t 

You could try that out to see if it helps (or revert the change if it doesn't).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]