https://bugs.freedesktop.org/show_bug.cgi?id=41288

           Summary: undefined: Memory leaks when open, get document text
                    and close document by UNO
           Product: LibreOffice
           Version: LibO 3.4.3 release
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
 Status Whiteboard: BSA
          Severity: normal
          Priority: medium
         Component: Libreoffice
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Problem description:
Memory leaks in LibreOffice when I just open, get document text and close
document several times using python-uno. But I think it is not problem of
Python UNO but LibreOffice itself. All test was done on Ubuntu 11.04 +
LibreOffice 3.4.3 + python-uno + python 2.7.1. I put the python code below just
in case. Also I found that for GSOC 2011 one of ideas was "Search for, and fix
memory and resource leaks"
(http://wiki.documentfoundation.org/Development/Gsoc/Ideas#Search_for.2C_and_fix_memory_and_resource_leaks).
It is why I think the problem is in libreoffice.

Steps to reproduce:
1. Start libreoffice in terminal without gui using following command:
libreoffice
--accept=socket,host=localhost,port=2002;urp;StarOffice.ServiceManager
--norestore --nofirststartwizard --nologo --headless
2. In second terminal I starts python code to open some file, get text and
close it several time
3. Using 'top' command I see that memory that libreoffice use is growing and
growing.

Expected behavior:
Without memory leaks.

Minimum python code to reproduce problem (may be it helps):

import uno

local = uno.getComponentContext()
resolver = local.ServiceManager.createInstanceWithContext(
                  "com.sun.star.bridge.UnoUrlResolver", local)
context = resolver.resolve(
               
'uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext')
desktop = context.ServiceManager.createInstanceWithContext(
        "com.sun.star.frame.Desktop", context)

for i in range(1000):
    doc = desktop.loadComponentFromURL('some_url', "_blank", 0, ())
    plain_text = doc.Text.getString()
    doc.dispose()
    doc.close(False)
    del doc

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to