4 Replies Latest reply on Jan 21, 2008 6:14 AM by maxandersen

    GDI leak in FreeMarker IDE

    kyle30312

      I'm seeing Eclipse crashes that I think are caused by a GDI handle leak in the FreeMarker IDE plugin for Eclipse.

      Using FreeMarker IDE 1.0.0.beta3 with Eclipse 3.3.1.1 on Windows XP SP2, as I type inside a directive tag (like <@abc name="def" />), the Outline view updates. As it updates, the GDI handle count (visible in Process Explorer) increases; when it reaches 9,999, Eclipse fails to paint and won't shut down cleanly.

      The number of handles leaked appears to be N for each character typed, where N is the number of items displayed in the Outline view. Not showing the Outline view at all (i.e. close it and restart Eclipse) appears to work around the problem.

      - Is anyone else seeing this problem?
      - Can anyone recommend a fix? From a quick look at the code, I'm guessing Image objects may not be getting dispose()'d, but I'm not sure when they should be disposed.

        • 1. Re: GDI leak in FreeMarker IDE
          maxandersen

          No I haven't seen that.

          • 2. Re: GDI leak in FreeMarker IDE
            satan3

            no

            • 3. Re: GDI leak in FreeMarker IDE
              krogh

              *bump*

              I noticed the same problem, on Vista and XP/SP2, using freemarker-ide-1.0.0.beta3, an up-to-date eclipse 3.3 and freemarker 2.3.9
              -BUT- I'm not using the outline view

              I'm unable to spot when it's exactly happening. Sometimes eclipse crashes after 5 minutes and sometimes it takes hours.

              Here are some observations:
              When working on an FTL file, copy-paste operations and using auto-completion seem to cause crashes faster.
              If i've some ftl files open but work on a Java file, there's no problem.
              By monitoring Task Manager, the crash is cleary due to a GDI handle leak
              As the GDI handle count is increasing, freemarker ide becomes slower until it becomes unresponsive, and then so does eclipse; unable to save or do anything else such as close a file.

              I just updated to a nightly build and hope this will solve my problem :)

              Hope this help to reproduce it.

              • 4. Re: GDI leak in FreeMarker IDE
                maxandersen

                we haven't changed anything in the freemarker IDE for a long time so i doubt it has gone away.

                Anyone that figures out what is causing it is encouraged to open up an issue in jira about it.

                Thanks