Bug 112425 - libMacOSXSpelllo.dylib MacSpellChecker::GetSpellFailure is leaking memory with multiple invocations
Summary: libMacOSXSpelllo.dylib MacSpellChecker::GetSpellFailure is leaking memory wit...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All macOS (All)
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:6.0.0 target:5.4.3
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-16 09:28 UTC by Telesto
Modified: 2017-09-24 15:24 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
BT & a few screenshots (1016.93 KB, application/x-zip-compressed)
2017-09-16 09:28 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-09-16 09:28:01 UTC
Description:
libMacOSXSpelllo.dylib MacSpellChecker::GetSpellFailureis) leaks memory with multiple invocations

Steps to Reproduce:
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. Type some text, correct & wrongly spelled. Right click the wrong spelled words.
10. Close the Writer file without saving.
11. Stop recording.
12. Analyse the profile trace.

Actual Results:  
libMacOSXSpelllo.dylib MacSpellChecker::GetSpellFailureis leaking memory

Expected Results:
Shouldn't happen


Reproducible: Always

User Profile Reset: No

Additional Info:
Version: 6.0.0.0.alpha0+
Build ID: e038dfdf05096edc0e9c38c9a686b5d23ba39352
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2017-09-14_23:35:41
Locale: nl-NL (nl_NL.UTF-8); Calc: group



User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Telesto 2017-09-16 09:28:54 UTC
Created attachment 136281 [details]
BT & a few screenshots
Comment 2 Julien Nabet 2017-09-16 20:38:56 UTC
I submitted a patch to review here: https://gerrit.libreoffice.org/#/c/42361/
Comment 3 Commit Notification 2017-09-16 20:56:11 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#112425: fix leak in MacSpellChecker

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 4 Julien Nabet 2017-09-16 20:57:52 UTC
Telesto: I had another leak from Instruments. Anyway, hope it's better with this patch. I'm eager to get feedback about this one.
Comment 5 Telesto 2017-09-17 16:05:48 UTC
(In reply to Julien Nabet from comment #4)
> Telesto: I had another leak from Instruments. Anyway, hope it's better with
> this patch. I'm eager to get feedback about this one.

libMacOSXSpelllo.dylib MacSpellChecker::GetSpellFailure is gone =). So fixed.
There is still a small leak in MacSpellChecker::GetProposals, but it seemed less problematic to me (because it didn't happen that often).. I can report it if you wish 

Anyway, thanks!
Comment 6 Commit Notification 2017-09-17 22:13:01 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

Related tdf#112425: fix another leak in MacSpellChecker

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 7 Julien Nabet 2017-09-18 12:20:54 UTC
Telesto: I tried to fix the other leak, I let you test when you got time.
Comment 8 Telesto 2017-09-24 08:31:31 UTC
(In reply to Julien Nabet from comment #7)
> Telesto: I tried to fix the other leak, I let you test when you got time.

No repro anymore :-)
Comment 9 Julien Nabet 2017-09-24 08:52:59 UTC
Great! :-)
I submitted for review https://gerrit.libreoffice.org/#/c/42703/1 for 5.4 branch but don't know if it'll be accepted since it's not a crash and has no visible symptom on LO (obviously the symptom is to see the memory increasing without decreasing when you use a mem monitor).
Let's put this one to FIXED anyway.
Comment 10 Commit Notification 2017-09-24 15:24:20 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=635ea3a8f12e3e7b0cc4283126e67b1057810029&h=libreoffice-5-4

tdf#112425: fix 2 leaks in MacSpellChecker

It will be available in 5.4.3.

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.