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 |
Hi Karl,
the full call stack would be more helpful. :-) Best, Marcel |
In reply to this post by Karl Ramberg
Hi Karl,
can you share the problematic image? Best, Marcel |
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, |
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:
SqueakDebug.log (16K) Download Attachment |
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 |
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 |
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 |
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 |
Hi Karl, can you revert the hack now? Best, Marcel |
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 |
Free forum by Nabble | Edit this page |