Apache OpenOffice (AOO) Bugzilla – Issue 75731
textoutputstream.writeString crashes openoffice
Last modified: 2017-05-20 10:35:40 UTC
Dim b as Object b = createUnoService("com.sun.star.io.TextOutputStream") b.setEncoding("UTF-16") b.writeString("test1") executing this code crashes all openoffice components. I am using rc4 from http://ftp.linux.cz/pub/localization/OpenOffice.org/devel/680/ Regards Alban
This issue may not be critical as I do not set an outputstream which is required. As told in http://api.openoffice.org/docs/common/ref/com/sun/star/io/TextOutputStream.html ... Though it ought to raise an exception instead of crashing openoffice Regards Alban
added jsc to cc list
mmh, the documentation (http://api.openoffice.org/docs/common/ref/com/sun/star/io/TextOutputStream.html) says that the output stream has to be set initially with setOutputStream. I would say it's a bad implementation, it should at least throw an exception if the output stream is invalid. Seems to be a valid issue but no show-stopper.
set target to 2.x
Hi Joost, I'm just reassigning this one to you, because i do not understand why you have set a target without confirming. Best regards from Beijing Peter
JA->JSC: as you already confirmed this issue I'll forward it to you
.
accepted
change target from 2.x to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
during reviewing issues assigned to me and playing with XCode debugging and MacOS 64 bit I stumbled over this old issue and fixed it. IOException is now thrown that the output stream is not initialized and that setOutputStream have to be used first.
"jsc" committed SVN revision 1534248 into trunk: #75731# check output stream and throw IOExceptioin if it is not intiliazed svnbz message delay caused by perl problems after Bugzilla 4.4.1 update
Created attachment 82727 [details] runtime error when run the macro ,error occurred.
AOO410m1(build:9750) - rev:1566593
Reopen per Shao Zhi Zhao's comment 12
The runtime error in Basic is exactly the expected behaviour after the fix. The screenshot shows the thrown exception with detailed message that the output stream is not set. The user get the runtime error box but no crash.
verified on MacOS, get the expected Basic runtime error but no crash
I can confirm the fix on local build of branch AOO410, rev. 1582710
Verified on Ubuntu 10.04 (64bit) with build from branch AOO410 (rev. 1583666)