Hi,
we're getting into deep trouble using GF/ST with VAST 8.02. After opening our figure a few dozen times, the Image is unresponsive and has to be shut down from the Task Manager. Looking at the GDI resources, we see that we reach 9999 or 10000 GDI handles. As far as I understand the old Polymorphic documentation, the implementation of GFGraphicObject>>finalize should be sufficient to free GDI handles, but it seems that's not true (it simply calls self release). A System globalGarbageCollect or abtScrubImage dioes not free many GDI resources (maybe 40 or so, while each instance of the figure takes about 400 GDI handles, according to the Windows Task Manager). Who has experiences with GF/ST and this GDI problem? What doe people do to clean up properly? Joachim -- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/a6uaQyERPFAJ. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
Joachim -
OK, I guess it's time to do something about finalization. Here is the current situation (don't shoot the messanger!):
This works OK in a system that is creating only a small number of weak objects -- GF/ST doesn't fall into this category.
So what can be done? I suggest:
This does not address the issue (yet) of the need for both a garbage collet (to put weak object onto the queue) and idle tiem (to take them off), but it is a quick and easy way toinprove the management.
John
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/vEGQE7Q35sYJ. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
John,
I guess I wouldn't survive shooting you for very long, even if I wanted to (which I don't for several reasons) ;-) Thanks for your insightful answer. I was somehow expecting an answer like: "you forgot to release GDI handles by sending xxx to your GO's, stupid!" - I know you wouldn't use that last word, but I often get to hear it ;-) I'd like to understand your answer a bit better: If our problem is a finalization problem, shouldn't invoking the GC with System globalGarbageCollect solve the problem? I mean, GC does lead to finalization before objects get finally trashed, no? I may be wrong, but if the above is true, we're probably only lucky to run into GDI problems before we run out of memory because the GO's won't go away, but are small enough to fit into our memory bounds.... BTW: There is something strange in the GF ST documentation in the chapter about releasing GO's: VA Smaltalk
In GF/ST under Visual
Smalltalk and VisualAge/IBM Smalltalk, we have chosen to make use of
finalization the default when you create new instances of
GFGraphicObject. However, for finalization to work in Visual Smalltalk
versions prior to 3.1 (it is included by default in 3.1), you must have
the finalization “extra“ provided by Visual Smalltalk loaded into your
image. If you don’t, GF/ST will still work without errors (since we
handle the DoesNotUnderstand exception when we tell a GO it needsFinalization). However, you will then have to release GO’s manually. We highly recommend that you load the finalization extra when using GF/ST. Finalization is available in the \EXTRAS\FINALIZE subdirectory in the Visual Smalltalk 3.0 release.
We implement a default finalize in GFGraphicObject that says:
We can therefore be sure that every nodeGO will receive the message finalize, resulting in the release of host window system resources, when it is no longer held onto by anybody. The whole section bares a headline of "VA Smalltalk" but seems to cover VisualSmalltalk. (The error was not introduced by Instantiations but has been in the original document already). It also seems to be incorrect, because we tried putting breakpoints and halts into GOs finalize method and never got a Debugger, which either means VAST catches and swallows the respective exceptions in the finalize cycle or our GO's never get finalized... So you see me puzzled ;-) Joachim -- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/2L9p-QvqMaIJ. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
Hi again,
skimming through the GFST manual in VAST online help, I find many places in which the VAST balloon Icon has been added to sections that cover VisualSmalltalk (and probably also mention vast). That is misleading in many situations... Joachim -- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/adjd_O2qxZ8J. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
Free forum by Nabble | Edit this page |