Bug 64587 - SvpSalInstance::CheckTimeout -> ScTable::SetRowHeightRange breaks JunitTest_sc_unoapi sc.ScAccessibleCell::com::sun::star::accessibility::XAccessibleComponent::getSize()
Summary: SvpSalInstance::CheckTimeout -> ScTable::SetRowHeightRange breaks JunitTest_s...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-14 15:03 UTC by Stephan Bergmann
Modified: 2016-10-27 09:47 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Bergmann 2013-05-14 15:03:47 UTC
qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java first calls com.sun.star.accessibility.getBounds and saves the value, and sometime later calls com.sun.star.accessibility.getSize and checks this matches the saved value.  This can fail for the sc.ScAccessibleCell case in JunitTest_sc_unoapi like

> LOG> bounds 105x17 vs. size 105x16
> Method getSize() finished with state FAILED
> LOG> getSize(): PASSED.FAILED
[...]
> ***** State for sc.ScAccessibleCell::com::sun::star::accessibility::XAccessibleComponent ******
> [sc.ScAccessibleCell::com::sun::star::accessibility::XAccessibleComponent::getSize()] is testcode: [getSize()] - PASSED.FAILED
> Whole interface: PASSED.FAILED

The reason is that the main thread asynchronously changes row heights via ScTable::SetRowHeightRange after document creation (see below), and if this happens between the above getBounds and getSize calls then the check fails.

