To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=109191
User sb changed the following:
What |Old value |New value
================================================================================
Status|UNCONFIRMED |RESOLVED
--------------------------------------------------------------------------------
Resolution| |FIXED
--------------------------------------------------------------------------------
------- Additional comments from [email protected] Thu Oct 28 12:34:26 +0000
2010 -------
I could observe the problem once (but unfortunately only once), when setFormula
is called within the initialization loop in createDocument,
for (...) {
XCell cellIn = sheet.getCellByPosition(i, j);
cellIn.setFormula("Test");
}
What appears to have happened is that for one such cellIn Java-side URP proxy
object (see jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java),
finalize was called while the setFormula call was still in progress, and the
remote URP side (soffice.bin) saw the release request for the object before
seeing the setFormula request, at which time the relevant C++ object had already
been destroyed, so the C++-side URP code could no longer map the transferred
object ID to a known object.
That it can in general happen that a Java object is finalized while a call to
one of its methods is still in progress can be seen with the below program,
which for me consistently prints the "finalized" message before the "call"
message:
public final class Test {
public static void main(String[] arguments) throws Exception {
for (int i = 0; i < 10; ++i) {
new Instance().call();
}
}
private Test() {}
private static final class Instance {
public Instance() {}
public void call() throws InterruptedException {
int n = 0;
for (int i = 0; i < 1000; ++i) {
int a[] = new int[1000];
for (int j = 0; j < 1000; ++j) {
a[j] = j;
}
for (int j = 1000; j > 0; --j) {
n = (n + a[j - 1]) % 10;
}
}
System.gc();
System.runFinalization();
Thread.currentThread().sleep(1000 + n);
System.err.println("call");
}
protected void finalize() {
System.err.println("finalize");
}
}
}
<http://hg.services.openoffice.org/cws/sb132/rev/eb99db8a0ed6> should fix this.
Please let me know if this indeed fixes the problem (as I am unable to
reproduce).
(The "RemoveUnoObject called from BroadcastUno" assertion mentioned in <#desc8>
is probably unrelated after all, and is now covered by issue 115294.)
---------------------------------------------------------------------
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]