AthensCairoSurface not getting garbage collected
I'm using Athens rendering for my multi-touch applications on Pharo5. As part of that, I create a surface: surface := AthensCairoSurface extent: bounds extent asIntegerPoint. Though the object creating that surface is deleted, the surface sticks around. So, each time I run the app, I get another instance of AthensCairoSurface hanging around. That means all the forms stick around as well. So my image can quickly grow towards the 1GB size. Is there anything I can do about that? Can I manually get the surface to delete itself? Cheers, Jeff
Here's some more information on this: When I was having this issue, Pharo was pretty unstable. It would crash regularly when using AthensCairoSurface. It would also sometimes have weird visual artifacts. I'm not sure what these were but it almost looked like the bits were shifted so that rgb turned into gbr or something. Anyway, I've gone ahead and dumped that image, loaded all the same code, and started making sure that I don't save the image when testing the code. I haven't had a crash since. Perhaps that gives a clue about what was going on. Cheers, Jeff PS This is on the Ubuntu16 and Pharo5. On Sat, Jun 18, 2016 at 12:36 PM J.F. Rick <self@je77.com> wrote:
I'm using Athens rendering for my multi-touch applications on Pharo5. As part of that, I create a surface: surface := AthensCairoSurface extent: bounds extent asIntegerPoint.
Though the object creating that surface is deleted, the surface sticks around. So, each time I run the app, I get another instance of AthensCairoSurface hanging around. That means all the forms stick around as well. So my image can quickly grow towards the 1GB size.
Is there anything I can do about that? Can I manually get the surface to delete itself?
Cheers,
Jeff
Thanks for this report! I also experience crashes, that are hard to reproduce. Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Jun 22, 2016, at 1:18 PM, J.F. Rick <self@je77.com> wrote:
Here's some more information on this: When I was having this issue, Pharo was pretty unstable. It would crash regularly when using AthensCairoSurface. It would also sometimes have weird visual artifacts. I'm not sure what these were but it almost looked like the bits were shifted so that rgb turned into gbr or something. Anyway, I've gone ahead and dumped that image, loaded all the same code, and started making sure that I don't save the image when testing the code. I haven't had a crash since. Perhaps that gives a clue about what was going on.
Cheers,
Jeff
PS This is on the Ubuntu16 and Pharo5.
On Sat, Jun 18, 2016 at 12:36 PM J.F. Rick <self@je77.com <mailto:self@je77.com>> wrote: I'm using Athens rendering for my multi-touch applications on Pharo5. As part of that, I create a surface: surface := AthensCairoSurface extent: bounds extent asIntegerPoint.
Though the object creating that surface is deleted, the surface sticks around. So, each time I run the app, I get another instance of AthensCairoSurface hanging around. That means all the forms stick around as well. So my image can quickly grow towards the 1GB size.
Is there anything I can do about that? Can I manually get the surface to delete itself?
Cheers,
Jeff
On 18 June 2016 at 19:36, J.F. Rick <self@je77.com> wrote:
I'm using Athens rendering for my multi-touch applications on Pharo5. As part of that, I create a surface: surface := AthensCairoSurface extent: bounds extent asIntegerPoint.
Though the object creating that surface is deleted, the surface sticks around. So, each time I run the app, I get another instance of AthensCairoSurface hanging around. That means all the forms stick around as well. So my image can quickly grow towards the 1GB size.
Is there anything I can do about that? Can I manually get the surface to delete itself?
follow the pointers and look for the culprit, that holding it and not releasing. That's all i can advice.
Cheers,
Jeff
-- Best regards, Igor Stasenko.
Are .dmp files useful? If so, I can share those. I do still get crashes but they are far less since I only use one surface. Another thing that is happening is that the form-based paints are sticking around though the form should have been collected. It seems like the way that paints are being handled is changing in Athens development. I tried upgrading but that broke things. Is there a way I can be at the bleeding edge and contribute back to the Athens development? I can't do anything on the C side but I can contribute on the Smalltalk side. Cheers, Jeff On Thu, Jun 23, 2016 at 7:11 AM Igor Stasenko <siguctua@gmail.com> wrote:
On 18 June 2016 at 19:36, J.F. Rick <self@je77.com> wrote:
I'm using Athens rendering for my multi-touch applications on Pharo5. As part of that, I create a surface: surface := AthensCairoSurface extent: bounds extent asIntegerPoint.
Though the object creating that surface is deleted, the surface sticks around. So, each time I run the app, I get another instance of AthensCairoSurface hanging around. That means all the forms stick around as well. So my image can quickly grow towards the 1GB size.
Is there anything I can do about that? Can I manually get the surface to delete itself?
follow the pointers and look for the culprit, that holding it and not releasing. That's all i can advice.
Cheers,
Jeff
-- Best regards, Igor Stasenko.
On 23 June 2016 at 16:19, J.F. Rick <self@je77.com> wrote:
Are .dmp files useful? If so, I can share those. I do still get crashes but they are far less since I only use one surface.
Another thing that is happening is that the form-based paints are sticking around though the form should have been collected. It seems like the way that paints are being handled is changing in Athens development. I tried upgrading but that broke things. Is there a way I can be at the bleeding edge and contribute back to the Athens development? I can't do anything on the C side but I can contribute on the Smalltalk side.
Unfortunately, i am not in the bussiness right now to help with your problem. And i cannot teach everyone how to handle problems with hanging pointers nor mentor people how to write code to prevent risk of their appearance in a first place. It is a common problem of every system with garbage collector under the hood.. now its time for Athens to face it. Oh well, one more, one less.. Such thing will keep popping up time to time around the place, unless people start to think before coding :)
I guess, someone who made those changes could help you better.
Cheers,
Jeff
On Thu, Jun 23, 2016 at 7:11 AM Igor Stasenko <siguctua@gmail.com> wrote:
On 18 June 2016 at 19:36, J.F. Rick <self@je77.com> wrote:
I'm using Athens rendering for my multi-touch applications on Pharo5. As part of that, I create a surface: surface := AthensCairoSurface extent: bounds extent asIntegerPoint.
Though the object creating that surface is deleted, the surface sticks around. So, each time I run the app, I get another instance of AthensCairoSurface hanging around. That means all the forms stick around as well. So my image can quickly grow towards the 1GB size.
Is there anything I can do about that? Can I manually get the surface to delete itself?
follow the pointers and look for the culprit, that holding it and not releasing. That's all i can advice.
Cheers,
Jeff
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
I am wondering whether this bug is not responsible of making crashing Roassal. This is a serious bug, which unfortunately, require deep knowledge⦠Can someone help this please? Alexandre
On Jun 18, 2016, at 12:36 PM, J.F. Rick <self@je77.com> wrote:
I'm using Athens rendering for my multi-touch applications on Pharo5. As part of that, I create a surface: surface := AthensCairoSurface extent: bounds extent asIntegerPoint.
Though the object creating that surface is deleted, the surface sticks around. So, each time I run the app, I get another instance of AthensCairoSurface hanging around. That means all the forms stick around as well. So my image can quickly grow towards the 1GB size.
Is there anything I can do about that? Can I manually get the surface to delete itself?
Cheers,
Jeff
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Hi Jeff, if you use forms to paint on an AthensCairoCanvas, they are cached in the CairoBackendCache, can you try to flush that cache whith CairoBackendCache flush. 2016-06-18 18:36 GMT+02:00 J.F. Rick <self@je77.com>:
I'm using Athens rendering for my multi-touch applications on Pharo5. As part of that, I create a surface: surface := AthensCairoSurface extent: bounds extent asIntegerPoint.
Though the object creating that surface is deleted, the surface sticks around. So, each time I run the app, I get another instance of AthensCairoSurface hanging around. That means all the forms stick around as well. So my image can quickly grow towards the 1GB size.
Is there anything I can do about that? Can I manually get the surface to delete itself?
Cheers,
Jeff
Nicolai, THANKS! That worked. I no longer have any AthensCairoCanvas hanging around after executing "CairoBackendCache flush". Cheers, Jeff On Sun, Jul 3, 2016 at 11:58 AM Nicolai Hess <nicolaihess@gmail.com> wrote:
Hi Jeff,
if you use forms to paint on an AthensCairoCanvas, they are cached in the CairoBackendCache, can you try to flush that cache whith CairoBackendCache flush.
2016-06-18 18:36 GMT+02:00 J.F. Rick <self@je77.com>:
I'm using Athens rendering for my multi-touch applications on Pharo5. As part of that, I create a surface: surface := AthensCairoSurface extent: bounds extent asIntegerPoint.
Though the object creating that surface is deleted, the surface sticks around. So, each time I run the app, I get another instance of AthensCairoSurface hanging around. That means all the forms stick around as well. So my image can quickly grow towards the 1GB size.
Is there anything I can do about that? Can I manually get the surface to delete itself?
Cheers,
Jeff
Jeff, does this flush reduces the amount of crash you are experiencing? Alexandre
On Jul 6, 2016, at 9:01 PM, J.F. Rick <self@je77.com> wrote:
Nicolai,
THANKS! That worked. I no longer have any AthensCairoCanvas hanging around after executing "CairoBackendCache flush".
Cheers,
Jeff
On Sun, Jul 3, 2016 at 11:58 AM Nicolai Hess <nicolaihess@gmail.com> wrote: Hi Jeff,
if you use forms to paint on an AthensCairoCanvas, they are cached in the CairoBackendCache, can you try to flush that cache whith CairoBackendCache flush.
2016-06-18 18:36 GMT+02:00 J.F. Rick <self@je77.com>: I'm using Athens rendering for my multi-touch applications on Pharo5. As part of that, I create a surface: surface := AthensCairoSurface extent: bounds extent asIntegerPoint.
Though the object creating that surface is deleted, the surface sticks around. So, each time I run the app, I get another instance of AthensCairoSurface hanging around. That means all the forms stick around as well. So my image can quickly grow towards the 1GB size.
Is there anything I can do about that? Can I manually get the surface to delete itself?
Cheers,
Jeff
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
I don't have enough evidence either way, but the signs point to no since the applications that crash are not ones that use form-based paints. I assume they wouldn't be affected by the flush. We did have one crash on a form-based one where it crashed after running for 10 hours. My guess is that one ran out of memory. That crash is probably resolved. But, I'll keep everybody informed as I work more on it. Cheers, Jeff On Thu, Jul 7, 2016 at 3:28 AM Alexandre Bergel <alexandre.bergel@me.com> wrote:
Jeff, does this flush reduces the amount of crash you are experiencing?
Alexandre
On Jul 6, 2016, at 9:01 PM, J.F. Rick <self@je77.com> wrote:
Nicolai,
THANKS! That worked. I no longer have any AthensCairoCanvas hanging around after executing "CairoBackendCache flush".
Cheers,
Jeff
On Sun, Jul 3, 2016 at 11:58 AM Nicolai Hess <nicolaihess@gmail.com> wrote: Hi Jeff,
if you use forms to paint on an AthensCairoCanvas, they are cached in the CairoBackendCache, can you try to flush that cache whith CairoBackendCache flush.
2016-06-18 18:36 GMT+02:00 J.F. Rick <self@je77.com>: I'm using Athens rendering for my multi-touch applications on Pharo5. As part of that, I create a surface: surface := AthensCairoSurface extent: bounds extent asIntegerPoint.
Though the object creating that surface is deleted, the surface sticks around. So, each time I run the app, I get another instance of AthensCairoSurface hanging around. That means all the forms stick around as well. So my image can quickly grow towards the 1GB size.
Is there anything I can do about that? Can I manually get the surface to delete itself?
Cheers,
Jeff
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
If problem in ever-growing cache - try using identical object(s) as keys for cache, not newly-created-unique one, each time you adding new entry to cache :) or.. maybe cache is broken and does not releasing garbage anymore. On 8 July 2016 at 16:54, J.F. Rick <self@je77.com> wrote:
I don't have enough evidence either way, but the signs point to no since the applications that crash are not ones that use form-based paints. I assume they wouldn't be affected by the flush. We did have one crash on a form-based one where it crashed after running for 10 hours. My guess is that one ran out of memory. That crash is probably resolved. But, I'll keep everybody informed as I work more on it.
Cheers,
Jeff
On Thu, Jul 7, 2016 at 3:28 AM Alexandre Bergel <alexandre.bergel@me.com> wrote:
Jeff, does this flush reduces the amount of crash you are experiencing?
Alexandre
On Jul 6, 2016, at 9:01 PM, J.F. Rick <self@je77.com> wrote:
Nicolai,
THANKS! That worked. I no longer have any AthensCairoCanvas hanging around after executing "CairoBackendCache flush".
Cheers,
Jeff
On Sun, Jul 3, 2016 at 11:58 AM Nicolai Hess <nicolaihess@gmail.com> wrote: Hi Jeff,
if you use forms to paint on an AthensCairoCanvas, they are cached in the CairoBackendCache, can you try to flush that cache whith CairoBackendCache flush.
2016-06-18 18:36 GMT+02:00 J.F. Rick <self@je77.com>: I'm using Athens rendering for my multi-touch applications on Pharo5. As part of that, I create a surface: surface := AthensCairoSurface extent: bounds extent asIntegerPoint.
Though the object creating that surface is deleted, the surface sticks around. So, each time I run the app, I get another instance of AthensCairoSurface hanging around. That means all the forms stick around as well. So my image can quickly grow towards the 1GB size.
Is there anything I can do about that? Can I manually get the surface to delete itself?
Cheers,
Jeff
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- Best regards, Igor Stasenko.
participants (4)
-
Alexandre Bergel -
Igor Stasenko -
J.F. Rick -
Nicolai Hess