QANautilusPluggin Logic Question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

QANautilusPluggin Logic Question

stepharo
When I add an iv to Model I get a ByteSymbol>>entity:

QANautilusPluggin>>initialize

     changeHandler := GLMAsyncTask new
         priority: Processor activePriority - 1;
         doInBackground: [ morph entity: self currentEntity ];
         yourself

And in the debugger morph is a a Morph exactly a
QANautilusPluginMorph(493092864)

Yuriy do you use thread?

Stef



Reply | Threaded
Open this post in threaded view
|

Re: QANautilusPluggin Logic Question

Uko2
Wow, this is weird.

Yes, GLMAsyncTask spawns a process. I use it not to block the ui in nautilus while critics are retrieved. So when you switch to a new method it changes plugin’s critic list to “loading progress morph” and runs the task with a lower priority. If in ui you go through methods, it simply reschedules the task to check different critics. When you stop working with UI it calculates the critics and shows them to you.

For me its weird that you get DNU for symbol while `morph` should be a QANautilusPluginMorph. Did I do something very evil not knowing about all the concurrent/morphic black magic?

Uko

> On 28 Aug 2015, at 10:50, stepharo <[hidden email]> wrote:
>
> When I add an iv to Model I get a ByteSymbol>>entity:
>
> QANautilusPluggin>>initialize
>
>    changeHandler := GLMAsyncTask new
>        priority: Processor activePriority - 1;
>        doInBackground: [ morph entity: self currentEntity ];
>        yourself
>
> And in the debugger morph is a a Morph exactly a QANautilusPluginMorph(493092864)
>
> Yuriy do you use thread?
>
> Stef
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: QANautilusPluggin Logic Question

Marcus Denker-4
Maybe related.. there is test failing on the CI server :

