Bug 112605 - [NSTimer(NSTimer) scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:] leaks with multiple invocations
Summary: [NSTimer(NSTimer) scheduledTimerWithTimeInterval:target:selector:userInfo:rep...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-24 08:04 UTC by Telesto
Modified: 2017-11-13 08:58 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
BT & Few screenshots (2.14 MB, application/x-zip-compressed)
2017-09-24 08:05 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-09-24 08:04:23 UTC
Description:
[NSTimer(NSTimer) scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:] with multiple invocations 

and 
[NSCFTimer initWithFireDate:interval:target:selector:userInfo:repeats:]

are leaking memory on multiple invocations. 

Steps to Reproduce:
1. Start 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. Click on the new Writer document icon to open a blank Writer document.
7. Open the Format -> Character dialog
8. Close it again
9. Stop recording.
10. Analyse the profile trace.


Actual Results:  
[NSTimer(NSTimer) scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:] with multiple invocations 

and 
[NSCFTimer initWithFireDate:interval:target:selector:userInfo:repeats:]

are leaking memory on multiple invocations. 

Expected Results:
Probably no leak


Reproducible: Always

User Profile Reset: No

Additional Info:
Version: 6.0.0.0.alpha0+
Build ID: 09995c09f78e245f717bf0560680b832f2f73967
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; 
Locale: en-US (en_US.UTF-8); Calc: group

3 Foundation -[NSCFTimer initWithFireDate:interval:target:selector:userInfo:repeats:]
4 Foundation +[NSTimer(NSTimer) scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:]
5 libvcllo.dylib ImplSalStartTimer(unsigned long) /Users/demo/lode/dev/core/vcl/osx/saltimer.cxx:107
6 libvcllo.dylib AquaSalTimer::Start(unsigned long) /Users/demo/lode/dev/core/vcl/osx/saltimer.cxx:164


User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Telesto 2017-09-24 08:05:13 UTC
Created attachment 136504 [details]
BT & Few screenshots
Comment 2 Alex Thurgood 2017-09-26 15:07:57 UTC
Confirming on

Version: 6.0.0.0.alpha0+
Build ID: 80d135922d5a5d0fd0d7178935653870cecf58ea
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group
Comment 3 Alex Thurgood 2017-09-26 15:09:50 UTC
@Jan Marek : any ideas ?
Comment 4 Commit Notification 2017-09-29 17:09:00 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a60f687b5dd684260fc976c1216d65d30e77e5de

tdf#112605 OSX refactor SalAquaTimer

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Telesto 2017-10-13 18:07:15 UTC
Works like a charm :-)
Comment 6 Xisco Faulí 2017-11-13 08:48:52 UTC
A polite ping to Jan-Marek Glogowski: is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Thanks