-
August 12th, 2011, 02:47 PM
#1
Weird SwingWorker Bug HELP!
I have a SwingWorker which generates an int[][] into a variable local to the SwingWorker object in its doInBackground() method.
The done() method then assigns that int[][] to another variable.
For some reason doInBackground() assigns null to the SwingWorker local variable with certain dimensions.
int[900][891 (and down) ] gives me null
int[900][892 (and up) ] works fine (generates expected results)
int[800][792 (and down) ] gives me null
int[800][793 (and up) ] works fine
int[700][693 (and down) ] gives me null
int[700][694 (and up) ] works fine
etc....
int[708 (and up) ][700] gives me null
int[707 (and down) ] [700] works fine
etc....
The SwingWorker is NEVER canceled through my code.
The doInBackground() calls another local private thread to set the local int[][].
I've gone through the debugger in this thread and it never hits a breakpoint on any of the return statements inside it. It just seems to randomly return after a while of iterating through the temporary int[][] while generating values with a null.
I call setProgress() from within this method but I don't see why that would cause the method to return null and proceed to done() without me calling return null;
other than that its all pretty simple algebraic math being done
I'd rather not post the code unless I need to.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|