Problems updating, canvas being nil

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

Problems updating, canvas being nil

Karl Ramberg
I was updating and had to change this method to use 'self assuredCanvas' because canvas instance variable was nil

WorldState>>displayWorld: aWorld submorphs: submorphs
"Update this world's display."

| deferredUpdateMode handsToDraw allDamage handDamageRects worldDamageRects |

submorphs do: [:m | m fullBounds].  "force re-layout if needed"
self checkIfUpdateNeeded ifFalse: [^ self].  "display is already up-to-date"

deferredUpdateMode := self doDeferredUpdatingFor: aWorld.
deferredUpdateMode ifFalse: [self assuredCanvas].

worldDamageRects := self drawWorld: aWorld submorphs: submorphs invalidAreasOn: self assuredCanvas.  "repair world's damage on canvas"
"self handsDo:[:h| h noticeDamageRects: worldDamageRects]."
handsToDraw := self selectHandsToDrawForDamage: worldDamageRects.
handDamageRects := handsToDraw collect: [:h | h savePatchFrom: canvas].
allDamage := worldDamageRects, handDamageRects.

handsToDraw reverseDo: [:h | canvas fullDrawMorph: h].  "draw hands onto world canvas"

"*make this true to flash damaged areas for testing*"
Preferences debugShowDamage ifTrue: [aWorld flashRects: allDamage color: Color black].

canvas finish: allDamage.

"quickly copy altered rects of canvas to Display:"
deferredUpdateMode
ifTrue: [self forceDamageToScreen: allDamage]
ifFalse: [canvas showAt: aWorld viewBox origin invalidRects: allDamage].
handsToDraw do: [:h | h restoreSavedPatchOn: canvas].  "restore world canvas under hands"
Display deferUpdates: false; forceDisplayUpdate.

Best,
Karl


Reply | Threaded
Open this post in threaded view
|

Re: Problems updating, canvas being nil

marcel.taeumel
Hi Karl,

the full call stack would be more helpful. :-)

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: Problems updating, canvas being nil

marcel.taeumel
In reply to this post by Karl Ramberg
Hi Karl,

can you share the problematic image?

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: Problems updating, canvas being nil

Karl Ramberg
I changed the method as described and updated the image... No saved copy or call stack saved

Best,
Karl

On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel <[hidden email]> wrote:
Hi Karl,

can you share the problematic image?

Best,
Marcel



--
View this message in context: http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.




Reply | Threaded
Open this post in threaded view
|

Re: Problems updating, canvas being nil

Karl Ramberg
I updated another image and ran into the same problem:

Best,
Karl

On Tue, May 24, 2016 at 2:36 PM, karl ramberg <[hidden email]> wrote:
I changed the method as described and updated the image... No saved copy or call stack saved

Best,
Karl

On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel <[hidden email]> wrote:
Hi Karl,

can you share the problematic image?

Best,
Marcel



--
View this message in context: http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.






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

Re: Problems updating, canvas being nil

marcel.taeumel
Karl Ramberg wrote
I updated another image and ran into the same problem:

Best,
Karl

On Tue, May 24, 2016 at 2:36 PM, karl ramberg <[hidden email]> wrote:

> I changed the method as described and updated the image... No saved copy
> or call stack saved
>
> Best,
> Karl
>
> On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel <[hidden email]>
> wrote:
>
>> Hi Karl,
>>
>> can you share the problematic image?
>>
>> Best,
>> Marcel
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html
>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>
>>
>




SqueakDebug.log (16K) <http://forum.world.st/attachment/4897276/0/SqueakDebug.log>
Hi Karl,

I just updated an older image from #15844 to #15987 with many tools open and I did not run into your problem. It seems strange that your image has a world without a canvas. Even if so, there are measures to take care of it just 2-3 lines above your fix.

:-/

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: Problems updating, canvas being nil

Karl Ramberg
My images usually have several projects. Could that be part of the problem?

Best,
Karl 

On Thu, May 26, 2016 at 3:16 PM, marcel.taeumel <[hidden email]> wrote:
Karl Ramberg wrote
> I updated another image and ran into the same problem:
>
> Best,
> Karl
>
> On Tue, May 24, 2016 at 2:36 PM, karl ramberg &lt;

> karlramberg@

> &gt; wrote:
>
>> I changed the method as described and updated the image... No saved copy
>> or call stack saved
>>
>> Best,
>> Karl
>>
>> On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel &lt;

> Marcel.Taeumel@

> &gt;
>> wrote:
>>
>>> Hi Karl,
>>>
>>> can you share the problematic image?
>>>
>>> Best,
>>> Marcel
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html
>>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>>
>>>
>>
>
>
>
>
> SqueakDebug.log (16K)
> &lt;http://forum.world.st/attachment/4897276/0/SqueakDebug.log&gt;

Hi Karl,