ReleaseTests.ReleaseTest.testMethodsWithUnboundGlobals (from ReleaseTests)
Found methods with unbound globals: an OrderedCollection(QANautilusPluginMorph>>#buildConfirmationCheckbox:)



> On 28 Aug 2015, at 11:34, Yuriy Tymchuk <[hidden email]> wrote:
>
>> QANautilusPluggin


Reply | Threaded
Open this post in threaded view
|

Re: QANautilusPluggin Logic Question

Uko2
I will take a look at the issue in the evening. It's related to the latest refactoring but should not be connected to the AsyncTask in any way

Uko

Sent from my iPhone

> On 28 Aug 2015, at 12:52, Marcus Denker <[hidden email]> wrote:
>
> Maybe related.. there is test failing on the CI server :
>
> ReleaseTests.ReleaseTest.testMethodsWithUnboundGlobals (from ReleaseTests)
> Found methods with unbound globals: an OrderedCollection(QANautilusPluginMorph>>#buildConfirmationCheckbox:)
>
>
>
>>> On 28 Aug 2015, at 11:34, Yuriy Tymchuk <[hidden email]> wrote:
>>>
>>> QANautilusPluggin
>
>

Reply | Threaded
Open this post in threaded view
|

Re: QANautilusPluggin Logic Question

Uko2
In reply to this post by stepharo
So the byte symbol comes from the “position” inst var of the superclass. I’m not completely sure how it works on low level, but I guess that because you a a new variable, the others shift and it accesses the value that is actually mapped to another variable. Is it the issue of my implementation? How can I improve it?

Uko

> On 28 Aug 2015, at 10:50, stepharo <[hidden email]> wrote:
>
> When I add an iv to Model I get a ByteSymbol>>entity:
>
> QANautilusPluggin>>initialize
>
>    changeHandler := GLMAsyncTask new
>        priority: Processor activePriority - 1;
>        doInBackground: [ morph entity: self currentEntity ];
>        yourself
>
> And in the debugger morph is a a Morph exactly a QANautilusPluginMorph(493092864)
>
> Yuriy do you use thread?
>
> Stef
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: QANautilusPluggin Logic Question

Marcus Denker-4

> On 30 Aug 2015, at 10:57, Yuriy Tymchuk <[hidden email]> wrote:
>
> So the byte symbol comes from the “position” inst var of the superclass. I’m not completely sure how it works on low level, but I guess that because you a a new variable, the others shift and it accesses the value that is actually mapped to another variable. Is it the issue of my implementation? How can I improve it?
>

The class builder is normally supposed to fix that transparently: You add var, all methods are recompiled and all instances are migrated. There could be bugs there.

> Uko
>
>> On 28 Aug 2015, at 10:50, stepharo <[hidden email]> wrote:
>>
>> When I add an iv to Model I get a ByteSymbol>>entity:
>>
>> QANautilusPluggin>>initialize
>>
>>   changeHandler := GLMAsyncTask new
>>       priority: Processor activePriority - 1;
>>       doInBackground: [ morph entity: self currentEntity ];
>>       yourself
>>
>> And in the debugger morph is a a Morph exactly a QANautilusPluginMorph(493092864)
>>
>> Yuriy do you use thread?
>>
>> Stef
>>
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: QANautilusPluggin Logic Question

stepharo
In reply to this post by Uko2
I just added an instance variable to Model.


Le 28/8/15 11:34, Yuriy Tymchuk a écrit :

> Wow, this is weird.
>
> Yes, GLMAsyncTask spawns a process. I use it not to block the ui in nautilus while critics are retrieved. So when you switch to a new method it changes plugin’s critic list to “loading progress morph” and runs the task with a lower priority. If in ui you go through methods, it simply reschedules the task to check different critics. When you stop working with UI it calculates the critics and shows them to you.
>
> For me its weird that you get DNU for symbol while `morph` should be a QANautilusPluginMorph. Did I do something very evil not knowing about all the concurrent/morphic black magic?
>
> Uko
>
>> On 28 Aug 2015, at 10:50, stepharo <[hidden email]> wrote:
>>
>> When I add an iv to Model I get a ByteSymbol>>entity:
>>
>> QANautilusPluggin>>initialize
>>
>>     changeHandler := GLMAsyncTask new
>>         priority: Processor activePriority - 1;
>>         doInBackground: [ morph entity: self currentEntity ];
>>         yourself
>>
>> And in the debugger morph is a a Morph exactly a QANautilusPluginMorph(493092864)
>>
>> Yuriy do you use thread?
>>
>> Stef
>>
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: QANautilusPluggin Logic Question

stepharo
In reply to this post by Marcus Denker-4
may be code executing the check did not get mutated when the system
changed shape.

Le 30/8/15 11:00, Marcus Denker a écrit :

>> On 30 Aug 2015, at 10:57, Yuriy Tymchuk <[hidden email]> wrote:
>>
>> So the byte symbol comes from the “position” inst var of the superclass. I’m not completely sure how it works on low level, but I guess that because you a a new variable, the others shift and it accesses the value that is actually mapped to another variable. Is it the issue of my implementation? How can I improve it?
>>
> The class builder is normally supposed to fix that transparently: You add var, all methods are recompiled and all instances are migrated. There could be bugs there.
>
>> Uko
>>
>>> On 28 Aug 2015, at 10:50, stepharo <[hidden email]> wrote:
>>>
>>> When I add an iv to Model I get a ByteSymbol>>entity:
>>>
>>> QANautilusPluggin>>initialize
>>>
>>>    changeHandler := GLMAsyncTask new
>>>        priority: Processor activePriority - 1;
>>>        doInBackground: [ morph entity: self currentEntity ];
>>>        yourself
>>>
>>> And in the debugger morph is a a Morph exactly a QANautilusPluginMorph(493092864)
>>>
>>> Yuriy do you use thread?
>>>
>>> Stef
>>>
>>>
>>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: QANautilusPluggin Logic Question

Uko2
Yes, but the situation is weird, because if you look at the variable in the debugger - everything is ok. Is there a way to understand what has not mutated?

Uko


> On 30 Aug 2015, at 13:35, stepharo <[hidden email]> wrote:
>
> may be code executing the check did not get mutated when the system changed shape.
>
> Le 30/8/15 11:00, Marcus Denker a écrit :
>>> On 30 Aug 2015, at 10:57, Yuriy Tymchuk <[hidden email]> wrote:
>>>
>>> So the byte symbol comes from the “position” inst var of the superclass. I’m not completely sure how it works on low level, but I guess that because you a a new variable, the others shift and it accesses the value that is actually mapped to another variable. Is it the issue of my implementation? How can I improve it?
>>>
>> The class builder is normally supposed to fix that transparently: You add var, all methods are recompiled and all instances are migrated. There could be bugs there.
>>
>>> Uko
>>>
>>>> On 28 Aug 2015, at 10:50, stepharo <[hidden email]> wrote:
>>>>
>>>> When I add an iv to Model I get a ByteSymbol>>entity:
>>>>
>>>> QANautilusPluggin>>initialize
>>>>
>>>>   changeHandler := GLMAsyncTask new
>>>>       priority: Processor activePriority - 1;
>>>>       doInBackground: [ morph entity: self currentEntity ];
>>>>       yourself
>>>>
>>>> And in the debugger morph is a a Morph exactly a QANautilusPluginMorph(493092864)
>>>>
>>>> Yuriy do you use thread?
>>>>
>>>> Stef
>>>>
>>>>
>>>>
>>>
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: QANautilusPluggin Logic Question

Marcus Denker-4
Hi,

All methods (and methods of blocks) that are executing already will keep executing the wrong code.

As only offsets change, one could do on-stack replacement of these methods, but nobody has implemented that
yet.

It might be good to have a check that warns when changing layout of classes that are active on the stack….

> On 30 Aug 2015, at 14:49, Yuriy Tymchuk <[hidden email]> wrote:
>
> Yes, but the situation is weird, because if you look at the variable in the debugger - everything is ok. Is there a way to understand what has not mutated?
>
> Uko
>
>
>> On 30 Aug 2015, at 13:35, stepharo <[hidden email]> wrote:
>>
>> may be code executing the check did not get mutated when the system changed shape.
>>
>> Le 30/8/15 11:00, Marcus Denker a écrit :
>>>> On 30 Aug 2015, at 10:57, Yuriy Tymchuk <[hidden email]> wrote:
>>>>
>>>> So the byte symbol comes from the “position” inst var of the superclass. I’m not completely sure how it works on low level, but I guess that because you a a new variable, the others shift and it accesses the value that is actually mapped to another variable. Is it the issue of my implementation? How can I improve it?
>>>>
>>> The class builder is normally supposed to fix that transparently: You add var, all methods are recompiled and all instances are migrated. There could be bugs there.
>>>
>>>> Uko
>>>>
>>>>> On 28 Aug 2015, at 10:50, stepharo <[hidden email]> wrote:
>>>>>
>>>>> When I add an iv to Model I get a ByteSymbol>>entity:
>>>>>
>>>>> QANautilusPluggin>>initialize
>>>>>
>>>>>  changeHandler := GLMAsyncTask new
>>>>>      priority: Processor activePriority - 1;
>>>>>      doInBackground: [ morph entity: self currentEntity ];
>>>>>      yourself
>>>>>
>>>>> And in the debugger morph is a a Morph exactly a QANautilusPluginMorph(493092864)
>>>>>
>>>>> Yuriy do you use thread?
>>>>>
>>>>> Stef
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: QANautilusPluggin Logic Question

stepharo
marcus could you log that issue somewhere because I hope that we will
get a new Phd working update.

Stef

Le 30/8/15 18:29, Marcus Denker a écrit :

> Hi,
>
> All methods (and methods of blocks) that are executing already will keep executing the wrong code.
>
> As only offsets change, one could do on-stack replacement of these methods, but nobody has implemented that
> yet.
>
> It might be good to have a check that warns when changing layout of classes that are active on the stack….
>
>> On 30 Aug 2015, at 14:49, Yuriy Tymchuk <[hidden email]> wrote:
>>
>> Yes, but the situation is weird, because if you look at the variable in the debugger - everything is ok. Is there a way to understand what has not mutated?
>>
>> Uko
>>
>>
>>> On 30 Aug 2015, at 13:35, stepharo <[hidden email]> wrote:
>>>
>>> may be code executing the check did not get mutated when the system changed shape.
>>>
>>> Le 30/8/15 11:00, Marcus Denker a écrit :
>>>>> On 30 Aug 2015, at 10:57, Yuriy Tymchuk <[hidden email]> wrote:
>>>>>
>>>>> So the byte symbol comes from the “position” inst var of the superclass. I’m not completely sure how it works on low level, but I guess that because you a a new variable, the others shift and it accesses the value that is actually mapped to another variable. Is it the issue of my implementation? How can I improve it?
>>>>>
>>>> The class builder is normally supposed to fix that transparently: You add var, all methods are recompiled and all instances are migrated. There could be bugs there.
>>>>
>>>>> Uko
>>>>>
>>>>>> On 28 Aug 2015, at 10:50, stepharo <[hidden email]> wrote:
>>>>>>
>>>>>> When I add an iv to Model I get a ByteSymbol>>entity:
>>>>>>
>>>>>> QANautilusPluggin>>initialize
>>>>>>
>>>>>>   changeHandler := GLMAsyncTask new
>>>>>>       priority: Processor activePriority - 1;
>>>>>>       doInBackground: [ morph entity: self currentEntity ];
>>>>>>       yourself
>>>>>>
>>>>>> And in the debugger morph is a a Morph exactly a QANautilusPluginMorph(493092864)
>>>>>>
>>>>>> Yuriy do you use thread?
>>>>>>
>>>>>> Stef
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>
>>
>
>