Bug 158300 - ods file closed by Viewer if experimental mode is enabled
Summary: ods file closed by Viewer if experimental mode is enabled
Status: RESOLVED DUPLICATE of bug 148854
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Android Viewer (show other bugs)
Version:
(earliest affected)
7.6.3.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-21 14:48 UTC by Sophie Sipasseuth
Modified: 2023-11-23 14:13 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
ods file for test (17.31 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-11-21 14:48 UTC, Sophie Sipasseuth
Details
Screenshot on a device where it works (146.93 KB, image/png)
2023-11-21 15:54 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sophie Sipasseuth 2023-11-21 14:48:35 UTC
Description:
In LibreOffice Viewer, when I would like to open an ods file. The file is opened and after a few seconds closed - without any action from me. 

Steps to Reproduce:
1. Open an ods file in Libre Office Viewer
2. Observe that the file is opened.
3. And observe that after a few seconds, the file is closed with no action from you.

Actual Results:
The ods file is closed with no action of the user.

Expected Results:
The ods file remains open.


Reproducible: Always


User Profile Reset: No

Additional Info:
My smartphone is a Galaxy A52s 5G, Android version 13.
The file was created with Google Drive and then downloaded in ods and then opened with Viewer.
Comment 1 Sophie Sipasseuth 2023-11-21 14:48:58 UTC
Created attachment 190941 [details]
ods file for test
Comment 2 Michael Weghorn 2023-11-21 15:54:06 UTC
Created attachment 190942 [details]
Screenshot on a device where it works
Comment 3 Michael Weghorn 2023-11-21 16:10:17 UTC
Thanks for your report.

I cannot reproduce here, it works in both, an x86_64 AVD (Android virtual device) running a local build of the current development version (git master) as well as the current 7.6.3 build (versionCode 20) from https://nextcloud.documentfoundation.org/s/nwjnmXCssQYQPp7 on a Fairphone 3+ running LineageOS 20 (i.e. Android 13), s. attachment 190942 [details] for a screenshot.


Some questions that might help to narrow down the issue:

1) Do other ODS files work for you?
2) Where is the file located and how is it opened (e.g. in the local "Download" directory on the phone and opened using the "Select File to open" option from within the app, or opened from the file manager, or maybe saved on some online share and then opened e.g. from within the NextCloud app,...)?
3) Does uninstalling the app and reinstalling make any difference?
4) (advanced) If you have USB debugging enabled or are interested in doing it, the following steps could provide more information:

* enable developer options on the phone, see [1]
* set up ADB on your laptop/PC (e.g. following the instructions at [2]
* connect the phone via USB (Wifi is also possible, see [3])
* start the LibreOffice Viewer app again
* start the log by running comand 'adb logcat > adb_output.log' (redirect output to a file)
* reproduce the issue in the app again
* press Ctrl+C to stop the adb logcat command
* attach the `adb_output.log` file (or the relevant part of it) here

[1] https://developer.android.com/studio/debug/dev-options
[2] https://www.xda-developers.com/install-adb-windows-macos-linux/
[3] https://developer.android.com/tools/adb





Version: 7.6.3.2.0+
Build ID: 0e982fe4db35

Version: 24.2.0.0.alpha0+
Build ID: 42edec63fba4
Comment 4 Stéphane Guillou (stragu) 2023-11-21 16:13:21 UTC Comment hidden (obsolete)
Comment 5 Sophie Sipasseuth 2023-11-22 12:27:08 UTC
(In reply to Michael Weghorn from comment #3)
> Thanks for your report.
> 
> I cannot reproduce here, it works in both, an x86_64 AVD (Android virtual
> device) running a local build of the current development version (git
> master) as well as the current 7.6.3 build (versionCode 20) from
> https://nextcloud.documentfoundation.org/s/nwjnmXCssQYQPp7 on a Fairphone 3+
> running LineageOS 20 (i.e. Android 13), s. attachment 190942 [details] for a
> screenshot.
> 
> 
> Some questions that might help to narrow down the issue:
> 
> 1) Do other ODS files work for you?
> 2) Where is the file located and how is it opened (e.g. in the local
> "Download" directory on the phone and opened using the "Select File to open"
> option from within the app, or opened from the file manager, or maybe saved
> on some online share and then opened e.g. from within the NextCloud app,...)?
> 3) Does uninstalling the app and reinstalling make any difference?
> 4) (advanced) If you have USB debugging enabled or are interested in doing
> it, the following steps could provide more information:
> 
> * enable developer options on the phone, see [1]
> * set up ADB on your laptop/PC (e.g. following the instructions at [2]
> * connect the phone via USB (Wifi is also possible, see [3])
> * start the LibreOffice Viewer app again
> * start the log by running comand 'adb logcat > adb_output.log' (redirect
> output to a file)
> * reproduce the issue in the app again
> * press Ctrl+C to stop the adb logcat command
> * attach the `adb_output.log` file (or the relevant part of it) here
> 
> [1] https://developer.android.com/studio/debug/dev-options
> [2] https://www.xda-developers.com/install-adb-windows-macos-linux/
> [3] https://developer.android.com/tools/adb
> 
> 
> 
> 
> 
> Version: 7.6.3.2.0+
> Build ID: 0e982fe4db35
> 
> Version: 24.2.0.0.alpha0+
> Build ID: 42edec63fba4

1) With other ods files from Google Drive, it is the same bug. But with other ods files from Libre Office, there is not this bug.
2) I open the LibreOffice Viewer app, then click on the folder "Select file to open", then choose in the folder "Download" the file.
3) I just uninstalled the app and reinstalled it, and it works.

