You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/06/15 07:06:18 UTC

[Bug 119997] New: There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

https://issues.apache.org/ooo/show_bug.cgi?id=119997

          Priority: P3
            Bug ID: 119997
                CC: ooo-issues@incubator.apache.org
          Assignee: issues@performance.openoffice.org
           Summary: There is a memory leak in function
                    WinGlyphFallbackSubstititution::FindFontSubstitute
          Severity: normal
        Issue Type: DEFECT
    Classification: Code
                OS: All
          Reporter: chao.dev.h@gmail.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: AOO 3.4.0
         Component: www
           Product: performance

(1) Code snippet in function
WinGlyphFallbackSubstititution::FindFontSubstitute:
-------------------------------------------------------------------------------
        // last level fallback, check each font type face one by one
    const ImplGetDevFontList* pTestFontList = pDevFontList->GetDevFontList();
    // limit the count of fonts to be checked to prevent hangs
    static const int MAX_GFBFONT_COUNT = 600;
    int nTestFontCount = pTestFontList->Count();
    if( nTestFontCount > MAX_GFBFONT_COUNT )
        nTestFontCount = MAX_GFBFONT_COUNT;

    for( int i = 0; i < nTestFontCount; ++i )
    {
        const ImplFontData* pFace = pTestFontList->Get( i );
        if( !HasMissingChars( pFace, rMissingChars ) )
            continue;
        rFontSelData.maSearchName = pFace->maName;
        return true;
    }

    return false;

(2)Memory Leak :
--------------------------------------------------------------------------------
The pTestFontList will be created in function
ImplDevFontList::GetDevFontList(), which will new an object typed
ImplGetDevFontList on heap. The pTestFontList will not be released when return
from function WinGlyphFallbackSubstititution::FindFontSubstitute

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 119997] [MemoryLeak]There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=119997

jsc@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsc@apache.org
              Flags|3.4.1_release_blocker?      |3.4.1_release_blocker+

--- Comment #6 from jsc@apache.org ---
set release blocker flag for 3.4.1

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 119997] [MemoryLeak]There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=119997

hdu@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|AOO 3.5.0                   |AOO 3.4.1

--- Comment #7 from hdu@apache.org ---
Also applied ChaoHuang's patch for AOO 3.4.1 as revision 1356233

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 119997] [MemoryLeak]There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=119997

Yan Ji <ya...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |121366

-- 
You are receiving this mail because:
You are on the CC list for the bug.

3.4.1_release_blocker requested: [Bug 119997] There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
hdu@apache.org has asked  for 3.4.1_release_blocker:
Bug 119997: There is a memory leak in function
WinGlyphFallbackSubstititution::FindFontSubstitute
https://issues.apache.org/ooo/show_bug.cgi?id=119997


------- Additional Comments from hdu@apache.org
Thanks for the find and for the patch! Applied as rev 1350553 with minor style
adaptions to surrounding code.

In the future there is potential for more performance gains when
GetDevFontList() gets modified to return a read-only reference of the list.

[Bug 119997] There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=119997

--- Comment #2 from ChaoHuang <ch...@gmail.com> ---
Need to free pTestFontList explicitly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 119997] [MemoryLeak]There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=119997

Yan Ji <ya...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

--- Comment #8 from Yan Ji <ya...@gmail.com> ---
Since last SVT(r1400866) shows there is no memory leak, so close this defect as
resolved.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 119997] There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=119997

hdu@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |hdu@apache.org
         Resolution|---                         |FIXED
   Target Milestone|not determined              |OOo 3.5
              Flags|                            |3.4.1_release_blocker?

--- Comment #4 from hdu@apache.org ---
Thanks for the find and for the patch! Applied as rev 1350553 with minor style
adaptions to surrounding code.

In the future there is potential for more performance gains when
GetDevFontList() gets modified to return a read-only reference of the list.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 119997] There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=119997

--- Comment #3 from ChaoHuang <ch...@gmail.com> ---
Created attachment 78338
  --> https://issues.apache.org/ooo/attachment.cgi?id=78338&action=edit
for file "main\vcl\win\source\gdi\salgdi3.cxx"

-- 
You are receiving this mail because:
You are on the CC list for the bug.

3.4.1_release_blocker granted: [Bug 119997] [MemoryLeak]There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
jsc@apache.org has granted hdu@apache.org's request for 3.4.1_release_blocker:
Bug 119997: [MemoryLeak]There is a memory leak in function
WinGlyphFallbackSubstititution::FindFontSubstitute
https://issues.apache.org/ooo/show_bug.cgi?id=119997


------- Additional Comments from jsc@apache.org
set release blocker flag for 3.4.1

[Bug 119997] [MemoryLeak]There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=119997

--- Comment #5 from Li Feng Wang <ph...@gmail.com> ---
add MemoryLeak tag for this defect.
Need long time running to verify.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 119997] There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=119997

--- Comment #1 from ChaoHuang <ch...@gmail.com> ---
Steps to reproduce the issue:
1) Launch Aoo3.4
2) New a odt file
3) Close the odt file

Defect : There is a memory leak in function
WinGlyphFallbackSubstititution::FindFontSubstitute

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 119997] There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=119997

ChaoHuang <ch...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|All                         |Windows, all

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 119997] [From Symphony] [MemoryLeak]There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=119997

Shenfeng Liu <li...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |liushenf@gmail.com
            Summary|[MemoryLeak]There is a      |[From Symphony]
                   |memory leak in function     |[MemoryLeak]There is a
                   |WinGlyphFallbackSubstititut |memory leak in function
                   |ion::FindFontSubstitute     |WinGlyphFallbackSubstititut
                   |                            |ion::FindFontSubstitute

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 119997] [MemoryLeak]There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=119997

Li Feng Wang <ph...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |phoenix.wanglf@gmail.com
            Summary|There is a memory leak in   |[MemoryLeak]There is a
                   |function                    |memory leak in function
                   |WinGlyphFallbackSubstititut |WinGlyphFallbackSubstititut
                   |ion::FindFontSubstitute     |ion::FindFontSubstitute

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 119997] [MemoryLeak]There is a memory leak in function WinGlyphFallbackSubstititution::FindFontSubstitute

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=119997

zhang jianfang <zh...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |120975

-- 
You are receiving this mail because:
You are on the CC list for the bug.