Spotter changes broke CodePanel

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

Spotter changes broke CodePanel

Stephan Eggermont-3
I used to do

CodePanel class>>spot
   GTSpotterMorph new
     extent: (World width / 3.25 @ (World height / 2.25)) asIntegerPoint;
     spotterModel: ((GTSpotter new)
     processorsFilter: (CodePanelProcessorFilter new
       configuredWith: [ :aProcessor | aProcessor
         actLogic: [ :aMethod :step |
           step exit.
           aMethod ifNil: [ self new openInWindowLabeled: 'Code panel'  ]
             ifNotNil: [ |panel|
               panel := self new.
               panel openInWindowLabeled: 'Code panel'.
               panel newCardFor: aMethod.]];
         candidatesLimit: 50 ]));
     openCenteredInWorld

That now (since at least 50596) an interesting Brick error.
Do I need to change my code?

Stephan



PharoDebug.log (18K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Tudor Girba-2
Hi,

Could you provide a fully loadable sample to look at this?

Cheers,
Doru


> On Feb 24, 2016, at 11:52 AM, Stephan Eggermont <[hidden email]> wrote:
>
> I used to do
>
> CodePanel class>>spot
>  GTSpotterMorph new
>    extent: (World width / 3.25 @ (World height / 2.25)) asIntegerPoint;
>    spotterModel: ((GTSpotter new)
>    processorsFilter: (CodePanelProcessorFilter new
>      configuredWith: [ :aProcessor | aProcessor
>        actLogic: [ :aMethod :step |
>          step exit.
>          aMethod ifNil: [ self new openInWindowLabeled: 'Code panel'  ]
>            ifNotNil: [ |panel|
>              panel := self new.
>              panel openInWindowLabeled: 'Code panel'.
>              panel newCardFor: aMethod.]];
>        candidatesLimit: 50 ]));
>    openCenteredInWorld
>
> That now (since at least 50596) an interesting Brick error.
> Do I need to change my code?
>
> Stephan
>
>
> <PharoDebug.log>

--
www.tudorgirba.com
www.feenk.com

"Being happy is a matter of choice."





Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Stephan Eggermont-3
On 24-02-16 19:37, Tudor Girba wrote:
> Hi,
>
> Could you provide a fully loadable sample to look at this?

Just load NewUI from the configuration browser.

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Tudor Girba-2
Hi,

I took a brief look. It looks like a strange problem. If I add the wantsToDisplayOnEmptyQuery to false, it seems to work, but I do not understand the real problem. At least not yet. Could you live with it for now?


GTSpotterMorph new
extent: (World width / 3.25 @ (World height / 2.25)) asIntegerPoint;
spotterModel: ((GTSpotter new)
processorsFilter: (CodePanelProcessorFilter new 
configuredWith: [ :aProcessor | aProcessor
actLogic: [ :aMethod :step | 
step exit.
aMethod ifNil: [ self new openInWindowLabeled: 'Code panel'  ]
ifNotNil: [
|panel|
panel := self new.
panel openInWindowLabeled: 'Code panel'.
panel newCardFor: aMethod.]];
candidatesLimit: 50;
wantsToDisplayOnEmptyQuery: false ]));
openCenteredInWorld

Cheers,
Doru

On Feb 24, 2016, at 7:46 PM, Stephan Eggermont <[hidden email]> wrote:

On 24-02-16 19:37, Tudor Girba wrote:
Hi,

Could you provide a fully loadable sample to look at this?

Just load NewUI from the configuration browser.

Stephan




--
www.tudorgirba.com
www.feenk.com

"Quality cannot be an afterthought."

Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Stephan Eggermont-3
On 24/02/16 20:14, Tudor Girba wrote:
> I took a brief look. It looks like a strange problem. If I add the
> wantsToDisplayOnEmptyQuery to false, it seems to work, but I do not
> understand the real problem. At least not yet. Could you live with it
> for now?

I'll take a better look tomorrow. Thanks for looking into it.

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Stephan Eggermont-3
In reply to this post by Tudor Girba-2
On 24-02-16 20:14, Tudor Girba wrote:
> Hi,
>
> I took a brief look. It looks like a strange problem. If I add the
> wantsToDisplayOnEmptyQuery to false, it seems to work, but I do not
> understand the real problem. At least not yet. Could you live with it
> for now?

On my machine it doesn't seem to change anything in 50617.
As soon as I start typing, the subscriptOutOfBounds happens.
What changed in filters?

Stephan




Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Tudor Girba-2
Hi,

> On Feb 28, 2016, at 10:32 AM, Stephan Eggermont <[hidden email]> wrote:
>
> On 24-02-16 20:14, Tudor Girba wrote:
>> Hi,
>>
>> I took a brief look. It looks like a strange problem. If I add the
>> wantsToDisplayOnEmptyQuery to false, it seems to work, but I do not
>> understand the real problem. At least not yet. Could you live with it
>> for now?
>
> On my machine it doesn't seem to change anything in 50617.
> As soon as I start typing, the subscriptOutOfBounds happens.
> What changed in filters?

Nothing really changed since a while. That is the problem.

Doru


> Stephan
>
>
>
>

--
www.tudorgirba.com
www.feenk.com

"We can create beautiful models in a vacuum.
But, to get them effective we have to deal with the inconvenience of reality."


Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Tudor Girba-2
Hi,

Strange. Now I get the same problems as well.

Cheers,
Doru


> On Feb 28, 2016, at 11:08 AM, Tudor Girba <[hidden email]> wrote:
>
> Hi,
>
>> On Feb 28, 2016, at 10:32 AM, Stephan Eggermont <[hidden email]> wrote:
>>
>> On 24-02-16 20:14, Tudor Girba wrote:
>>> Hi,
>>>
>>> I took a brief look. It looks like a strange problem. If I add the
>>> wantsToDisplayOnEmptyQuery to false, it seems to work, but I do not
>>> understand the real problem. At least not yet. Could you live with it
>>> for now?
>>
>> On my machine it doesn't seem to change anything in 50617.
>> As soon as I start typing, the subscriptOutOfBounds happens.
>> What changed in filters?
>
> Nothing really changed since a while. That is the problem.
>
> Doru
>
>
>> Stephan
>>
>>
>>
>>
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "We can create beautiful models in a vacuum.
> But, to get them effective we have to deal with the inconvenience of reality."
>

--
www.tudorgirba.com
www.feenk.com

"It's not what we do that matters most, it's how we do it."


Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Stephan Eggermont-3
On 28-02-16 11:11, Tudor Girba wrote:
> Strange. Now I get the same problems as well.

I triaged it to a change in 50596. 50595 works

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Stephan Eggermont-3
On 28-02-16 12:33, Stephan Eggermont wrote:
> On 28-02-16 11:11, Tudor Girba wrote:
>> Strange. Now I get the same problems as well.
>
> I triaged it to a change in 50596. 50595 works

Weird error.

lastSubbrick

        ^ self subbricks last

self subbricks returns an OrderedCollection of size 28.

#subbricks is defined in GLMBrick as an explicit requirement
of the GLMBrickStructureTrait in which #lastSubbrick is defined.

when computing last in the OrderedCollection the collection
is empty, resulting in a self at: 0.

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Stephan Eggermont-3
GLMBrickExtensionTrait & GLMBrickPropertiesTrait have a lot of
duplication. They make GLMBrick flattenDownAllTraits do a MNU
as (self traitComposition transformationOfTrait: aTrait) = nil

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Stephan Eggermont-3
In reply to this post by Stephan Eggermont-3
In one image I could fix it with Compiler recompileAll
The others I tried all ran into the freetype bug.

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Aliaksei Syrel
In reply to this post by Stephan Eggermont-3
It is not a problem of brick, it is a problem of Traits in pharo.

In brick we have a few traits that use GLMBrickExtensionTrait, for example:

Trait named: #GLMBrickLayoutTrait
  uses: GLMBrickExtensionTrait
  category: 'Glamour-Morphic-Brick-Traits'

self traitComposition allTraits returns collection of 7 traits including GLMBrickExtensionTrait. But implementation of transformationOfTrait: refers to transformations which is an array of 4 traits directly used by GLMBrick, so obviously GLMBrickExtensionTrait is not found -> nil.

So flattenDownAllTraits is broken and does not take care about "subclassing" of bricks.

Cheers,
Alex

On Sun, Feb 28, 2016 at 4:35 PM, Stephan Eggermont <[hidden email]> wrote:
GLMBrickExtensionTrait & GLMBrickPropertiesTrait have a lot of duplication. They make GLMBrick flattenDownAllTraits do a MNU
as (self traitComposition transformationOfTrait: aTrait) = nil

Stephan




Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Stephan Eggermont-3
In reply to this post by Stephan Eggermont-3
An easy way to reproduce is:

        GTSpotterMorph new
                        extent: (World width / 3.25 @ (World height / 2.25)) asIntegerPoint;
                        spotterModel: GTSpotter new;
                openCenteredInWorld


Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Stephan Eggermont-3
On 01-03-16 11:39, Stephan Eggermont wrote:
> An easy way to reproduce is:
>
>      GTSpotterMorph new
>              extent: (World width / 3.25 @ (World height / 2.25))
> asIntegerPoint;
>              spotterModel: GTSpotter new;
>          openCenteredInWorld

Reverting GTSpotter>>initialize solves it.

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: Spotter changes broke CodePanel

Stephan Eggermont-3
17729