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

Lionel Elie Mamane <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[email protected] |[email protected]
                   |desktop.org                 |
                 CC|                            |[email protected]

--- Comment #7 from Lionel Elie Mamane <[email protected]> ---
Stephan? Could you please take a look at this? It looks related to the new
unoidl module, which git log tells me is basically your code.

So, what happens is that
 cppuhelper::TypeManager::getByHierarchicalName (this=0x18b6d80,
aName="com.sun.star.report.ForceNewPage")
returns a descriptor where the constants are not anymore in a strictly
increasing order, but offset by two (value 2, 3, 0, 1 instead of value 0, 1, 2,
3) 

Here is how it gets to unoidl:

#0  unoidl::UnoidlProvider::find (this=0x18ad260,
name="com.sun.star.report.ForceNewPage", constant=0x7f0e0e6b2b1b)
    at
/home/master/src/libreoffice/workdirs/master/unoidl/source/unoidlprovider.cxx:1239
#1  0x00007f0e37800699 in unoidl::UnoidlProvider::findEntity (this=0x18ad260,
name="com.sun.star.report.ForceNewPage")
    at
/home/master/src/libreoffice/workdirs/master/unoidl/source/unoidlprovider.cxx:1209
#2  0x00007f0e377f2fd6 in unoidl::Manager::findEntity (this=0x18b69b0,
name="com.sun.star.report.ForceNewPage")
    at
/home/master/src/libreoffice/workdirs/master/unoidl/source/unoidl.cxx:131
#3  0x00007f0e3c13eed6 in cppuhelper::TypeManager::findEntity (this=0x18b6d80,
name="com.sun.star.report.ForceNewPage")
    at
/home/master/src/libreoffice/workdirs/master/cppuhelper/source/typemanager.cxx:2376
#4  0x00007f0e3c13b7c8 in cppuhelper::TypeManager::find (this=0x18b6d80,
name="com.sun.star.report.ForceNewPage")
    at
/home/master/src/libreoffice/workdirs/master/cppuhelper/source/typemanager.cxx:1919
#5  0x00007f0e3c13bf54 in cppuhelper::TypeManager::getByHierarchicalName
(this=0x18b6d80, aName="com.sun.star.report.ForceNewPage")
    at
/home/master/src/libreoffice/workdirs/master/cppuhelper/source/typemanager.cxx:1989
#6  0x00007f0e0e834f88 in pcr::StringRepresentation::initialize
(this=0x304d5e0, aArguments=uno::Sequence of length 3 = {...})
    at
/home/master/src/libreoffice/workdirs/master/extensions/source/propctrlr/stringrepresentation.cxx:246
#7  0x00007f0e3c0ac275 in
cppu::OSingleFactoryHelper::createInstanceWithArgumentsAndContext
(this=0x377ae68, 
    rArguments=uno::Sequence of length 3 = {...}, xContext=uno::Reference to
(cppu::ComponentContext *) 0x3675ce0)
    at
/home/master/src/libreoffice/workdirs/master/cppuhelper/source/factory.cxx:218


*but* pcr::StringRepresentation::convertSimpleToString
very much assumes that its m_aConstants and m_aValues are in the same order.
m_aValues is in "strictly increasing" order, but m_aConstants comes from 
cppuhelper::TypeManager::getByHierarchicalName("com.sun.star.report.ForceNewPage")->getConstants()
while m_aValues comes from the initialiser of pcr::StringRepresentation (and is
in strictly increasing value order).

The same holds for pcr::StringRepresentation::convertStringToSimple

Here's how the last one is invoked:

#0  pcr::StringRepresentation::convertStringToSimple (this=0x3484c10,
_rValue="Before & After Section", 
    _ePropertyType=@0x7f0e0e6b31bc: com::sun::star::uno::TypeClass_SHORT)
    at
/home/master/src/libreoffice/workdirs/master/extensions/source/propctrlr/stringrepresentation.cxx:457
#1  0x00007f0e0e834b6f in pcr::StringRepresentation::convertToPropertyValue
(this=0x3484c10, ControlValue="Before & After Section", 
    ControlValueType=invalid uno::Type)
    at
