[Libreoffice-bugs] [Bug 111893] New: initNSApp() leaks memory

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Aug 18 07:30:18 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=111893

            Bug ID: 111893
           Summary: initNSApp() leaks memory
           Product: LibreOffice
           Version: 6.0.0.0.alpha0+ Master
          Hardware: x86-64 (AMD64)
                OS: Mac OS X (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: iplaw67 at tuta.io

Description:
initNSApp() leaks memory when LibreOffice is started.

Steps to Reproduce:
1. Start XCode, then Instruments.app
2. Choose Memory Leak profile tool
3. Select LibreOffice.app in instdir as target process
4. Click on the record button, LODev is started by the profiling tool
5. Wait for the StartCenter to load.
6. Close the StartCenter window
7. Stop recording.
8. Analyse the profile trace.


Actual Results:  
Memory leak due to incorrect ref count not releasing memory on closure.

Expected Results:
Should not leak memory


Reproducible: Always

User Profile Reset: No

Additional Info:
The code at issue is here lines 200-214 in salinst.cxx:

    initNSApp();

    OUString aExeURL, aExe;
    osl_getExecutableFile( &aExeURL.pData );
    osl_getSystemPathFromFileURL( aExeURL.pData, &aExe.pData );
    OString aByteExe( OUStringToOString( aExe, osl_getThreadTextEncoding() ) );

#ifdef DEBUG
    aByteExe += OString ( " NSAccessibilityDebugLogLevel 1" );
    const char* pArgv[] = { aByteExe.getStr(), NULL };
    NSApplicationMain( 3, pArgv );
#else
    const char* pArgv[] = { aByteExe.getStr(), nullptr };
    NSApplicationMain( 1, pArgv );
#endif


with the leaks occurring in particular here :

    initNSApp();
and
    NSApplicationMain( 1, pArgv );




User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0)
Gecko/20100101 Firefox/54.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170818/fb45f173/attachment.html>


More information about the Libreoffice-bugs mailing list