Oh Just a thought while posting this if this is called on another thread is it the same object as in the main thread.?????????
As this is For Beginners, I'm going to recommend you rip out everything thread-related in your program right now.
Threading adds concurrency bugs and race conditions. If you thought this class of bugs was bad, concurrency bugs are far worse, since they are the same type of bugs compounded across a dimension of additional processes.
Remember when I wrote "Coming in after memory corruption errors and race conditions, I'd rank it as probably the third biggest source of the nasty evil nemesis bugs that can haunt a code base for months or even years before isolating it and finding a fix" above?
What you are saying is "I'm having trouble with the third-worst source of nasty bugs. Now I want to throw in the second-most evil source of nightmare fuel, and both of those sources can trigger the absolute worst of the three: memory corruption bugs. STOP. DO NOT PASS GO.
"Threading" and "For Beginners" are a terrible mix unless you enjoy spending your days hunting seemingly random crashes rather than learning useful material.
I strongly recommend you remove everything related to threading in your personal project, and stick with the much simpler realm of linear programming.