<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Ok, I will make a try (recompile the source code will spend me hours... )<br></blockquote><div><br></div><div>Unfortunately it's also crash with same error when i swipe up and down more times.</div><div>I suppose the memory leak maybe exit in this method "desktop/source/lib/init.cxx -> doc_paintTile".Because every time i swipe the screen the java code will call this method to paint tile where crash was happened <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">di liu <<a href="mailto:disco.liu@gmail.com" target="_blank">disco.liu@gmail.com</a>> 于2022年4月29日周五 16:06写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Is that file confidential or can it be shared publicly (attached to a<br>Bugzilla ticket)? (I can't read most of the text in it. :-))<br></blockquote><div><br></div><div> The file is not confidential and can be shared publicly (haha,The text in it is chiness)</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">so with your config that uses --enable-debug and restricts for what<br>modules symbols are enabled, even less should be needed.<br></blockquote><div><br></div><div> My compile machine only has 4GB RAM so that i must restrict the symbols but even so the memory is also not enough(because of that link error "clang++ error:unable to execute command Killed")</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Can you try whether the demo patch at<br><a href="https://gerrit.libreoffice.org/c/core/+/133581" rel="noreferrer" target="_blank">https://gerrit.libreoffice.org/c/core/+/133581</a> makes the crash go away<br>for you as well?<br></blockquote><div><br></div><div>Ok, I will make a try (recompile the source code will spend me hours... )</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Michael Weghorn <<a href="mailto:m.weghorn@posteo.de" target="_blank">m.weghorn@posteo.de</a>> 于2022年4月29日周五 03:06写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
On 28/04/2022 05.04, di liu wrote:<br>
> Thank you for your response ^_^<br>
> <br>
>     The video appears to be inaccessible unless access has specifically been<br>
>     granted in Google Drive.<br>
> <br>
> I am sorry, have made it<br>
> <br>
>       Does that device have a 64-bit ARM processor?<br>
> <br>
> Yeah ,my device abi is arm64-v8a,And the so is compiled for armeabi-v7a<br>
> <br>
>     i.e. the crash is not 100% reproducible? Can you give a rough estimation<br>
>     of how often it happens? (like "almost always", "about every third<br>
>     time",...)?<br>
> <br>
> almost always<br>
> <br>
>       It might also help to share a sample doc (e.g. attaching one to a bug<br>
> <br>
> report on Bugzilla) if it happens more often with specific files.<br>
> see the accessories<br>
<br>
Thanks for sharing the video and a sample file. With those, I can <br>
reproduce a crash.<br>
<br>
Is that file confidential or can it be shared publicly (attached to a <br>
Bugzilla ticket)? (I can't read most of the text in it. :-))<br>
<br>
>     What does your autogen.input look like? (Or what options are you passing<br>
>     to ./autogen.sh manually?)<br>
> <br>
> passing nothing to ./autogen.sh<br>
> the autogen.input containing this:<br>
> --with-distro=LibreOfficeAndroid<br>
> --with-android-sdk=/home/disco/Documents/dev_env/android_sdk<br>
> --with-android-ndk=/home/disco/Documents/dev_env/android_sdk/ndk/20.1.5948944<br>
> --with-ant-home=/home/disco/Documents/dev_env/apache-ant-1.10.12<br>
> --enable-debug<br>
> --enable-symbols="vcl/source/app/"<br>
> <br>
>     For a 64-bit ARM debug build, using LLD with NDK 22.1.7171670 worked for<br>
>     me in the past, by applying this change on top of master:<br>
>     <a href="https://gerrit.libreoffice.org/c/core/+/130947" rel="noreferrer" target="_blank">https://gerrit.libreoffice.org/c/core/+/130947</a><br>
>     <<a href="https://gerrit.libreoffice.org/c/core/+/130947" rel="noreferrer" target="_blank">https://gerrit.libreoffice.org/c/core/+/130947</a>><br>
> <br>
>     and then using an autogen.input containing this:<br>
> <br>
>     --build=x86_64-unknown-linux-gnu<br>
>     --with-android-ndk=/home/michi/Android/Sdk/ndk/21.0.6113669<br>
>     --with-android-sdk=/home/michi/Android/Sdk<br>
>     --with-distro=LibreOfficeAndroidAarch64<br>
>     --enable-sal-log<br>
>     --with-external-tar=/home/michi/development/libreoffice-external<br>
>     --enable-ccache<br>
>     --enable-ld=lld<br>
>     --enable-dbgutil<br>
>     --with-jdk-home=/usr/lib/jvm/java-11-openjdk-amd64/<br>
> <br>
> If i want to build debug version so must build a 64-bit ?<br>
<br>
I suppose, in theory, 32-bit should also work. My practical experience <br>
with the Android toolchain was that several things that should work in <br>
theory didn't work in reality, and trying a different architecture, NDK <br>
version, or linker could give better results.<br>
<br>
Trying an x86 or x86_64 AVD might also be worth trying.<br>
A dbgutil build works fine for me on a Debian testing machine with 16 GB <br>
of RAM and an autogen.input containing<br>
<br>
--build=x86_64-unknown-linux-gnu<br>
--with-android-ndk=/home/michi/Android/Sdk/ndk/20.0.5594570/<br>
--with-android-sdk=/home/michi/Android/Sdk<br>
--with-distro=LibreOfficeAndroidX86<br>
--enable-sal-log<br>
--enable-ccache<br>
--enable-dbgutil<br>
--with-jdk-home=/usr/lib/jvm/java-11-openjdk-amd64/<br>
<br>
so with your config that uses --enable-debug and restricts for what <br>
modules symbols are enabled, even less should be needed.<br>
<br>
> Addition:<br>
> Yesterday i use "bugreport" command on my device and found below logs:<br>
> <br>
>     04-27 15:53:50.551 10316  3015  3287 W libc    : malloc(2292954)<br>
>     failed: returning null pointer<br>
>     04-27 15:53:50.552  1000  2433  6251 I chatty  : uid=1000(system)<br>
>     Binder:2433_6 expire 4 lines<br>
>     04-27 15:53:50.553 10316  3015  3287 E LibreOffice/androidinst:<br>
>     SalAbort: 'Unspecified application error'<br>
> <br>
> <br>
> There have a log "malloc(2292954) failed: returning null pointer" before <br>
> the error 'Unspecified application error' (both of them come from my <br>
> app(pid=10316))<br>
> So i wonder if it is possible that the crash was happened in java ? <br>
> Because i found every time i slide the screen it's will trigger the <br>
> render redraw which will trigger allocate a direct buffer<br>
<br>
 From what I have seen so far, the problem is that the app/system is <br>
running out of memory, caused by a memory leak on the C++ side.<br>
<br>
Can you try whether the demo patch at <br>
<a href="https://gerrit.libreoffice.org/c/core/+/133581" rel="noreferrer" target="_blank">https://gerrit.libreoffice.org/c/core/+/133581</a> makes the crash go away <br>
for you as well?<br>
<br>
At least with the experimental editing mode disabled, this worked here.<br>
I haven't tried with experimental mode enabled yet, which was running <br>
out of memory earlier without the patch in place, and was showing <br>
another out-of-memory-related error in the ADB log ouput with an x86 <br>
debug build.<br>
<br>
(The patch is obviously not meant to be merged as is, just a demo where <br>
the problem is.)<br>
<br>
PS: Adding dev list back to the conversation.<br>
</blockquote></div>
</blockquote></div></div>