About skip SkipImages unit test on MacOs
Robert Antoni Buj i Gelonch
robert.buj at gmail.com
Tue Jun 2 14:34:09 PDT 2015
Thanks Markus,
I saw that n=9223372036854755805 before to fail. Now, I'm going to examine
where it comes from.
* thread #1: tid = 0x2c7680, 0x00000001064bb54a
libvcllo.dylib`ImplLogicToPixel(n=9223372036854755805, nDPI=72, nMapNum=1,
nMapDenom=1600, nThres=64051194700380381) + 170 at map.cxx:382, queue =
'com.apple.main-thread', stop reason = breakpoint 2.1
frame #0: 0x00000001064bb54a
libvcllo.dylib`ImplLogicToPixel(n=9223372036854755805, nDPI=72, nMapNum=1,
nMapDenom=1600, nThres=64051194700380381) + 170 at map.cxx:382
379 #else
380 assert(nMapNum >= 0);
381 assert(nDPI > 0);
-> 382 assert(nMapNum == 0 || std::abs(n) <
std::numeric_limits<long>::max() / nMapNum / nDPI); //detect overflows
383 #endif
384 {
385 sal_Int64 n64 = n;
(lldb)
Process 13744 resuming
Assertion failed: (nMapNum == 0 || std::abs(n) <
std::numeric_limits<long>::max() / nMapNum / nDPI), function
ImplLogicToPixel, file /Volumes/Master/lo/core/vcl/source/outdev/map.cxx,
line 382.
Process 13744 stopped
* thread #1: tid = 0x2c7680, 0x00007fff88a53286
libsystem_kernel.dylib`__pthread_kill + 10, queue =
'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x00007fff88a53286 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
-> 0x7fff88a53286 <+10>: jae 0x7fff88a53290 ; <+20>
0x7fff88a53288 <+12>: movq %rax, %rdi
0x7fff88a5328b <+15>: jmp 0x7fff88a4ec53 ; cerror_nocancel
0x7fff88a53290 <+20>: retq
2015-06-02 22:53 GMT+02:00 Markus Mohrhard <markus.mohrhard at googlemail.com>:
> Hey,
>
> On Tue, Jun 2, 2015 at 10:46 PM, Robert Antoni Buj i Gelonch <
> robert.buj at gmail.com> wrote:
>
>> Hi, I can move forward until aEnv.startLoading()
>>
>> Process 13147 stopped
>> * thread #1: tid = 0x2c50ef, 0x00000001173583dc
>> libfwklo.dylib`framework::LoadEnv::loadComponentFromURL(xLoader=0x00007fff5fbf3758,
>> xContext=0x00000001087913d0, sURL=0x00007fff5fbf4b00,
>> sTarget=0x00007fff5fbf40b8, nFlags=0, lArgs=0x00007fff5fbf40b0) + 268 at
>> loadenv.cxx:164, queue = 'com.apple.main-thread', stop reason = step over
>> frame #0: 0x00000001173583dc
>> libfwklo.dylib`framework::LoadEnv::loadComponentFromURL(xLoader=0x00007fff5fbf3758,
>> xContext=0x00000001087913d0, sURL=0x00007fff5fbf4b00,
>> sTarget=0x00007fff5fbf40b8, nFlags=0, lArgs=0x00007fff5fbf40b0) + 268 at
>> loadenv.cxx:164
>> 161 sTarget,
>> 162 nFlags,
>> 163 LoadEnv::E_NO_FEATURE);
>> -> 164 aEnv.startLoading();
>> 165 aEnv.waitWhileLoading(); // wait for ever!
>> 166
>> 167 xComponent = aEnv.getTargetComponent();
>> (lldb) n
>> warn:legacy.osl:13147:1:oox/source/helper/graphichelper.cxx:117:
>> GraphicHelper::GraphicHelper - cannot get target frame
>> warn:vcl.window:13147:1:vcl/source/window/window.cxx:3353: ignoring
>> DeploymentException "component context fails to supply service
>> 'com.sun.star.datatransfer.clipboard.SystemClipboard' of type
>> 'com.sun.star.datatransfer.clipboard.XSystemClipboard'"
>> warn:sfx.sidebar:13147:1:sfx2/source/sidebar/SidebarController.cxx:743:
>> Cannot create panel:
>> Assertion failed: (nMapNum == 0 || std::abs(n) <
>> std::numeric_limits<long>::max() / nMapNum / nDPI), function
>> ImplLogicToPixel, file /Volumes/Master/lo/core/vcl/source/outdev/map.cxx,
>> line 382.
>> Process 13147 stopped
>> * thread #1: tid = 0x2c50ef, 0x00007fff88a53286
>> libsystem_kernel.dylib`__pthread_kill + 10, queue =
>> 'com.apple.main-thread', stop reason = signal SIGABRT
>> frame #0: 0x00007fff88a53286 libsystem_kernel.dylib`__pthread_kill +
>> 10
>> libsystem_kernel.dylib`__pthread_kill:
>> -> 0x7fff88a53286 <+10>: jae 0x7fff88a53290 ; <+20>
>> 0x7fff88a53288 <+12>: movq %rax, %rdi
>> 0x7fff88a5328b <+15>: jmp 0x7fff88a4ec53 ;
>> cerror_nocancel
>> 0x7fff88a53290 <+20>: retq
>>
>>
>> 2015-06-02 20:16 GMT+02:00 Robert Antoni Buj i Gelonch <
>> robert.buj at gmail.com>:
>>
>>>
>>> so this smells like the issue discussed in <
>>>> https://bugs.documentfoundation.org/show_bug.cgi?id=90502> "CRASH -
>>>> failed assertion in unittest sw_globalfilter in master build OSX," and the
>>>> working hypothesis would be that your tb's failure symptoms are the
>>>> non-debug manifestation of the same underlying problem that manifests as
>>>> tdf#90502 in some people's debug/dbgutil builds
>>>
>>>
>>> (lldb) breakpoint set --file
>>> /Volumes/Master/lo/core/sw/qa/extras/globalfilter/globalfilter.cxx --line
>>> 663
>>> Breakpoint 1: no locations (pending).
>>> WARNING: Unable to resolve breakpoint to any actual locations.
>>> (lldb) run
>>> Process 11213 launched:
>>> '/Volumes/Master/lo/core/workdir/LinkTarget/Executable/cppunittester'
>>> (x86_64)
>>> 1 location added to breakpoint 1
>>> ...
>>> Process 11213 stopped* thread #1: tid = 0x2be3ac, 0x000000010b9e83e6
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages() at string:2053, queue
>>> = 'com.apple.main-thread', stop reason = breakpoint 1.1
>>> frame #0: 0x000000010b9e83e6
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages() at string:2053
>>> 2050 basic_string<_CharT, _Traits, _Allocator>::basic_string(const
>>> value_type* __s)
>>> 2051 {
>>> 2052 _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*)
>>> detected nullptr");
>>> -> 2053 __init(__s, traits_type::length(__s));
>>> 2054 #if _LIBCPP_DEBUG_LEVEL >= 2
>>> 2055 __get_db()->__insert_c(this);
>>> 2056 #endif
>>> (lldb) n
>>> Process 11213 stopped
>>> * thread #1: tid = 0x2be3ac, 0x000000010b9e83fb
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 75 at globalfilter.cxx:668, queue = 'com.apple.main-thread', stop reason
>>> = step over
>>> frame #0: 0x000000010b9e83fb
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 75 at globalfilter.cxx:668
>>> 665 // Check how LO skips image loading (but not texts of
>>> textboxes and custom shapes)
>>> 666 // during DOC and DOCX import, using the "SkipImages"
>>> FilterOptions.
>>> 667
>>> -> 668 const char* aFilterNames[][2] = {
>>> 669 { "/sw/qa/extras/globalfilter/data/skipimages.doc", NULL
>>> },
>>> 670 { "/sw/qa/extras/globalfilter/data/skipimages.doc",
>>> "SkipImages" },
>>> 671 { "/sw/qa/extras/globalfilter/data/skipimages.docx",
>>> NULL },
>>> (lldb) n
>>> Process 11213 stopped
>>> * thread #1: tid = 0x2be3ac, 0x000000010b9e844f
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 159 at globalfilter.cxx:675, queue = 'com.apple.main-thread', stop reason
>>> = step over
>>> frame #0: 0x000000010b9e844f
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 159 at globalfilter.cxx:675
>>> 672 { "/sw/qa/extras/globalfilter/data/skipimages.docx",
>>> "SkipImages" }
>>> 673 };
>>> 674
>>> -> 675 for( size_t nFilter = 0; nFilter <
>>> SAL_N_ELEMENTS(aFilterNames); ++nFilter )
>>> 676 {
>>> 677 bool bSkipImages = aFilterNames[nFilter][1] != NULL;
>>> 678 OString sFailedMessage = OString("Failed on filter: ") +
>>> aFilterNames[nFilter][0];
>>> (lldb) n
>>> Process 11213 stopped
>>> * thread #1: tid = 0x2be3ac, 0x000000010b9e846b
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 187 at globalfilter.cxx:677, queue = 'com.apple.main-thread', stop reason
>>> = step over
>>> frame #0: 0x000000010b9e846b
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 187 at globalfilter.cxx:677
>>> 674
>>> 675 for( size_t nFilter = 0; nFilter <
>>> SAL_N_ELEMENTS(aFilterNames); ++nFilter )
>>> 676 {
>>> -> 677 bool bSkipImages = aFilterNames[nFilter][1] != NULL;
>>> 678 OString sFailedMessage = OString("Failed on filter: ") +
>>> aFilterNames[nFilter][0];
>>> 679
>>> 680 if (mxComponent.is())
>>> (lldb) n
>>> Process 11213 stopped
>>> * thread #1: tid = 0x2be3ac, 0x000000010b9e8485
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 213 at globalfilter.cxx:678, queue = 'com.apple.main-thread', stop reason
>>> = step over
>>> frame #0: 0x000000010b9e8485
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 213 at globalfilter.cxx:678
>>> 675 for( size_t nFilter = 0; nFilter <
>>> SAL_N_ELEMENTS(aFilterNames); ++nFilter )
>>> 676 {
>>> 677 bool bSkipImages = aFilterNames[nFilter][1] != NULL;
>>> -> 678 OString sFailedMessage = OString("Failed on filter: ") +
>>> aFilterNames[nFilter][0];
>>> 679
>>> 680 if (mxComponent.is())
>>> 681 mxComponent->dispose();
>>> (lldb) n
>>> Process 11213 stopped
>>> * thread #1: tid = 0x2be3ac, 0x000000010b9e84ff
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 335 at globalfilter.cxx:680, queue = 'com.apple.main-thread', stop reason
>>> = step over
>>> frame #0: 0x000000010b9e84ff
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 335 at globalfilter.cxx:680
>>> 677 bool bSkipImages = aFilterNames[nFilter][1] != NULL;
>>> 678 OString sFailedMessage = OString("Failed on filter: ") +
>>> aFilterNames[nFilter][0];
>>> 679
>>> -> 680 if (mxComponent.is())
>>> 681 mxComponent->dispose();
>>> 682
>>> 683 if (bSkipImages)
>>> (lldb) n
>>> Process 11213 stopped
>>> * thread #1: tid = 0x2be3ac, 0x000000010b9e859a
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 490 at globalfilter.cxx:683, queue = 'com.apple.main-thread', stop reason
>>> = step over
>>> frame #0: 0x000000010b9e859a
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 490 at globalfilter.cxx:683
>>> 680 if (mxComponent.is())
>>> 681 mxComponent->dispose();
>>> 682
>>> -> 683 if (bSkipImages)
>>> 684 {
>>> 685 // FilterOptions parameter
>>> 686 uno::Sequence<beans::PropertyValue> args(1);
>>> (lldb) n
>>> Process 11213 stopped
>>> * thread #1: tid = 0x2be3ac, 0x000000010b9e8916
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 1382 at globalfilter.cxx:694, queue = 'com.apple.main-thread', stop
>>> reason = step over
>>> frame #0: 0x000000010b9e8916
>>> libtest_sw_globalfilter.dylib`Test::testSkipImages(this=0x0000000108bb73b0)
>>> + 1382 at globalfilter.cxx:694
>>> 691 mxComponent =
>>> loadFromDesktop(getURLFromSrc(aFilterNames[nFilter][0]),
>>> "com.sun.star.text.TextDocument", args);
>>> 692 sFailedMessage = sFailedMessage + " - " +
>>> aFilterNames[nFilter][1];
>>> 693 } else
>>> -> 694 mxComponent =
>>> loadFromDesktop(getURLFromSrc(aFilterNames[nFilter][0]),
>>> "com.sun.star.text.TextDocument");
>>> 695
>>> 696 // Check shapes (images, textboxes, custom shapes)
>>> 697 uno::Reference<drawing::XDrawPageSupplier>
>>> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
>>> (lldb) n
>>> warn:legacy.osl:11213:1:oox/source/helper/graphichelper.cxx:117:
>>> GraphicHelper::GraphicHelper - cannot get target frame
>>> warn:vcl.window:11213:1:vcl/source/window/window.cxx:3353: ignoring
>>> DeploymentException "component context fails to supply service
>>> 'com.sun.star.datatransfer.clipboard.SystemClipboard' of type
>>> 'com.sun.star.datatransfer.clipboard.XSystemClipboard'"
>>> warn:sfx.sidebar:11213:1:sfx2/source/sidebar/SidebarController.cxx:743:
>>> Cannot create panel:
>>> Assertion failed: (nMapNum == 0 || std::abs(n) <
>>> std::numeric_limits<long>::max() / nMapNum / nDPI), function
>>> ImplLogicToPixel, file /Volumes/Master/lo/core/vcl/source/outdev/map.cxx,
>>> line 382.
>>> Process 11213 stopped
>>> * thread #1: tid = 0x2be3ac, 0x00007fff88a53286
>>> libsystem_kernel.dylib`__pthread_kill + 10, queue =
>>> 'com.apple.main-thread', stop reason = signal SIGABRT
>>> frame #0: 0x00007fff88a53286 libsystem_kernel.dylib`__pthread_kill +
>>> 10
>>> libsystem_kernel.dylib`__pthread_kill:
>>> -> 0x7fff88a53286 <+10>: jae 0x7fff88a53290 ; <+20>
>>> 0x7fff88a53288 <+12>: movq %rax, %rdi
>>> 0x7fff88a5328b <+15>: jmp 0x7fff88a4ec53 ;
>>> cerror_nocancel
>>> 0x7fff88a53290 <+20>: retq
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>
>>
> The interesting part is:
>
> Assertion failed: (nMapNum == 0 || std::abs(n) <
> std::numeric_limits<long>::max() / nMapNum / nDPI), function
> ImplLogicToPixel, file /Volumes/Master/lo/core/vcl/source/outdev/map.cxx,
> line 382.
>
> so maybe set a breakpoint there and check the different values. After that
> going back and checking where the wrong values are coming from.
>
> Regards,
> Markus
>
--
http://about.me/rbuj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20150602/82e778b1/attachment.html>
More information about the LibreOffice
mailing list