But I don't understand why.
Because I installed LibreOffice Viewer yesterday, and there wasn't an update of my phone or of the app between yesterday and today.
Comment 6 Stéphane Guillou (stragu) 2023-11-22 12:48:37 UTC
(In reply to Stéphane Guillou (stragu) from comment #4)
Actually, I do reproduce now. After a few seconds of navigating the default sheet, including scrolling horizontally, it closes.

Version: 7.6.3.2.0+
Build ID: 0e982fe4db35
Android 9, Galaxy A20e
Comment 7 Michael Weghorn 2023-11-22 13:27:13 UTC
(In reply to Stéphane Guillou (stragu) from comment #6)
> (In reply to Stéphane Guillou (stragu) from comment #4)
> Actually, I do reproduce now. After a few seconds of navigating the default
> sheet, including scrolling horizontally, it closes.

Indeed, if (and only if) experimental mode is enabled, I can trigger a crash this way as well.

Looking into ADB log, the process seems to get killed because the device runs out of memory:


> 11-22 14:18:26.162  6222  6222 I ion.libreoffice: Waiting for a blocking GC NativeAlloc
> 11-22 14:18:26.292  6222  6250 I ion.libreoffice: NativeAlloc concurrent copying GC freed 231433(10MB) AllocSpace objects, 0(0B) LOS objects, 76% free, 7434KB/31MB, paused 117us,42us total 131.449ms
> 11-22 14:18:26.292  6222  6222 I ion.libreoffice: WaitForGcToComplete blocked NativeAlloc on NativeAlloc for 129.871ms
> 
> ...
> 
> 11-22 14:18:28.414     0     0 E         : Out of memory: Kill process 6222 (ion.libreoffice) score 602 or sacrifice child
> 11-22 14:18:28.414     0     0 E         : Killed process 6222 (ion.libreoffice) total-vm:18859112kB, anon-rss:2381608kB, file-rss:21460kB, shmem-rss:540kB

So the root cause might be the same as in tdf#148854.

Do you also only see this with experimental mode enabled or also without it? (Open the document anew after changing the mode for the setting to take effect.)
Comment 8 Stéphane Guillou (stragu) 2023-11-22 15:17:50 UTC
(In reply to Michael Weghorn from comment #7)
> Do you also only see this with experimental mode enabled or also without it?
> (Open the document anew after changing the mode for the setting to take
> effect.)
Yes, only in experimental mode!
Comment 9 Sophie Sipasseuth 2023-11-22 15:18:07 UTC
Yes, I confirm it is related to the experimental mode.
Comment 10 Michael Weghorn 2023-11-22 22:03:44 UTC
(In reply to Sophie Sipasseuth from comment #9)
> Yes, I confirm it is related to the experimental mode.

Great, thanks for the confirmation. While crashes are always bad, that at least makes it less critical.
Comment 11 Sophie Sipasseuth 2023-11-23 13:11:44 UTC
:-)
Comment 12 Stéphane Guillou (stragu) 2023-11-23 14:13:31 UTC
Let's mark as a duplicate then.

*** This bug has been marked as a duplicate of bug 148854 ***