Bug 158331 - Android Viewer: "Save as" creates 0 byte file (with Experimentation Mode turned off)
Summary: Android Viewer: "Save as" creates 0 byte file (with Experimentation Mode turn...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Android Viewer (show other bugs)
Version:
(earliest affected)
7.6.3.2 release
Hardware: All Android
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:24.2.0 target:7.6.4
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-23 03:59 UTC by Kira Tubo
Modified: 2023-11-24 15:30 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Video - zero byte file created (13.53 MB, video/mp4)
2023-11-23 04:01 UTC, Kira Tubo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kira Tubo 2023-11-23 03:59:20 UTC
Description:
If Experimentation is turned off, the "Save as" functionality creates a 0 byte file with no data

Steps to Reproduce:
Prerequisite: Experimental Mode is turned off
1. Open Android Viewer
2. Open any file that has data in it (ex: writer odt file)
3. Tap 3 dot menu
4. Tap "Save as"
5. Save the file
6. Return to the previous screen
7. Tap "Select file to open"
8. Check the size of the file that was created
9. Tap on the file
10. Check the contents of the file 

Actual Results:
The "Save as" function creates 0 byte file with no data with Experimentation Mode turned off. Note: if Experimentation Mode is turned on, this issue does not occur. 

Expected Results:
The user should be able to create a copy of the file using the "Save as" functionality. OR the "Save as" functionality should be removed if "Experimentation Mode" is turned off. 


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.3.2.0+
Build ID: 0e982fe4db35
Device: Google Pixel 6
Android version: 13
Comment 1 Kira Tubo 2023-11-23 04:01:17 UTC
Created attachment 190982 [details]
Video - zero byte file created
Comment 2 Michael Weghorn 2023-11-23 09:34:24 UTC
I can reproduce on a Fairphone 3.

Version: 7.6.3.2-android
Build ID: 8c4c8a83119e

(In reply to Kira Tubo from comment #0)
> The "Save as" function creates 0 byte file with no data with Experimentation
> Mode turned off. Note: if Experimentation Mode is turned on, this issue does
> not occur. 

Nice finding, thanks! (I remember having seen 0 byte files in the past, but couldn't reliably reproduce back then, great to know that this happens when experimental mode is off.)
Comment 3 Michael Weghorn 2023-11-23 10:52:26 UTC
Pending fix (makes saving work rather than removing the menu entry):
https://gerrit.libreoffice.org/c/core/+/159857
Comment 4 Commit Notification 2023-11-23 12:21:33 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/934a4937e32b4ccf4690b642ccf4787331f37b68

tdf#158331 android: Fix "Save As" for non-experimental mode

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2023-11-24 15:30:39 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/10b76c9578c6a90a5d0e48a0cb9f18c2d9d68e84

tdf#158331 android: Fix "Save As" for non-experimental mode

It will be available in 7.6.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.