Posted by
Henrik Nergaard on
Jul 08, 2016; 8:43am
URL: https://forum.world.st/VM-Crash-tp4905304p4905538.html
You need to draw it at the correct location in the world ;).
surface displayOnMorphicCanvas: aCanvas at: self position
Best regards,
Henrik
-----Original Message-----
From:
[hidden email] [mailto:
[hidden email]] On Behalf Of Alexandre Bergel
Sent: Friday, July 8, 2016 11:20 AM
To: Moose-related development <
[hidden email]>
Subject: [Moose-dev] Re: VM Crash?
Hi Henrik,
thank thank you to look into that.
Indeed, that error looks familiar
> I guess you can try to use AthensCairoSurface>>#displayOnMorphicCanvas:at:
> in TRMorph>>#drawOn: instead of how it is done now, this should assure
> that the Surface is still alive when drawing.
In TRMorph>>drawOn:, replacing
aCanvas image: f at: self bounds origin sourceRect: (0 @ 0 extent: surface extent) rule: 34
by
surface displayOnMorphicCanvas: aCanvas at: 0 @ 0
does not draw anything. Did I do something wrong?
> I also think that changing the extent of the surface should be moved
> from #layoutChanged to the start of #drawOn:. The layoutChanged/ morph
> extent change could happen more than once in between draw calls,
> which could cause unnecessary recreations of the surface. It should
> also ensure that the surface cannot be recreated while inside #drawOn:.
Thanks! I have committed this
Running all the Roassal2- tests leaves 5 instances of AthensCairoSurface that cannot be garbage collected.
With the change you are suggesting, it is reduced to 4. Still something!
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev