How is this possible?

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

How is this possible?

Sean P. DeNigris
Administrator
In 30456, I'm in the process of porting the Tiling Window Manager. I'm experiencing this confusing error...

TWMDockingBarMorph DNU @

In DockingBarMorph>>updatePosition there is the following code:

self isAdheringToLeft
        ifTrue: [| usedHeight usedWidth |
                usedHeight := self usedHeightByPredominantDockingBarsOfChastes: #(#top ).
                usedWidth := self usedWidthByPredominantDockingBarsOfChastes: #(#left ).
                (usedHeight isNumber not or: [usedWidth isNumber]) ifFalse: [ Halt once ].
                usedHeight := 1000.
                usedWidth := 100.
                self topLeft: self owner topLeft - margin + (usedWidth @ usedHeight)].

Pharo is saying that usedWidth = aTWMDockingBarMorph, even though it's set to a number (for debugging) in the preceding statement. Any ideas?

Thanks.
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: How is this possible?

Marcus Denker-4

On Oct 11, 2013, at 4:13 PM, "Sean P. DeNigris" <[hidden email]> wrote:

> In 30456, I'm in the process of porting the Tiling Window Manager. I'm
> experiencing this confusing error...
>
> TWMDockingBarMorph DNU @
>
> In DockingBarMorph>>updatePosition there is the following code:
>
> self isAdheringToLeft
> ifTrue: [| usedHeight usedWidth |
> usedHeight := self usedHeightByPredominantDockingBarsOfChastes: #(#top ).
> usedWidth := self usedWidthByPredominantDockingBarsOfChastes: #(#left ).
> (usedHeight isNumber not or: [usedWidth isNumber]) ifFalse: [ Halt once ].
> usedHeight := 1000.
> usedWidth := 100.
> self topLeft: self owner topLeft - margin + (usedWidth @ usedHeight)].
>
> Pharo is saying that usedWidth = aTWMDockingBarMorph, even though it's set
> to a number (for debugging) in the preceding statement. Any ideas?
>
Yes, it is on my list to look at this. there is already a report.

        https://pharo.fogbugz.com/f/cases/11611/Pharo3-0-DockingBarMorph-updatePosition-error-Compiler-problem

I will have a look...

        Marcus







signature.asc (210 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How is this possible?

Benjamin Van Ryseghem (Pharo)
In reply to this post by Sean P. DeNigris
I am experiencing some problem with the debugger giving the value of the wrong variable, like switching them somehow


Ben

On Oct 11, 2013, at 4:12 PM, "Sean P. DeNigris" <[hidden email]> wrote:

In 30456, I'm in the process of porting the Tiling Window Manager. I'm
experiencing this confusing error...

TWMDockingBarMorph DNU @

In DockingBarMorph>>updatePosition there is the following code:

self isAdheringToLeft
ifTrue: [| usedHeight usedWidth |
usedHeight := self usedHeightByPredominantDockingBarsOfChastes: #(#top ).
usedWidth := self usedWidthByPredominantDockingBarsOfChastes: #(#left ).
(usedHeight isNumber not or: [usedWidth isNumber]) ifFalse: [ Halt once ].
usedHeight := 1000.
usedWidth := 100.
self topLeft: self owner topLeft - margin + (usedWidth @ usedHeight)].

Pharo is saying that usedWidth = aTWMDockingBarMorph, even though it's set
to a number (for debugging) in the preceding statement. Any ideas?

Thanks.



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/How-is-this-possible-tp4713857.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: How is this possible?

Marcus Denker-4

On Oct 11, 2013, at 4:19 PM, Benjamin <[hidden email]> wrote:

> I am experiencing some problem with the debugger giving the value of the wrong variable, like switching them somehow
>

Yes, that is another bug I am looking at… a quite strange one related to being in the wrong scope in the debugger
when stepping.

        Marcus

signature.asc (210 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How is this possible?

Marcus Denker-4
In reply to this post by Sean P. DeNigris

On Oct 11, 2013, at 4:13 PM, Sean P. DeNigris <[hidden email]> wrote:

> In 30456, I'm in the process of porting the Tiling Window Manager. I'm
> experiencing this confusing error...
>
> TWMDockingBarMorph DNU @
>
> In DockingBarMorph>>updatePosition there is the following code:
>
> self isAdheringToLeft
> ifTrue: [| usedHeight usedWidth |
> usedHeight := self usedHeightByPredominantDockingBarsOfChastes: #(#top ).
> usedWidth := self usedWidthByPredominantDockingBarsOfChastes: #(#left ).
> (usedHeight isNumber not or: [usedWidth isNumber]) ifFalse: [ Halt once ].
> usedHeight := 1000.
> usedWidth := 100.
> self topLeft: self owner topLeft - margin + (usedWidth @ usedHeight)].
>
> Pharo is saying that usedWidth = aTWMDockingBarMorph, even though it's set
> to a number (for debugging) in the preceding statement. Any ideas?
>
So it seems the compiler (the semantic analysis phase, I think) does something wrong
with defined temps in ifTrue:  and other optimized blocks.

I will
        -> commit an update where the code moves the temps to the method
        -> then fix the compiler next week

        Marcus


signature.asc (210 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How is this possible?

Sean P. DeNigris
Administrator
Marcus Denker-4 wrote
I will
        -> commit an update where the code moves the temps to the method
        -> then fix the compiler next week
Thanks, Marcus!
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: How is this possible?

Sean P. DeNigris
Administrator
In reply to this post by Marcus Denker-4
Marcus Denker-4 wrote
I will
        -> commit an update where the code moves the temps to the method
        -> then fix the compiler next week
Are there issues for these? I want to track the status because the TWM port to 3.0 is on hold until it's fixed...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: How is this possible?

Marcus Denker-4

On 24 Oct 2013, at 07:12, Sean P. DeNigris <[hidden email]> wrote:

> Marcus Denker-4 wrote
>> I will
>> -> commit an update where the code moves the temps to the method
>> -> then fix the compiler next week
>
> Are there issues for these? I want to track the status because the TWM port
> to 3.0 is on hold until it's fixed...
>
>
I did the workaround literally within hours… so this is closed already.

I don’t remember if I put an issue for the second, but there is a TODO on my list
"In Bug Tracker: bug temps in ifTrue:”

which is the next on the list… I did not dare to fix it with the Opal RegressionTester crashing
the VM, which I fixed yesterday.

        Marcus