Bug 148595 - Opening any doc in Android Viewer or gtktiledviewer results in a crash
Summary: Opening any doc in Android Viewer or gtktiledviewer results in a crash
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Android Viewer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2022-04-14 16:03 UTC by Michael Weghorn
Modified: 2022-06-05 19:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2022-04-14 16:03:55 UTC
After commit 5de22d1e559cd0f1f5fa4e247f0ce153710fbeab (and ab612633003c75dfb30664db8cc8924c086a91ee), Android Viewer and gtktiledviewer crash when trying to open any doc.
Comment 1 Michael Weghorn 2022-04-14 16:05:44 UTC
Regression from

commit 5de22d1e559cd0f1f5fa4e247f0ce153710fbeab
Author: Tor Lillqvist
Date:   Wed Mar 9 11:33:16 2022 +0200

    Handle "addfont" from Collabora Online
    
    We use the AddTempDevFont() API to add a new font. Sadly there is no
    corresponding way to remove such a temporarily added font.
    
    Change-Id: I6fe61919daa5af29e964cec1caf7293aefa8ea4f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132948

Adding CC: to Tor Lillqvist

Could you please take a look at this?
Or should I just revert those commits for now?
Comment 2 How can I remove my account? 2022-04-14 17:30:44 UTC
What about the follow-up fix ab612633003c75dfb30664db8cc8924c086a91ee , does that help?
Comment 3 Michael Weghorn 2022-04-14 18:42:19 UTC
(In reply to Tor Lillqvist from comment #2)
> What about the follow-up fix ab612633003c75dfb30664db8cc8924c086a91ee , does
> that help?

Unfortunately not, that was included in my builds already.
Comment 4 Michael Weghorn 2022-04-20 15:31:44 UTC
This was fixed by:

commit 63bad2bf8dc0d1052532e92be1a18118c0398fbf
Author: Tor Lillqvist
Date:   Tue Apr 19 16:40:11 2022 +0300

    Fix regression in the iOS app (and possibly the Android and GTK apps)
    
    The problem was caused by my remote font downloading changes. We need
    to be more careful in lo_initialize() and libreofficekit_hook_2() to
    distinguish whether the code is called from "normal" Online (with
    "pre-initialisation" through lok_preinit_2()) or otherwise, for
    instance the iOS app, where not pre-initialisation is done.
    
    Sadly, this fix makes state handling in init.cxx even more complex
    with one more static Boolean flag.
    
    Change-Id: I2a8fa96740eb79725aa162cf7adc86d49a8ba603
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133175
    Tested-by: Jenkins CollaboraOffice
    Reviewed-by: Tor Lillqvist
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133196
    Tested-by: Jenkins


Thanks!