I just updated an older image from #15844 to #15987 with many tools open and
I did not run into your problem. It seems strange that your image has a
world without a canvas. Even if so, there are measures to take care of it
just 2-3 lines above your fix.

:-/

Best,
Marcel



--
View this message in context: http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897537.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.




Reply | Threaded
Open this post in threaded view
|

Re: Problems updating, canvas being nil

marcel.taeumel
Karl Ramberg wrote
My images usually have several projects. Could that be part of the problem?

Best,
Karl

On Thu, May 26, 2016 at 3:16 PM, marcel.taeumel <[hidden email]>
wrote:

> Karl Ramberg wrote
> > I updated another image and ran into the same problem:
> >
> > Best,
> > Karl
> >
> > On Tue, May 24, 2016 at 2:36 PM, karl ramberg <
>
> > karlramberg@
>
> > > wrote:
> >
> >> I changed the method as described and updated the image... No saved copy
> >> or call stack saved
> >>
> >> Best,
> >> Karl
> >>
> >> On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel <
>
> > Marcel.Taeumel@
>
> > >
> >> wrote:
> >>
> >>> Hi Karl,
> >>>
> >>> can you share the problematic image?
> >>>
> >>> Best,
> >>> Marcel
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>>
> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html
> >>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
> >>>
> >>>
> >>
> >
> >
> >
> >
> > SqueakDebug.log (16K)
> > <http://forum.world.st/attachment/4897276/0/SqueakDebug.log>
>
> Hi Karl,
>
> I just updated an older image from #15844 to #15987 with many tools open
> and
> I did not run into your problem. It seems strange that your image has a
> world without a canvas. Even if so, there are measures to take care of it
> just 2-3 lines above your fix.
>
> :-/
>
> Best,
> Marcel
>
>
>
> --
> View this message in context:
> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897537.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
Hi Karl,

maybe. If you had multiple projects open when I made the project refactorings, some existing world may have gotten into an invalid state. However, the bug should have occured ealier? Which version did you try to update from?

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: Problems updating, canvas being nil

Karl Ramberg
Both images were quite old and with several projects open.

The hack I did brought the past the update process

Best,
Karl

On Fri, May 27, 2016 at 4:51 PM, marcel.taeumel <[hidden email]> wrote:
Karl Ramberg wrote
> My images usually have several projects. Could that be part of the
> problem?
>
> Best,
> Karl
>
> On Thu, May 26, 2016 at 3:16 PM, marcel.taeumel &lt;

> Marcel.Taeumel@

> &gt;
> wrote:
>
>> Karl Ramberg wrote
>> > I updated another image and ran into the same problem:
>> >
>> > Best,
>> > Karl
>> >
>> > On Tue, May 24, 2016 at 2:36 PM, karl ramberg &lt;
>>
>> > karlramberg@
>>
>> > &gt; wrote:
>> >
>> >> I changed the method as described and updated the image... No saved
>> copy
>> >> or call stack saved
>> >>
>> >> Best,
>> >> Karl
>> >>
>> >> On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel &lt;
>>
>> > Marcel.Taeumel@
>>
>> > &gt;
>> >> wrote:
>> >>
>> >>> Hi Karl,
>> >>>
>> >>> can you share the problematic image?
>> >>>
>> >>> Best,
>> >>> Marcel
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>>
>> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html
>> >>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>> >>>
>> >>>
>> >>
>> >
>> >
>> >
>> >
>> > SqueakDebug.log (16K)
>> > &lt;http://forum.world.st/attachment/4897276/0/SqueakDebug.log&gt;
>>
>> Hi Karl,
>>
>> I just updated an older image from #15844 to #15987 with many tools open
>> and
>> I did not run into your problem. It seems strange that your image has a
>> world without a canvas. Even if so, there are measures to take care of it
>> just 2-3 lines above your fix.
>>
>> :-/
>>
>> Best,
>> Marcel
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897537.html
>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>
>>

Hi Karl,

maybe. If you had multiple projects open when I made the project
refactorings, some existing world may have gotten into an invalid state.
However, the bug should have occured ealier? Which version did you try to
update from?

Best,
Marcel




--
View this message in context: http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897866.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.




Reply | Threaded
Open this post in threaded view
|

Re: Problems updating, canvas being nil

marcel.taeumel
Karl Ramberg wrote
Both images were quite old and with several projects open.

The hack I did brought the past the update process

Best,
Karl

On Fri, May 27, 2016 at 4:51 PM, marcel.taeumel <[hidden email]>
wrote:

> Karl Ramberg wrote
> > My images usually have several projects. Could that be part of the
> > problem?
> >
> > Best,
> > Karl
> >
> > On Thu, May 26, 2016 at 3:16 PM, marcel.taeumel <
>
> > Marcel.Taeumel@
>
> > >
> > wrote:
> >
> >> Karl Ramberg wrote
> >> > I updated another image and ran into the same problem:
> >> >
> >> > Best,
> >> > Karl
> >> >
> >> > On Tue, May 24, 2016 at 2:36 PM, karl ramberg <
> >>
> >> > karlramberg@
> >>
> >> > > wrote:
> >> >
> >> >> I changed the method as described and updated the image... No saved
> >> copy
> >> >> or call stack saved
> >> >>
> >> >> Best,
> >> >> Karl
> >> >>
> >> >> On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel <
> >>
> >> > Marcel.Taeumel@
> >>
> >> > >
> >> >> wrote:
> >> >>
> >> >>> Hi Karl,
> >> >>>
> >> >>> can you share the problematic image?
> >> >>>
> >> >>> Best,
> >> >>> Marcel
> >> >>>
> >> >>>
> >> >>>
> >> >>> --
> >> >>> View this message in context:
> >> >>>
> >>
> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html
> >> >>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
> >> >>>
> >> >>>
> >> >>
> >> >
> >> >
> >> >
> >> >
> >> > SqueakDebug.log (16K)
> >> > <http://forum.world.st/attachment/4897276/0/SqueakDebug.log>
> >>
> >> Hi Karl,
> >>
> >> I just updated an older image from #15844 to #15987 with many tools open
> >> and
> >> I did not run into your problem. It seems strange that your image has a
> >> world without a canvas. Even if so, there are measures to take care of
> it
> >> just 2-3 lines above your fix.
> >>
> >> :-/
> >>
> >> Best,
> >> Marcel
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897537.html
> >> Sent from the Squeak - Dev mailing list archive at Nabble.com.
> >>
> >>
>
> Hi Karl,
>
> maybe. If you had multiple projects open when I made the project
> refactorings, some existing world may have gotten into an invalid state.
> However, the bug should have occured ealier? Which version did you try to
> update from?
>
> Best,
> Marcel
>
>
>
>
> --
> View this message in context:
> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897866.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
Hi Karl,

can you revert the hack now?

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: Problems updating, canvas being nil

Karl Ramberg
Hi,
Image seems to work once I revert the hack.
I'm not sure why I got that error

Best,
Karl


On Fri, May 27, 2016 at 5:22 PM, marcel.taeumel <[hidden email]> wrote:
Karl Ramberg wrote
> Both images were quite old and with several projects open.
>
> The hack I did brought the past the update process
>
> Best,
> Karl
>
> On Fri, May 27, 2016 at 4:51 PM, marcel.taeumel &lt;

> Marcel.Taeumel@

> &gt;
> wrote:
>
>> Karl Ramberg wrote
>> > My images usually have several projects. Could that be part of the
>> > problem?
>> >
>> > Best,
>> > Karl
>> >
>> > On Thu, May 26, 2016 at 3:16 PM, marcel.taeumel &lt;
>>
>> > Marcel.Taeumel@
>>
>> > &gt;
>> > wrote:
>> >
>> >> Karl Ramberg wrote
>> >> > I updated another image and ran into the same problem:
>> >> >
>> >> > Best,
>> >> > Karl
>> >> >
>> >> > On Tue, May 24, 2016 at 2:36 PM, karl ramberg &lt;
>> >>
>> >> > karlramberg@
>> >>
>> >> > &gt; wrote:
>> >> >
>> >> >> I changed the method as described and updated the image... No saved
>> >> copy
>> >> >> or call stack saved
>> >> >>
>> >> >> Best,
>> >> >> Karl
>> >> >>
>> >> >> On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel &lt;
>> >>
>> >> > Marcel.Taeumel@
>> >>
>> >> > &gt;
>> >> >> wrote:
>> >> >>
>> >> >>> Hi Karl,
>> >> >>>
>> >> >>> can you share the problematic image?
>> >> >>>
>> >> >>> Best,
>> >> >>> Marcel
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> --
>> >> >>> View this message in context:
>> >> >>>
>> >>
>> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html
>> >> >>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>> >> >>>
>> >> >>>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > SqueakDebug.log (16K)
>> >> > &lt;http://forum.world.st/attachment/4897276/0/SqueakDebug.log&gt;
>> >>
>> >> Hi Karl,
>> >>
>> >> I just updated an older image from #15844 to #15987 with many tools
>> open
>> >> and
>> >> I did not run into your problem. It seems strange that your image has
>> a
>> >> world without a canvas. Even if so, there are measures to take care of
>> it
>> >> just 2-3 lines above your fix.
>> >>
>> >> :-/
>> >>
>> >> Best,
>> >> Marcel
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897537.html
>> >> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>> >>
>> >>
>>
>> Hi Karl,
>>
>> maybe. If you had multiple projects open when I made the project
>> refactorings, some existing world may have gotten into an invalid state.
>> However, the bug should have occured ealier? Which version did you try to
>> update from?
>>
>> Best,
>> Marcel
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897866.html
>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>
>>

Hi Karl,

can you revert the hack now?

Best,
Marcel



--
View this message in context: http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897881.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.