Bug 114456 - MACOS: Small memory leaks when discarding document recovery
Summary: MACOS: Small memory leaks when discarding document recovery
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+ Master
Hardware: All Mac OS X (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-14 10:21 UTC by Telesto
Modified: 2018-01-24 14:50 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (433.46 KB, image/png)
2017-12-14 10:23 UTC, Telesto
Details
A leaking backtrace with symbols (4.06 KB, application/zip)
2018-01-24 14:50 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-12-14 10:21:49 UTC
Description:
MACOS: Small memory leaks when discarding document recovery

Steps to Reproduce:
1. Open Writer with multiple (empty) documents
2. Force quite
3. Start the Instruments
4. Choose Memory Leak profile tool
5. Select LibreOffice.app in instdir as target process
6. Click on the record button, LODev is started by the profiling tool
7. Discard the document recovery (and don't save any recovery file)

Actual Results:  
Multiple leaks

Expected Results:
No leaks


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.1.0.0.alpha0+
Build ID: d46dc8e547810208287aab77f0313f1971901464
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2017-12-08_10:35:46
Locale: nl-NL (nl_NL.UTF-8); Calc: group threaded



User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8
Comment 1 Telesto 2017-12-14 10:23:49 UTC
Created attachment 138437 [details]
Screenshot
Comment 2 Telesto 2017-12-14 10:54:34 UTC
Small addition. I'm rather often noticing small leaks (as in this case) when interacting with the GUI:
_DPSNextEvent
NSEventAuxiliary
NSCopyObject
CGEvent	SkyLight SLTypeCreateInstance
_NSLocalEventObserver	NSEvent ddLocalMonitorForEventsMatchingMask:placement:handler:]

I haven't reported them separately, because the responsible library comes from Apple... Or can this be fixed in the LibreOffice code?
Comment 3 Alex Thurgood 2017-12-15 07:32:08 UTC
(In reply to Telesto from comment #2)
> Small addition. I'm rather often noticing small leaks (as in this case) when
> interacting with the GUI:
> _DPSNextEvent
> NSEventAuxiliary
> NSCopyObject
> CGEvent	SkyLight SLTypeCreateInstance
> _NSLocalEventObserver	NSEvent
> ddLocalMonitorForEventsMatchingMask:placement:handler:]
> 
> I haven't reported them separately, because the responsible library comes
> from Apple... Or can this be fixed in the LibreOffice code?

Yes, I have noticed this too. If it is Apple's code, there probably isn't much we can do. When I tried hunting down some of these via Instruments to the source code, I just ended up in the assembler instructions, so there probably isn't anything we can do. If there is Apple code that we include for which the source is available (e.g. because we have included it in our git repo) then at least we could point out to Apple where the problem might lie, but if it just points to some assembler, I'm assuming we're not going to have access to any sort of other source code. Of course, someone competent enough in disassembly might be able to do something with it, but would that go against Apple's Developer T&Cs ?
Comment 4 Xisco Faulí 2018-01-24 09:32:37 UTC Comment hidden (obsolete)
Comment 5 Telesto 2018-01-24 14:50:15 UTC
Created attachment 139332 [details]
A leaking backtrace with symbols

Repro with
Version: 6.1.0.0.alpha0+
Build ID: d1bc14b318c9a412a761d243085da0895a1aed4a
CPU threads: 4; OS: Mac OS X 10.13.1; UI render: default; 
Locale: nl-NL (nl_US.UTF-8); Calc: group threaded