[Libreoffice-bugs] [Bug 111432] AddTempDevFont(const OUString& rFontFileURL) leaks memory on invocation

2017-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111432

Julien Nabet  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|libreoffice-b...@lists.free |serval2...@yahoo.fr
   |desktop.org |

--- Comment #11 from Julien Nabet  ---
I give it a try with https://gerrit.libreoffice.org/#/c/40845/

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111432] AddTempDevFont(const OUString& rFontFileURL) leaks memory on invocation

2017-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111432

--- Comment #10 from Julien Nabet  ---
https://opengrok.libreoffice.org/xref/core/vcl/quartz/salgdi.cxx#288

288  static bool AddTempDevFont(const OUString& rFontFileURL)
289  {
290  OUString aUSytemPath;
291  OSL_VERIFY( !osl::FileBase::getSystemPathFromFileURL( rFontFileURL,
aUSytemPath ) );
292  OString aCFileName = OUStringToOString( aUSytemPath,
RTL_TEXTENCODING_UTF8 );
293  
294  CFStringRef rFontPath = CFStringCreateWithCString(nullptr,
aCFileName.getStr(), kCFStringEncodingUTF8);
295  CFURLRef rFontURL = CFURLCreateWithFileSystemPath(nullptr, rFontPath,
kCFURLPOSIXPathStyle, true);
296  
297  CFErrorRef error;
298  bool success = CTFontManagerRegisterFontsForURL(rFontURL,
kCTFontManagerScopeProcess, );
299  if (!success)
300  {
301  CFRelease(error);
302  }
303  
304  return success;
305  }

rFontPath and rFontURL  should be released with this just before the return:
CFRelease( rFontPath );
CFRelease( rFontURL  )
I'll take this one.

Alex: if you build from sources, could you give it a try? (1: does it build, 2:
does it help for memory consumption)
Indeed, I won't be able to test before getting back to home after my daytime
job.

BTW, great tool! :-)

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111432] AddTempDevFont(const OUString& rFontFileURL) leaks memory on invocation

2017-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111432

Telesto  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 CC||tele...@surfxs.nl
 Ever confirmed|0   |1

--- Comment #9 from Telesto  ---
Confirming. See the attachment link posted here: bug 99784 comment 86

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111432] AddTempDevFont(const OUString& rFontFileURL) leaks memory on invocation

2017-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111432

--- Comment #8 from Alex Thurgood  ---
Similarly, the call to 

CTFontDescriptorRef pDesc = CTFontCopyFontDescriptor(pFallback);

at line 80 of salgdi.cxx in the CFDictionary object.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111432] AddTempDevFont(const OUString& rFontFileURL) leaks memory on invocation

2017-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111432

--- Comment #7 from Alex Thurgood  ---
Created attachment 135206
  --> https://bugs.documentfoundation.org/attachment.cgi?id=135206=edit
Ref count screenshot in NSURL

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111432] AddTempDevFont(const OUString& rFontFileURL) leaks memory on invocation

2017-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111432

--- Comment #6 from Alex Thurgood  ---
In NSURL, similar leaks are occurring, cf. enclosed screenshot of refcounts.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111432] AddTempDevFont(const OUString& rFontFileURL) leaks memory on invocation

2017-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111432

--- Comment #5 from Alex Thurgood  ---
Created attachment 135205
  --> https://bugs.documentfoundation.org/attachment.cgi?id=135205=edit
Screenshot of Instruments memory leak profile analysis

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111432] AddTempDevFont(const OUString& rFontFileURL) leaks memory on invocation

2017-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111432

--- Comment #4 from Alex Thurgood  ---
On startup, there are 101 occurrences of this on Mac OS. I assume that this
corresponds to the number of fonts on the system ?

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111432] AddTempDevFont(const OUString& rFontFileURL) leaks memory on invocation

2017-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111432

--- Comment #3 from Alex Thurgood  ---
Similarly, at line 321 in salgdi.cxx :

AddTempDevFont(aFileStatus.getFileURL());

a leak of 288 bytes

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111432] AddTempDevFont(const OUString& rFontFileURL) leaks memory on invocation

2017-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111432

Alex Thurgood  changed:

   What|Removed |Added

 CC||khaledho...@eglug.org

--- Comment #2 from Alex Thurgood  ---
@khaled : thought you might be interested

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 111432] AddTempDevFont(const OUString& rFontFileURL) leaks memory on invocation

2017-08-07 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=111432

--- Comment #1 from Alex Thurgood  ---
In this particular instance the code invoked is in salgdi.cxx, with the leaks
occuring here :

CFStringRef rFontPath = CFStringCreateWithCString(nullptr,
aCFileName.getStr(), kCFStringEncodingUTF8); - 101 byte leak


CFURLRef rFontURL = CFURLCreateWithFileSystemPath(nullptr, rFontPath,
kCFURLPOSIXPathStyle, true); - 197 byte leak

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs