Bug 128101 - manual page breaks crashes Android Viewer - Cannot View ODT Document at LibreOffice Viewer
Summary: manual page breaks crashes Android Viewer - Cannot View ODT Document at Libre...
Status: VERIFIED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Android Viewer (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: All Android
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.5.0
Keywords:
: 124536 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-12 01:40 UTC by baffclan
Modified: 2020-06-02 11:31 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Error Screenshot (72.36 KB, image/png)
2019-12-13 05:04 UTC, baffclan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description baffclan 2019-10-12 01:40:14 UTC
Description:
Cannot View ODT Document at LibreOffice Viewer

Steps to Reproduce:
1. Download a ODT file
   https://github.com/ikunya/libo-writer/blob/master/libreoffice-writer-book.odt
   (https://github.com/ikunya/libo-writer)
2. Open this document at LibreOffice Viewer


Actual Results:
Crash a LibreOffice Viewer

Expected Results:
Open ODT Document



Reproducible: Always


User Profile Reset: No



Additional Info:
No Crash:
LibreOffice Viewer / Android
Version: 5.0.10.10
Build ID: 4158227
(Collabora)


Crash: 
LibreOffice Viewer / Android
Version: 6.4.0.0 alpha0+
BuildID: ff2b56672203
/daily/master/Android-ARM@24-Bytemark-Hosting/2019-10-07_11.53.41/

Collabora Office / iOS
LOOLWSD 4.1.0(git hash; 1b91eef0)
LOKit Collabora Office 6.0-34(git hash: 97e2e47)
Comment 1 baffclan 2019-10-22 03:34:48 UTC
Reproduce with Newest LibreOffice Viewer.

LibreOffice Viewer / Android
Version: 6.4.0.0.alpha1+
BuildID: 3aaa2ec8c603
Android-ARM@24-Bytemark-Hosting/2019-10-21_22.04.56

Xisco, can you test this?
Comment 2 Xisco Faulí 2019-11-07 14:21:06 UTC
I believe, the root cause is the same as in bug 123290

*** This bug has been marked as a duplicate of bug 123290 ***
Comment 3 baffclan 2019-11-08 10:09:23 UTC
(In reply to Xisco Faulí from comment #2)
> I believe, the root cause is the same as in bug 123290
Thanks for your comment.

-> v.
Comment 4 Xisco Faulí 2019-11-08 10:12:11 UTC
(In reply to baffclan from comment #3)
> (In reply to Xisco Faulí from comment #2)
> > I believe, the root cause is the same as in bug 123290
> Thanks for your comment.
> 
> -> v.

Does it mean it's fixed with the android daily build from today ?
Comment 5 baffclan 2019-11-08 10:42:07 UTC
(In reply to Xisco Faulí from comment #4)
> Does it mean it's fixed with the android daily build from today ?

No, I verified that it is the same bug as bug 123290.
Comment 6 baffclan 2019-11-10 12:39:17 UTC
(In reply to Xisco Faulí from comment #2)
> I believe, the root cause is the same as in bug 123290
> 
> *** This bug has been marked as a duplicate of bug 123290 ***
It is not same problem.

Reproduce with LibreOffice Viewer master
Version: 6.4.0.0 alpha0+
BuildID: 13ac239daa4e

maybe the same problem as bug 124536.
Comment 7 Christian Lohmaier 2019-11-18 13:22:01 UTC
stubmbled over this one why looking at bug#124536 - cause is manual page break in the document.
For that current desktop code reads a .ui file to show a menu to edit/delete that pagebreak. That file is not packaged in the Android viewer and causes an Exception that is not handled and ultimately crashes.
Comment 8 Commit Notification 2019-11-19 17:16:49 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/93ee955c5359e283e2fe88e45b4c02a60525ed11

tdf#128101 android: fix documents with manual page break

It will be available in 6.5.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 9 Xisco Faulí 2019-11-20 10:13:31 UTC
Hi baffclan,
Could you please try again with a master build from today -> https://dev-builds.libreoffice.org/daily/master/Android-ARM@24-Bytemark-Hosting/current/
Comment 10 baffclan 2019-11-22 03:24:14 UTC
Reproduce with Newest LibreOffice Viewer.

LibreOffice Viewer / Android
Version: 6.5.0.0 alpha0+
BuildID: 1c58b2a437a7
Android-ARM@24-Bytemark-Hosting/2019-11-22_01.28.26
Comment 11 Michael Weghorn 2019-12-12 12:46:45 UTC
Same here as for bug 124536 comment 12, This works fine for me now (while I had the same issue with another document that has a page break earlier).

Can you please retest again with a daily build, and give some more details, and preferably an ADB log if the crash still happens?
Comment 12 baffclan 2019-12-13 05:04:13 UTC
Created attachment 156540 [details]
Error Screenshot

(In reply to Michael Weghorn from comment #11)

LibreOffice Viewer / Android
Version: 6.5.0.0 alpha0+
BuildID: f44140bebb9c
Android-ARM@24-Bytemark-Hosting/2019-12-12_00.19.48

Android 9
Comment 13 baffclan 2019-12-13 05:07:56 UTC
Collabora Office/iOS can open it.
However, Japanese fonts are garbled.
Comment 14 Michael Weghorn 2019-12-13 08:02:21 UTC
(In reply to baffclan from comment #12)
> Created attachment 156540 [details]
> Error Screenshot

Thanks for retesting. The error message "loadComponentFromUrl returned an empty reference" is also mentioned in bug 111968, so this may or may not be the same issue. (I cannot reproduce the latter either.)

It sounds like it *might* be a permission problem. Does opening other files (e.g. an empty ODT file) work when they are located in the same directory or do you get the same error message?
Comment 15 baffclan 2019-12-13 09:13:06 UTC
(In reply to Michael Weghorn from comment #14)
> It sounds like it *might* be a permission problem. Does opening other files
> (e.g. an empty ODT file) work when they are located in the same directory or
> do you get the same error message?

I tried empty files (odt, ods, odp, odg) created LibO6.3.4.2 on Windows PC.
A similar error dialog was displayed for all files.

It was opened in Collabora Office for android.

I tried it in a different directory but appear same error.
Comment 16 QA Administrators 2019-12-14 03:42:49 UTC Comment hidden (obsolete)
Comment 17 Krishna Vyas 2020-01-30 13:04:24 UTC
I'm also facing this error 'cannot open file: loadcomponentfromurl returned an empty reference' while opening every type of file, odt, ods, and odp.

Is it taking file as a URL? or Is there url encoding problems?
Please try to solve it as soon as possible. 
I have a deadline.
Comment 18 Michael Weghorn 2020-02-03 07:56:19 UTC
(In reply to Krishna Vyas from comment #17)
> I'm also facing this error 'cannot open file: loadcomponentfromurl returned
> an empty reference' while opening every type of file, odt, ods, and odp.
> 
> Is it taking file as a URL? or Is there url encoding problems?
> Please try to solve it as soon as possible. 
> I have a deadline.

Unfortunately, it's hard to say what the problem is without being able to reproduce...

Have you tried whether uninstalling and reinstalling the app helps?

Depending on how important this is for you, seeking for professional support might help to get a solution more quickly: https://www.libreoffice.org/get-help/professional-support/

Otherwise, if somebody wants to create a development setup and analyze the issue further, I'll be happy to assist. This might help to further narrow down the root cazse (and I can't do it myself as long as I cannot reproduce...).
Comment 19 Michael Weghorn 2020-04-07 13:09:04 UTC
(In reply to Michael Weghorn from comment #18)
> Have you tried whether uninstalling and reinstalling the app helps?

Also, the ADB log might help (enable Developer settings, then enable ADB and attach the 'adb logcat' output).
Comment 20 Michael Weghorn 2020-04-08 06:18:20 UTC
*** Bug 124536 has been marked as a duplicate of this bug. ***
Comment 21 baffclan 2020-06-02 11:16:24 UTC
Cannot reproduce with Newest LibreOffice Viewer.

Android-ARM@86-TDF / 2020-05-31_01.52.58
Version: 7.1.0.0.alpha0+
BuildID: 2047a59
Comment 22 Xisco Faulí 2020-06-02 11:19:44 UTC
Thanks for rechecking. Let's close it as RESOLVED WORKSFORME then
Comment 23 baffclan 2020-06-02 11:31:18 UTC
-> v.