Message6057
My code started breaking under the following conditions:
- Deriving a Python class from a Java interface
- Getting a reference to self in __init__ and:
- passing self as a parameter to a Java method
Code along the lines of the following will hit this bug:
class MyRunnable (Runnable):
def __init__(self,x):
self._x = x
SwingUtilities.invokeLater( self )
Some debugging led me to the conclusion that it was because the java proxy was not initialised properly.
PyObject#proxyInit was being called.
This lead through some compiled Python class files to invoking Py#initProxy
Where:
the call to ThreadState#getInitializingProxy() returned null.
This was due to the fact that the ThreadState objects were being lost.
This seems to be because ThreadStateMapping#getThreadState determines that there is no cached thread state.
So it creates a new one.
But it does not place it into the single element array in the cache, before returning it.
Resulting in a new ThreadState being returned each time.
The attached patch attempts to address this issue. |
|
Date |
User |
Action |
Args |
2010-09-09 14:38:27 | MrMeanie | set | messageid: <1284043107.08.0.99883893114.issue1327@psf.upfronthosting.co.za> |
2010-09-09 14:38:27 | MrMeanie | set | recipients:
+ MrMeanie, fwierzbicki, amak, pjenvey, zyasoft, colinhevans, matt_brinkley, adam.spiers |
2010-09-09 14:38:26 | MrMeanie | link | issue1327 messages |
2010-09-09 14:38:25 | MrMeanie | create | |
|