[api-issues] [Issue 85875] Hang on Disposing XCompone nt/XDesktop

2010-07-07 Thread benzman81
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=85875





--- Additional comments from benzma...@openoffice.org Wed Jul  7 11:05:50 
+ 2010 ---
Hi,
i had the same problem. If I do the disposal in a new thread, then it seems to 
work.

I hope that helps.

Regards,
Markus

p.s.: Below the code I use.

try {
  new Thread() {
public void run() {
  xComponent.dispose()
}
  }.start();
}
catch (Exception e) {
  e.printStackTrace();
}

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@api.openoffice.org
For additional commands, e-mail: issues-h...@api.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[api-issues] [Issue 85875] Hang on Disposing XCompone nt/XDesktop

2008-02-05 Thread noviceprogram
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=85875
 Issue #|85875
 Summary|Hang on Disposing XComponent/XDesktop
   Component|api
 Version|OOo 2.3.0 RC1
Platform|PC
 URL|
  OS/Version|Windows 2003
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P1
Subcomponent|code
 Assigned to|jsc
 Reported by|noviceprogram





--- Additional comments from [EMAIL PROTECTED] Tue Feb  5 09:10:03 + 
2008 ---
Hello,

I am using OO to convert PPTs/ODPs to multiple PDFs(generating a pdf per slide 
of PPT). I use C# as my programming language. I use this utility from a 
windows service to convert PPTs to PDFs and I always make sure that OO is not 
called from multiple threads. I have written the following code to do so. but 
when ever i try to dispose/terminate some thing(such as xcomponent/xdesktop 
object) OO hangs. Please note that this code is working on Windows XP and 
problem occurs only to Win2K3. I have looked into bug 79541 as well but this 
does not help either because the hang seems like OS specific now.
I have tried using XCloseable's close as well but it also hangs.

The code follows:

XComponent xComponent = null; 
XComponentLoader xComponentLoader = null; 

try 
{ 
// Get the component Loader for the OO. 
xComponentLoader = this.GetComponentLoader(); 

PropertyValue[] loadProps = new PropertyValue[1]; 
PropertyValue asHidden = new PropertyValue(); 
string pptPath = “file:///C:/Test.ppt”; 

asHidden.Name = Hidden; 
asHidden.Value = new uno.Any(true); 
loadProps[0] = asHidden; 

xComponent = xComponentLoader.loadComponentFromURL(pptPath, _blank, 0, 
loadProps); 

unoidl.com.sun.star.drawing.XDrawPagesSupplier xDrawPagesSupplier 
= (unoidl.com.sun.star.drawing.XDrawPagesSupplier)xComponent; 

// XDrawPages inherits from com.sun.star.container.XIndexAccess 
unoidl.com.sun.star.drawing.XDrawPages xDrawPages 
= xDrawPagesSupplier.getDrawPages(); 

// get the page count for standard pages 
int slideCount = xDrawPages.getCount(); 

xComponent.dispose(); 

// The following way is very slow, but i could not find a better 
// way to do this. 
for (int index = 0; index  slideCount; ++index) 
{ 

pdfOutPath += outFileName + _ + index + .pdf; 
ooOutPath = ToOOURL(pdfOutPath); 

xComponent = xComponentLoader.loadComponentFromURL(pptPath, 
_blank, 0, loadProps); 

while (xComponent == null) 
{ 
/Let the component load. 
System.Threading.Thread.Sleep(1000); 
} 

xDrawPagesSupplier = (unoidl.com.sun.star.drawing.XDrawPagesSupplier)
xComponent; 

// XDrawPages inherits from com.sun.star.container.XIndexAccess 
xDrawPages = xDrawPagesSupplier.getDrawPages(); 

XStorable xstorable = (XStorable)xComponent; 

// Remove all the slides except this one. 
for (int removeSlide = slideCount - 1; removeSlide = 0; --removeSlide) 
{ 
if (removeSlide != index) 
{ 
unoidl.com.sun.star.drawing.XDrawPage removePage 
= (unoidl.com.sun.star.drawing.XDrawPage) 
xDrawPages.getByIndex(removeSlide).Value; 

// Remove the Slide. 
xDrawPages.remove(removePage); 
} 
} 

PropertyValue[] props = new PropertyValue[1]; 

props[0] = new PropertyValue(); 
props[0].Name = FilterName; 
props[0].Value = new uno.Any(“impress_pdf_export”); 


// Store to the given path. 
xstorable.storeToURL(ooOutPath, props); 

xComponent.dispose();  // This line causes problem
} 
} 
catch (System.Exception e) 
{ 
string errorStr = Can't Convert Using Open Office; 
} 
finally 
{ 


// Quit Open Office. 
((XDesktop)xComponentLoader).terminate();  // This line as well.
} 
[/b]

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[api-issues] [Issue 85875] Hang on Disposing XCompone nt/XDesktop

2008-02-05 Thread jsc
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=85875


User jsc changed the following:

What|Old value |New value

 Assigned to|jsc   |as





--- Additional comments from [EMAIL PROTECTED] Tue Feb  5 12:57:39 + 
2008 ---
jsc - as: maybe you want to comment this issue. I would say the right approach
is to use XCloseable as mentioned before. But anyway the office shouldn't crash.

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[api-issues] [Issue 85875] Hang on Disposing XCompone nt/XDesktop

2008-02-05 Thread jsc
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=85875





--- Additional comments from [EMAIL PROTECTED] Tue Feb  5 12:37:27 + 
2008 ---
query the XComponent or XCloseable and use close 

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[api-issues] [Issue 85875] Hang on Disposing XCompone nt/XDesktop

2008-02-05 Thread jsc
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=85875


User jsc changed the following:

What|Old value |New value

Priority|P1|P3





--- Additional comments from [EMAIL PROTECTED] Tue Feb  5 12:55:53 + 
2008 ---
change prio, no P1

please use default priorities if you are not sure which you have to use.


-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[api-issues] [Issue 85875] Hang on Disposing XCompone nt/XDesktop

2008-02-05 Thread syoungstephen
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=85875





--- Additional comments from [EMAIL PROTECTED] Tue Feb  5 18:45:27 + 
2008 ---
I have the same issue when running on Windows 2003.

Using XCloseable calls Dispose anyway, which then hangs without returning and
with no exception.

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]