Login  Register

Re: VM Crash?

Posted by abergel on Jul 08, 2016; 1:12pm
URL: https://forum.world.st/VM-Crash-tp4905304p4905596.html

Okay! It works now.
thanks

Alexandre


> On Jul 8, 2016, at 11:24 AM, Henrik Nergaard <[hidden email]> wrote:
>
> 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
>
>>
>> Hope this helps.
>>
>> Best regards,
>> Henrik
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/VM-Crash-tp4905304p4905497.html
>> Sent from the Moose mailing list archive at Nabble.com.
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> 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

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev