<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Suspicious Log Messages about String comparison"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=123466">123466</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Suspicious Log Messages about String comparison
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>sdk
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>p.pares@castsoftware.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=149297" name="attach_149297" title="Small docx related to the error messages">attachment 149297</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=149297&action=edit" title="Small docx related to the error messages">[details]</a></span>
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);
*/
}
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>