[Libreoffice-bugs] [Bug 123466] New: Suspicious Log Messages about String comparison

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Feb 14 13:48:03 UTC 2019


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

            Bug ID: 123466
           Summary: Suspicious Log Messages about String comparison
           Product: LibreOffice
           Version: unspecified
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: sdk
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: p.pares at castsoftware.com

Created attachment 149297
  --> https://bugs.documentfoundation.org/attachment.cgi?id=149297&action=edit
Small docx related to the error messages

When I run the attached Java code with the doc attached.
I got the following messages:

CE> E:  file lt-string.c: line 189: assertion `string != ((void *)0)' failed
CE> E:  l)file lt-string.c: line 189: assertion `string != ((void *)0)' failed
CE> E:  l)file lt-string.c: line 189: assertion `string != ((void *)0)' failed
CE> E:  l)file lt-string.c: line 189: assertion `string != ((void *)0)' failed

On different runs the message differ a little bit:
CE> E:  file lt-string.c: line 189: assertion `string != ((void *)0)' failed
CE> E:  l)file lt-string.c: line 189: assertion `string != ((void *)0)' failed
CE> E:  l)file lt-string.c: line 189: assertion `string != ((void *)0)' failed
CE> E:  sfile lt-string.c: line 189: assertion `string != ((void *)0)' failed

It looks like a memory corruption.

Below the Java code calling the SDK:
--------------------------------------------------------
import java.util.Date;
import java.io.File;
import com.sun.star.beans.PropertyValue;
import com.sun.star.comp.helper.Bootstrap;
import com.sun.star.frame.XComponentLoader;
import com.sun.star.frame.XDesktop;
import com.sun.star.frame.XStorable;
import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.text.XTextDocument;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import com.sun.star.util.XReplaceDescriptor;
import com.sun.star.util.XReplaceable;

public class LibreOffice {

    public static void main(String[] args) 
    {
        XDesktop xDesktop = null;
        int exitCode = 0;

        try {
            // Initialise
            XComponentContext xContext = Bootstrap.bootstrap();
            XMultiComponentFactory xMCF = xContext.getServiceManager();
            Object oDesktop =
xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", xContext);
            xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class,
oDesktop);
            documentConvert(xDesktop, "D:/MyData/pdf/docx/toto.docx",
"D:/MyData/pdf/pdf/toto.pdf");

        }
        catch (Exception e)
        {
            e.printStackTrace();
            exitCode = 1;
        }
        if(xDesktop != null)
           xDesktop.terminate();

        System.exit(exitCode);
    }

    public static void documentConvert (XDesktop xDesktop, String inputPath,
String outputPath) throws Exception 
    {    

        // Load the Document
        File inputFile = new File (inputPath);

        if (!inputFile.canRead()) {
            throw new RuntimeException("Cannot load document:" + inputFile);
        }

        XComponentLoader xCompLoader = (XComponentLoader)
UnoRuntime.queryInterface(com.sun.star.frame.XComponentLoader.class, xDesktop);

        PropertyValue[] propertyValues = new PropertyValue[0];

        propertyValues = new PropertyValue[1];
        propertyValues[0] = new PropertyValue();
        propertyValues[0].Name = "Hidden";
        propertyValues[0].Value = new Boolean(true);

        XComponent xComp = xCompLoader.loadComponentFromURL("file:///" +
inputPath, "_blank", 0, propertyValues);
        /*
        // save as a PDF 
        XStorable xStorable = (XStorable)
UnoRuntime.queryInterface(XStorable.class, xComp);

        propertyValues = new PropertyValue[2];
        propertyValues[0] = new PropertyValue();
        propertyValues[0].Name = "Overwrite";
        propertyValues[0].Value = new Boolean(true);
        propertyValues[1] = new PropertyValue();
        propertyValues[1].Name = "FilterName";
        propertyValues[1].Value = "writer_pdf_Export";

        // Appending the favoured extension to the origin document name
        String outputFile = outputPath;
        System.out.println("before");           
        System.out.println(xStorable + "-" + "file:///" + outputFile +  "-" +
propertyValues);
        xStorable.storeToURL("file:///" + outputFile, propertyValues);

        System.out.println("Saved " + outputFile);
        */
    }
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190214/781cbd48/attachment-0001.html>


More information about the Libreoffice-bugs mailing list