Issue 116891 - framework::AddonMenuManager::BuildMenu leaks MenuConfiguration::Attributes
Summary: framework::AddonMenuManager::BuildMenu leaks MenuConfiguration::Attributes
Status: CONFIRMED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: DEV300m99
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-09 14:45 UTC by Stephan Bergmann
Modified: 2013-01-29 21:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Stephan Bergmann 2011-02-09 14:45:22 UTC
At least on DEV300_m99-based CWS sb140, unxlngi6 non-pro, running soffice under
valgrind --leak-check=full with an org.openofice.test.OfficeConnection-based
test that simply calls OfficeConnection.setUp() immediately followed by
OfficeConnection.tearDown(), valgrind reports

46 (24 direct, 22 indirect) bytes in 1 blocks are definitely lost in loss record
3,069 of 4,972
   at 0x4025F20: malloc (vg_replace_malloc.c:236)
   by 0x4085590: rtl_allocateMemory (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/ure/lib/libuno_sal.so.3)
   by 0x80490C9: allocate(unsigned int, (anonymous namespace)::AllocatorTraits
const&) (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org3/program/soffice.bin)
   by 0x804919D: operator new(unsigned int) (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org3/program/soffice.bin)
   by 0x62B71DD: framework::AddonMenuManager::BuildMenu(PopupMenu*,
framework::AddonMenuManager::MenuType, unsigned short, unsigned short&,
com::sun::star::uno::Sequence<com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
>, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&,
com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&) (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libfweli.so)
   by 0x62B755E:
framework::AddonMenuManager::MergeAddonHelpMenu(com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&, MenuBar*) (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libfweli.so)
   by 0xD511FD6: framework::MenuBarManager::FillMenuManager(Menu*,
com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&,
com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&,
rtl::OUString const&, unsigned char, unsigned char) (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libfwkli.so)
   by 0xD511188:
framework::MenuBarManager::MenuBarManager(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>
const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&,
com::sun::star::uno::Reference<com::sun::star::util::XURLTransformer> const&,
com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&,
rtl::OUString const&, Menu*, unsigned char, unsigned char) (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libfwkli.so)
   by 0xD518931:
framework::MenuBarWrapper::initialize(com::sun::star::uno::Sequence<com::sun::star::uno::Any>
const&) (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libfwkli.so)
   by 0xD53FB34: framework::MenuBarFactory::CreateUIElement(rtl::OUString
const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&, char const*, char const*,
com::sun::star::uno::Reference<com::sun::star::ui::XUIElement> const&,
com::sun::star::uno::Reference<com::sun::star::frame::XModuleManager> const&,
com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>
const&) (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libfwkli.so)
   by 0xD53FD70: framework::MenuBarFactory::createUIElement(rtl::OUString
const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libfwkli.so)
   by 0xD5452D9:
framework::UIElementFactoryManager::createUIElement(rtl::OUString const&,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libfwkli.so)
   by 0xD45310D: framework::LayoutManager::implts_createElement(rtl::OUString
const&) (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libfwkli.so)
   by 0xD458903: framework::LayoutManager::createElement(rtl::OUString const&)
(in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libfwkli.so)
   by 0xD490F18:
framework::BackingComp::attachFrame(com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&) (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libfwkli.so)
   by 0x423A9B4: desktop::Desktop::Main() (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libsofficeapp.so)
   by 0x59C8895: ImplSVMain() (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libvclli.so)
   by 0x59C8A34: SVMain() (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libvclli.so)
   by 0x42664E3: soffice_main (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org/basis3.4/program/libsofficeapp.so)
   by 0x8048E29: sal_main (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org3/program/soffice.bin)
   by 0x8048E0A: main (in
/cws/sb140_m99/DEV300/unxlngi6/installation/opt/openoffice.org3/program/soffice.bin)

The reason is that at
<http://hg.services.openoffice.org/DEV300/file/dae1ffc5c15d/framework/source/fwe/classes/addonmenu.cxx#l393>
pCurrentMenu is of type PopupMenu, not framework::AddonMenu, so that deleting
the user attributes at
<http://hg.services.openoffice.org/DEV300/file/dae1ffc5c15d/framework/source/fwe/classes/addonmenu.cxx#l87>
does not happen.