/home/master/src/libreoffice/workdirs/master/extensions/source/propctrlr/stringrepresentation.cxx:199
#2  0x00007f0e0f10aa48 in rptui::GeometryHandler::getConstantValue
(this=0x2d8a9e0, _bToControlValue=0 '\000', _nResId=30769, 
    _aValue=uno::Any "Before & After Section",
_sConstantName="com.sun.star.report.ForceNewPage", PropertyName="ForceNewPage")
    at
/home/master/src/libreoffice/workdirs/master/reportdesign/source/ui/inspection/GeometryHandler.cxx:955
#3  0x00007f0e0f10acd9 in rptui::GeometryHandler::convertToPropertyValue
(this=0x2d8a9e0, PropertyName="ForceNewPage", 
    _rControlValue=uno::Any "Before & After Section")
    at
/home/master/src/libreoffice/workdirs/master/reportdesign/source/ui/inspection/GeometryHandler.cxx:968
#4  0x00007f0e0e72230d in pcr::OBrowserListBox::impl_getControlAsPropertyValue
(this=0x3849490, _rLine=...)
    at
/home/master/src/libreoffice/workdirs/master/extensions/source/propctrlr/browserlistbox.cxx:955
#5  0x00007f0e0e72287c in pcr::OBrowserListBox::valueChanged (this=0x3849490,
_rxControl=
    uno::Reference to (pcr::OListboxControl *) 0x37b5280)
    at
/home/master/src/libreoffice/workdirs/master/extensions/source/propctrlr/browserlistbox.cxx:1011
#6  0x00007f0e0e71eed8 in
pcr::PropertyControlContext_Impl::impl_processEvent_throw (this=0x391f3c0,
_rEvent=...)
    at
/home/master/src/libreoffice/workdirs/master/extensions/source/propctrlr/browserlistbox.cxx:337
#7  0x00007f0e0e71ed4b in pcr::PropertyControlContext_Impl::processEvent
(this=0x391f3c0, _rEvent=...)
    at
/home/master/src/libreoffice/workdirs/master/extensions/source/propctrlr/browserlistbox.cxx:315
#8  0x00007f0e3c790d86 in comphelper::AsyncEventNotifier::execute
(this=0x34db400)
    at
/home/master/src/libreoffice/workdirs/master/comphelper/source/misc/asyncnotification.cxx:221
#9  0x00007f0e3b9d9a58 in salhelper::Thread::run (this=0x34db400)
    at
/home/master/src/libreoffice/workdirs/master/salhelper/source/thread.cxx:40
#10 0x00007f0e3b9d9e2d in osl::threadFunc (param=0x34db410) at
/home/master/src/libreoffice/workdirs/master/include/osl/thread.hxx:187
#11 0x00007f0e3e06f79f in osl_thread_start_Impl (pData=0x34d9740) at
/home/master/src/libreoffice/workdirs/master/sal/osl/unx/thread.c:251
#12 0x00007f0e3d798e0e in start_thread (arg=0x7f0e0e6b4700) at
pthread_create.c:311
#13 0x00007f0e3da9595d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:113



The m_aValues itself comes from rptui::GeometryHandler::getConstantValue; file
reportdesign/source/ui/inspection/GeometryHandler.cxx, starting line 940 (in
master):

  ::std::vector< OUString > aList;
  tools::StringListResource aRes(ModuleRes(_nResId),aList);
  uno::Sequence< OUString > aSeq(aList.size());
  ::std::copy( aList.begin(), aList.end(), aSeq.getArray() );

which is then passed to
com::sun::star::inspection::StringRepresentation::createConstant, which sticks
it in the third element of the rArguments argument to
stoc_smgr::OServiceManagerWrapper::createInstanceWithArgumentsAndContext which
in turns calls
cppuhelper::ServiceManager::createInstanceWithArgumentsAndContext which ends up
in cppu::OSingleFactoryHelper::createInstanceWithArgumentsAndContext, which
passes the arguments array to pcr::StringRepresentation::initialize, which
sticks the third element in m_aValues.

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