<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - initNSApp() leaks memory"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=111893">111893</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>initNSApp() leaks memory
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>6.0.0.0.alpha0+ Master
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Mac OS X (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>iplaw67@tuta.io
</td>
</tr></table>
<p>
<div>
<pre>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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>