summaryrefslogtreecommitdiff
path: root/jurt
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2016-04-01 15:27:52 +0100
committerMichael Meeks <michael.meeks@collabora.com>2016-04-13 09:06:52 +0100
commit964787c6b9cf834639298081b0168dd1593ee4e1 (patch)
tree443e8fdaef103eb12aaa6ab71c943b499f756dea /jurt
parent40145dd46c2bade0873cf75433de4d4db585885d (diff)
Java debugging agro.
Diffstat (limited to 'jurt')
-rw-r--r--jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java26
1 files changed, 24 insertions, 2 deletions
diff --git a/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java b/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java
index 2572c5c6412f..ab6599b171c9 100644
--- a/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java
+++ b/jurt/com/sun/star/lib/uno/environments/remote/JobQueue.java
@@ -19,6 +19,7 @@
package com.sun.star.lib.uno.environments.remote;
import java.text.*;
+import java.util.*;
import com.sun.star.lang.DisposedException;
/**
@@ -85,6 +86,24 @@ public class JobQueue {
}
}
+ public static void printTrace()
+ {
+ Map<Thread, StackTraceElement[]> trace = Thread.getAllStackTraces();
+ Set<Thread> set = trace.keySet();
+ Iterator<Thread> i = set.iterator();
+ while(i.hasNext())
+ {
+ Thread key = i.next();
+ System.out.println("Trace information for the thread " + key);
+ StackTraceElement[] frames = trace.get(key);
+
+ for(int j = 0; j < frames.length; j++){
+ System.err.println(frames[j]);
+ }
+ System.err.println();
+ }
+ }
+
/**
* A thread for dispatching jobs.
*/
@@ -288,13 +307,16 @@ public class JobQueue {
int count = 0;
for (Job i = _head; i != null; i = i._next)
{
- if (i.isRequest())
+ if (!i.isRequest())
multipleReturns = true;
count++;
}
if (multipleReturns)
- printDebug("ERROR: MULTIPLE RETURNS");
+ {
+ printDebug("ERROR: MULTIPLE RETURNS.patch.2");
+ printTrace();
+ }
if(DEBUG) printDebug("##### " + getClass().getName() + ".putJob to queue of " + count);
printDebug("new job : " + job.toString());
for (Job i = _head; i != null; i = i._next)