[Libreoffice-bugs] [Bug 111561] IOHIDDeviceClass::setElementDictIntValue() leaks memory

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

--- Comment #14 from Alex Thurgood  ---
That points to :

- (void) startListening: (id) sender {
(void)sender;
if ([self isListeningToRemote]) return;


at lines 147-149 in HIDRemoteControlDevice.m

-- 
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 111561] IOHIDDeviceClass::setElementDictIntValue() leaks memory

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

--- Comment #13 from Alex Thurgood  ---
See also lines 109-115 of RemoteControlContainer.m :

- (void) startListening: (id) sender {
#ifdef DEBUG
NSLog(@"Apple Remote: start listening to events... ");
#endif
for(NSUInteger i=0; i < [remoteControls count]; i++) {
[[remoteControls objectAtIndex: i] startListening: sender];
}

where the line :

[[remoteControls objectAtIndex: i] startListening: sender];


is identified as a leak point.

-- 
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 111561] IOHIDDeviceClass::setElementDictIntValue() leaks memory

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

--- Comment #12 from Alex Thurgood  ---
Trace of calls leading to leak :



   9 libAppleRemotelo.dylib -[HIDRemoteControlDevice(IOKitMethods)
initializeCookies]
/Users/Shared/LO/core/apple_remote/source/HIDRemoteControlDevice.m:423
  10 libAppleRemotelo.dylib -[HIDRemoteControlDevice startListening:]
/Users/Shared/LO/core/apple_remote/source/HIDRemoteControlDevice.m:180
  11 libAppleRemotelo.dylib -[RemoteControlContainer startListening:]
/Users/Shared/LO/core/apple_remote/source/RemoteControlContainer.m:114
  12 libvcllo.dylib -[VCL_NSApplication applicationWillBecomeActive:]
/Users/Shared/LO/core/vcl/osx/vclnsapp.mm:504

-- 
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 111561] IOHIDDeviceClass::setElementDictIntValue() leaks memory

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

--- Comment #11 from Alex Thurgood  ---
Created attachment 135642
  --> https://bugs.documentfoundation.org/attachment.cgi?id=135642&action=edit
Leak cycle graph for CFArray management

I am enclosing a leak cycle graph for the CFArray management code cycle

-- 
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 111561] IOHIDDeviceClass::setElementDictIntValue() leaks memory

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

--- Comment #10 from Alex Thurgood  ---
It seems that the problems are indeed linked to AppleRemote handling code :

success = (*handle)->copyMatchingElements(handle, NULL,
(CFArrayRef*)&elements);


line 423 of HIDRemoteCotnrolDevice.m

-- 
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 111561] IOHIDDeviceClass::setElementDictIntValue() leaks memory

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

--- Comment #8 from Alex Thurgood  ---
(In reply to Julien Nabet from comment #6)


> BTW, would it be possible to have a bt of something similar to know where
> it's called in LO?

I'll have a look.

-- 
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 111561] IOHIDDeviceClass::setElementDictIntValue() leaks memory

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

--- Comment #7 from Alex Thurgood  ---
Perhaps this is linked to my input devices on this machine, I honestly don't
know, as IOHIDDeviceClass is supposed to relate to USB and other connected
hardware devices ? Whether this is due to a keyboard input (I use an Apple
wireless keyboard on my test machine), or the USB mouse, or the display refresh
? No idea unfortunately.

-- 
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 111561] IOHIDDeviceClass::setElementDictIntValue() leaks memory

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

--- Comment #6 from Julien Nabet  ---
I don't know what can be done here since it's Apple code.
Moreover, I'm not sure there's a leak in this part of code.
Perhaps it just shows that fonts are loaded in memory when scrolling and it's
kept in cache.
To test, you can scroll once the whole dropdown font list.
Then you scroll again to see if consumed memory increases.

BTW, would it be possible to have a bt of something similar to know where it's
called in LO?

-- 
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 111561] IOHIDDeviceClass::setElementDictIntValue() leaks memory

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

Alex Thurgood  changed:

   What|Removed |Added

 CC||serval2...@yahoo.fr

--- Comment #5 from Alex Thurgood  ---
@Julien : not sure if you can do anything about this one ?

-- 
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 111561] IOHIDDeviceClass::setElementDictIntValue() leaks memory

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

--- Comment #4 from Alex Thurgood  ---
and here :

CFTypeRef IOHIDDeviceClass::createElement(CFDataRef data, IOHIDElementStruct *
element, uint32_t index, CFTypeRef parentElement, CFMutableDictionaryRef
elementCache, bool * isElementCached, IOOptionBits options)
{
CFTypeRef   type = 0;
CFNumberRef key = 0;
uint32_tcookie = element->cookieMin + index;

if ( elementCache )
{
key = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &cookie);

if ( key )
{
type = CFDictionaryGetValue(elementCache, key);

if ( type )
{
if (isElementCached)
*isElementCached = true;

CFRetain(type);
CFRelease(key);

return type;
}
}
}

-- 
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 111561] IOHIDDeviceClass::setElementDictIntValue() leaks memory

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

--- Comment #3 from Alex Thurgood  ---
From 

https://github.com/st3fan/osx-10.9/blob/master/IOHIDFamily-503.1.13/IOHIDLib/IOHIDDeviceClass.cpp


it appears to be this section of code:

void IOHIDDeviceClass::setElementDictIntValue(CFMutableDictionaryRef element,
CFStringRef key, uint32_t value)
{
CFNumberRef number = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType,
&value);

if ( !number )
return;

CFDictionarySetValue(element, key, number);
CFRelease(number);
}

-- 
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 111561] IOHIDDeviceClass::setElementDictIntValue() leaks memory

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

--- Comment #2 from Alex Thurgood  ---
>From what I understand, this relates to :

https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-700/IOHIDLib/IOHIDDeviceClass.cpp.auto.html


which is Apple's code.

-- 
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 111561] IOHIDDeviceClass::setElementDictIntValue() leaks memory

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

--- Comment #1 from Alex Thurgood  ---
Created attachment 135350
  --> https://bugs.documentfoundation.org/attachment.cgi?id=135350&action=edit
Screenshot of Instruments.app showing memory leaks

A screenshot of the number of leaks occurring is enclosed

-- 
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