Bug 154920 - Crash when I convert rtf to pdf with version higher than 7.4.3
Summary: Crash when I convert rtf to pdf with version higher than 7.4.3
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.4.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-20 03:14 UTC by linronghan
Modified: 2023-04-24 09:42 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
a rtf file (3.25 MB, application/rtf)
2023-04-20 03:16 UTC, linronghan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description linronghan 2023-04-20 03:14:44 UTC
Description:
I use jodconverter to convert rtf to pdf,the simple code:

LocalConverter.Builder builder = LocalConverter.builder();
builder.applyDefaultLoadProperties(true);
builder.useUnsafeQuietUpdate(true);
builder.officeManager(officeManager);
localConverter = builder.build();
localConverter.convert(new File(input)).to(new File(output)).execute();

when the libreoffice version is 7.2.6.2, it convert success.
whten the version is 7.4.3 and latest 7.5.2,it fail,the log:

com.sun.star.lang.DisposedException: null
    at com.sun.star.lib.uno.environments.remote.JobQueue.removeJob(JobQueue.java:201) ~[libreoffice-7.4.1.jar:?]
    at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:308) ~[libreoffice-7.4.1.jar:?]
    at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:281) ~[libreoffice-7.4.1.jar:?]
    at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:81) ~[libreoffice-7.4.1.jar:?]
    at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:619) ~[libreoffice-7.4.1.jar:?]
    at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:145) ~[libreoffice-7.4.1.jar:?]
    at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:129) ~[libreoffice-7.4.1.jar:?]
    at com.sun.proxy.$Proxy102.loadComponentFromURL(Unknown Source) ~[?:?]
    at org.jodconverter.local.task.AbstractLocalOfficeTask.loadDocumentFromURL(AbstractLocalOfficeTask.java:239) ~[jodconverter-local-4.4.5.jar:4.4.5]
    at org.jodconverter.local.task.AbstractLocalOfficeTask.loadDocument(AbstractLocalOfficeTask.java:203) ~[jodconverter-local-4.4.5.jar:4.4.5]
    at org.jodconverter.local.task.LocalConversionTask.execute(LocalConversionTask.java:128) ~[jodconverter-local-4.4.5.jar:4.4.5]
    at org.jodconverter.local.office.LocalOfficeManagerPoolEntry.doExecute(LocalOfficeManagerPoolEntry.java:120) ~[jodconverter-local-4.4.5.jar:4.4.5]
    at org.jodconverter.core.office.AbstractOfficeManagerPoolEntry.lambda$execute$0(AbstractOfficeManagerPoolEntry.java:80) ~[jodconverter-core-4.4.5.jar:4.4.5]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_352]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_352]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_352]
    at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_352]
Caused by: java.io.IOException: EOF reached - socket,host=127.0.0.1,port=8101,tcpNoDelay=1,localHost=localhost,localPort=38578,peerHost=localhost,peerPort=8101
    at com.sun.star.lib.uno.bridges.java_remote.XConnectionInputStream_Adapter.read(XConnectionInputStream_Adapter.java:50) ~[libreoffice-7.4.1.jar:?]
    at java.io.DataInputStream.readInt(DataInputStream.java:387) ~[?:1.8.0_352]
    at com.sun.star.lib.uno.protocols.urp.urp.readBlock(urp.java:364) ~[libreoffice-7.4.1.jar:?]
    at com.sun.star.lib.uno.protocols.urp.urp.readMessage(urp.java:96) ~[libreoffice-7.4.1.jar:?]
    at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.run(java_remote_bridge.java:92) ~[libreoffice-7.4.1.jar:?]
Caused by: com.sun.star.io.IOException: EOF reached - socket,host=127.0.0.1,port=8101,tcpNoDelay=1,localHost=localhost,localPort=38578,peerHost=localhost,peerPort=8101
    at com.sun.star.lib.connections.socket.SocketConnection.read(SocketConnection.java:155) ~[libreoffice-7.4.1.jar:?]
    at com.sun.star.lib.uno.bridges.java_remote.XConnectionInputStream_Adapter.read(XConnectionInputStream_Adapter.java:48) ~[libreoffice-7.4.1.jar:?]
    at java.io.DataInputStream.readInt(DataInputStream.java:387) ~[?:1.8.0_352]
    at com.sun.star.lib.uno.protocols.urp.urp.readBlock(urp.java:364) ~[libreoffice-7.4.1.jar:?]
    at com.sun.star.lib.uno.protocols.urp.urp.readMessage(urp.java:96) ~[libreoffice-7.4.1.jar:?]
    at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.run(java_remote_bridge.java:92) ~[libreoffice-7.4.1.jar:?]



Steps to Reproduce:
1.open rtf file in window version 7.4.3
2.export to pdf
3.

Actual Results:
software crash

Expected Results:
export or convert success


Reproducible: Always


User Profile Reset: No

Additional Info:
I try to convert the rtf file to pdf in windows libreoffice(7.4.3),the software carsh too. 7.5.2 Will succeed after experiencing a short period of freeze。
Comment 1 linronghan 2023-04-20 03:16:05 UTC
Created attachment 186801 [details]
a rtf file
Comment 2 Julien Nabet 2023-04-20 07:51:53 UTC
Since jodconverter uses Java, I wonder if it could be due to the RAM consumption by Java treatment.
Did you try with:
soffice --convert-to pdf --outdir ./ *.rtf
?

About the fact 7.2.6.2 was ok, was the conversion ok and on this exact file?
Indeed, I took a look at the result on LO with master sources updated today (so future 7.6.0), it seems there are layout pbs.
Comment 3 linronghan 2023-04-24 09:06:58 UTC
(In reply to Julien Nabet from comment #2)
> Since jodconverter uses Java, I wonder if it could be due to the RAM
> consumption by Java treatment.
> Did you try with:
> soffice --convert-to pdf --outdir ./ *.rtf
> ?
> 
> About the fact 7.2.6.2 was ok, was the conversion ok and on this exact file?
> Indeed, I took a look at the result on LO with master sources updated today
> (so future 7.6.0), it seems there are layout pbs.

thank you for your reply. 
I try 
soffice --convert-to pdf --outdir ./ *.rtf

The 7.5.2 version was successfully converted, which took 5 minutes.
The 7.4.3 version waited for more than 35 minutes and still did not complete the conversion
Comment 4 Julien Nabet 2023-04-24 09:42:03 UTC
Thank you for your feedback, let's put this one to WFM then.