https://bugs.documentfoundation.org/show_bug.cgi?id=102511

            Bug ID: 102511
           Summary: LibreOfficeKit has wrong introspection data
                    w/gobject-introspection < 1.42
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: sdk
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: mgo...@suse.com

User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101
Firefox/48.0
Build Identifier: 10m0(Build:2)

Libreoffice will accept versions of gobject-introspection as far back as 1.32.0
when configuring. However, LibreOfficeKit uses the (nullable) annotation, which
was added in the 1.42 cycle. So, if an older version is installed, then
introspection data for these functions will be generated without (nullable) for
these functions, without any obvious indication that something has gone wrong
(aside from possibly generating a warning when g-ir-scanner is run). This leads
to unexpected behavior. For instance, lok_doc_view_new() might be called with
an empty pPath string, rather than a null string, and the function does not
check for an empty string and treat it as equivalent to NULL. We could do one
of the following:
(1) replace (nullable) with (allow-none); the latter is supported by older
versions of gobject-introspection and is equivalent to (nullable) for in
parameters.
(2) Require at least version 1.42.0 of gobject-introspection.
(3) Ensure that these functions treat empty strings as equivalent to NULL.

Reproducible: Always

Steps to Reproduce:
1. Build LibreOffice on a GNOME 3.10-based system.
2. Install the resulting binaries/package.
3. Run a recent version of gnome-documents (or anything else that uses
libreofficekit via gobject-introspection).
Actual Results:  
Gnome-documents crashed, since lok_doc_view_new() does not expect to be passed
an empty string.

Expected Results:  
Gnome-documents does not crash. For SLE, I am patching to replace (nullable)
with (allow-none), and gnome-documents starts normally.




Reset User Profile?No

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to