> #2  0x00002aaac713084b in ScTable::SetRowHeightRange(int, int, unsigned short, double, double) () from core/solver/unxlngx6.pro/installation/opt/program/../program/libsclo.so
> #3  0x00002aaac7120d59 in (anonymous namespace)::SetOptimalHeightsToRows((anonymous namespace)::OptimalHeightsFuncObjBase&, ScBitMaskCompressedArray<int, unsigned char>*, int, int, unsigned short, std::vector<unsigned short, std::allocator<unsigned short> > const&, bool) () from core/solver/unxlngx6.pro/installation/opt/program/../program/libsclo.so
> #4  0x00002aaac71254db in ScTable::SetOptimalHeight(int, int, unsigned short, OutputDevice*, double, double, Fraction const&, Fraction const&, bool, ScProgress*, unsigned long) () from core/solver/unxlngx6.pro/installation/opt/program/../program/libsclo.so
> #5  0x00002aaac706e388 in ScDocument::SetOptimalHeight(int, int, short, unsigned short, OutputDevice*, double, double, Fraction const&, Fraction const&, bool) () from core/solver/unxlngx6.pro/installation/opt/program/../program/libsclo.so
> #6  0x00002aaac7699746 in ScViewFunc::AdjustBlockHeight(unsigned char, ScMarkData*) () from core/solver/unxlngx6.pro/installation/opt/program/../program/libsclo.so
> #7  0x00002aaac76bab18 in ScViewFunc::UpdateSelectionArea(ScMarkData const&, ScPatternAttr*) () from core/solver/unxlngx6.pro/installation/opt/program/../program/libsclo.so
> #8  0x00002aaac75fb3fa in ScFormatShell::ExecuteAttr(SfxRequest&) () from core/solver/unxlngx6.pro/installation/opt/program/../program/libsclo.so
> #9  0x00002aaaac2dd724 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) () from core/solver/unxlngx6.pro/installation/opt/program/libsfxlo.so
> #10 0x00002aaaac2d6ec3 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, unsigned char) () from core/solver/unxlngx6.pro/installation/opt/program/libsfxlo.so
> #11 0x00002aaaac2d8b59 in SfxDispatcher::_Execute(SfxShell&, SfxSlot const&, SfxRequest&, unsigned short) () from core/solver/unxlngx6.pro/installation/opt/program/libsfxlo.so
> #12 0x00002aaaac2d8f28 in SfxDispatcher::Execute(unsigned short, unsigned short, SfxItemSet*, SfxItemSet*, unsigned short) () from core/solver/unxlngx6.pro/installation/opt/program/libsfxlo.so
> #13 0x00002aaaac0df137 in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) () from core/solver/unxlngx6.pro/installation/opt/program/libsfxlo.so
> #14 0x00002aaaac0df994 in SfxOfficeDispatch::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) () from core/solver/unxlngx6.pro/installation/opt/program/libsfxlo.so
> #15 0x00002aaaac288180 in SfxToolBoxControl::Dispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&) () from core/solver/unxlngx6.pro/installation/opt/program/libsfxlo.so
> #16 0x00002aaad90678d4 in SvxFontNameBox_Impl::UserDraw(UserDrawEvent const&) () from core/solver/unxlngx6.pro/installation/opt/program/../program/libsvxcorelo.so
> #17 0x00002aaaade4ffed in ComboBox::LinkStubImplUserDrawHdl(void*, void*) () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #18 0x00002aaaade7b493 in ImplListBoxWindow::ImplPaint(unsigned short, unsigned char, bool) () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #19 0x00002aaaade7baac in ImplListBoxWindow::SelectEntry(unsigned short, unsigned char) () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #20 0x00002aaaade53761 in ComboBox::ImplUpdateFloatSelection() () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #21 0x00002aaaaca8dd14 in FontNameBox::Fill(FontList const*) () from core/solver/unxlngx6.pro/installation/opt/program/libsvtlo.so
> #22 0x00002aaad906b45a in lcl_GetDocFontList(FontList const**, SvxFontNameBox_Impl*) () from core/solver/unxlngx6.pro/installation/opt/program/../program/libsvxcorelo.so
> #23 0x00002aaad906b5aa in SvxFontNameBox_Impl::CheckAndMarkUnknownFont(VclWindowEvent*) () from core/solver/unxlngx6.pro/installation/opt/program/../program/libsvxcorelo.so
> #24 0x00002aaaade3e347 in VclEventListeners::Call(VclSimpleEvent*) const () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #25 0x00002aaaae0f8ac0 in Window::CallEventListeners(unsigned long, void*) () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #26 0x00002aaaade61876 in Edit::ImplSetText(rtl::OUString const&, Selection const*) () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #27 0x00002aaaade61971 in Edit::SetText(rtl::OUString const&) () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #28 0x00002aaaade6194c in Edit::SetText(rtl::OUString const&) () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #29 0x00002aaaade53a8b in ComboBox::SetText(rtl::OUString const&) () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #30 0x00002aaad90619e7 in SvxFontNameBox_Impl::Update(SvxFontItem const*) () from core/solver/unxlngx6.pro/installation/opt/program/../program/libsvxcorelo.so
> #31 0x00002aaad9061bb5 in SvxFontNameToolBoxControl::StateChanged(unsigned short, unsigned short, SfxPoolItem const*) () from core/solver/unxlngx6.pro/installation/opt/program/../program/libsvxcorelo.so
> #32 0x00002aaaac285dca in SfxToolBoxControl::statusChanged(com::sun::star::frame::FeatureStateEvent const&) () from core/solver/unxlngx6.pro/installation/opt/program/libsfxlo.so
> #33 0x00002aaaac0db6bb in SfxDispatchController_Impl::addStatusListener(com::sun::star::uno::Reference<com::sun::star::frame::XStatusListener> const&, com::sun::star::util::URL const&) () from core/solver/unxlngx6.pro/installation/opt/program/libsfxlo.so
> #34 0x00002aaaac0e0003 in SfxOfficeDispatch::addStatusListener(com::sun::star::uno::Reference<com::sun::star::frame::XStatusListener> const&, com::sun::star::util::URL const&) () from core/solver/unxlngx6.pro/installation/opt/program/libsfxlo.so
> #35 0x00002aaaacbc995e in svt::ToolboxController::bindListener() () from core/solver/unxlngx6.pro/installation/opt/program/libsvtlo.so
> #36 0x00002aaac4d002ff in framework::ToolBarManager::UpdateControllers() () from core/solver/unxlngx6.pro/installation/opt/program/../program/libfwklo.so
> #37 0x00002aaac4d006ee in framework::ToolBarManager::AsyncUpdateControllersHdl(void*) () from core/solver/unxlngx6.pro/installation/opt/program/../program/libfwklo.so
> #38 0x00002aaaade3c630 in Timer::ImplTimerCallbackProc() () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #39 0x00002aaaba8b7f77 in SvpSalInstance::CheckTimeout(bool) () from core/solver/unxlngx6.pro/installation/opt/program/libvclplug_svplo.so
> #40 0x00002aaaba8b8287 in SvpSalInstance::Yield(bool, bool) () from core/solver/unxlngx6.pro/installation/opt/program/libvclplug_svplo.so
> #41 0x00002aaaade33e94 in Application::Yield(bool) () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #42 0x00002aaaade33f37 in Application::Execute() () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #43 0x00002aaaaad258d5 in desktop::Desktop::Main() () from core/solver/unxlngx6.pro/installation/opt/program/libsofficeapp.so
> #44 0x00002aaaade3bb21 in ImplSVMain() () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #45 0x00002aaaade3bb55 in SVMain() () from core/solver/unxlngx6.pro/installation/opt/program/libvcllo.so
> #46 0x00002aaaaad57165 in soffice_main () from core/solver/unxlngx6.pro/installation/opt/program/libsofficeapp.so
> #47 0x000000000040073b in main ()
Comment 1 QA Administrators 2015-03-04 02:22:44 UTC Comment hidden (obsolete)
Comment 2 tommy27 2016-04-16 07:25:26 UTC Comment hidden (obsolete)
Comment 3 Stephan Bergmann 2016-10-27 09:47:10 UTC
The immediate test failure has later been removed by turning the failure into a warning with <https://cgit.freedesktop.org/libreoffice/core/commit/?id=a9cf50c24dd10a20e1288828e2a59c193bb582cb> "junit: make tests robust by compensating for intermittent sizing race."  (And I don't know whether the described race has an impact on real code besides that test code, nor whether the described race still exists in the current Calc code.)  Resolving as WORKSFORME for now.