Issue 58335 - exists method of SimpleFileAccess Service freezes Office
Summary: exists method of SimpleFileAccess Service freezes Office
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: thorsten.martens
QA Contact: Unknown
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-23 10:50 UTC by berend.cornelius
Modified: 2013-02-24 21:00 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Document with attached macro. Macro is started on document open (59.94 KB, application/vnd.sun.xml.writer)
2005-11-23 10:52 UTC, berend.cornelius
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description berend.cornelius 2005-11-23 10:50:07 UTC
starting the macro of the document attached sometimes freezes the office
application. 
The freeze occurs when the exists method of the SimpleFileAccess Object is
called. Unrfortunately this cannot be reproduced regularly but only sometimes. I
also could not reproduce the bug withe the following stripped down macro:

Public const SFILEURL =
"http://so-doc.germany.sun.com/Teams/User_Experience/Templates/development/versions"
	Sub Initialize
		oUcb = CreateUnoService("com.sun.star.ucb.SimpleFileAccess")
		Msgbox "Datei '" &  SFILEURL & "' existiert: "  &	oUcb.Exists(SFILEURL)
	End Sub

This task should be higher prioritized because the document is designed to be
the future specification template and therefor relies on the stability of its
macro. 
BC->AB: If you have a suggestion how to modify the macro that it works fine  I
would be grateful two. In this case the task could also be fixed with a lower
target.
Comment 1 berend.cornelius 2005-11-23 10:52:22 UTC
Created attachment 31730 [details]
Document with attached macro. Macro is started on document open
Comment 2 ab 2005-12-07 12:16:29 UTC
Hint: Most of the time I had problems to reproduce this pro-
blem when starting soffice from msdev. Starting it outside 
and connecting to the process afterwards worked better.

The OFileAccess::exists method (located in fileaccess\source\
FileAccess.cxx) only tries to open a file for reading. If an 
XInputStream is available the file is considered to be exi-
sting. The problem occurs when the XInputStream reference is 
released.

This of cause calls the XInputStream dtor and finally leads to
a call to osl_joinWithThread that obviously fails:

ucbhelper3MSC.dll!osl::Thread::join()  Line 127 + 0xc	C++
ucbhelper3MSC.dll!ucb_impl::InputStream::~InputStream()  Line 568 + 0x12	C++
ucbhelper3MSC.dll!ucb_impl::InputStream::`scalar deleting destructor'()  + 0xf	C++
cppuhelper3MSC.dll!cppu::OWeakObject::release()  Line 234 + 0x1f	C++
ucbhelper3MSC.dll!cppu::WeakImplHelper2<com::sun::star::io::XInputStream,com::sun::star::io::XSeekable>::release()
 Line 121 + 0xc	C++
fileacc.dll!05a11c06() == OFileAccess::exists

The code in SimpleFileAccess is very basic and uses the ucb::
Content helper functionality. The code doesn't care about
threads at all and I can't see any problem in this scenario.
So I assume the problem to be located in ucbhelper.

Comment 3 andreas.bille 2005-12-09 10:36:27 UTC
acc
Comment 4 matthias.mueller-prove 2006-01-17 11:47:04 UTC
added mmp to cc. I could hardly stop myself to change the prio to P2. This issue
is crucial for the new spec template
<http://specs.openoffice.org/collaterals/template/OpenOffice-org-Specification-Template.ott>
Comment 5 andreas.bille 2006-01-17 15:59:31 UTC
removed blocking state from downloading state on termination.
Comment 6 andreas.bille 2006-02-02 18:22:36 UTC
verified

re-open issue and reassign to tm@openoffice.org
Comment 7 andreas.bille 2006-02-02 18:22:41 UTC
reassign to tm@openoffice.org
Comment 8 andreas.bille 2006-02-02 18:22:45 UTC
reset resolution to FIXED
Comment 9 thorsten.martens 2006-02-07 09:21:02 UTC
Checked and verified in cws nfslockproblem -> OK !
Comment 10 thorsten.martens 2006-02-17 09:22:41 UTC
Verified in 680m1 build -> closed !