On Dec 3, 2007 10:41 AM, Phil Christensen <phil@bubblehouse.org> wrote:
On Dec 3, 2007, at 8:47 AM, Jean-Paul Calderone wrote:
On Mon, 03 Dec 2007 14:33:44 +0100, Michele Petrazzo - Unipex srl <michele.petrazzo@unipex.it
wrote:
[snip traceback]
exceptions.ValueError: file descriptor cannot be a negative integer (-1)
and on shutdown:
[snip traceback]
How debug it?
Start looking at what has changed in wx since the previous working version, or start looking at which calls are resulting in invalid file descriptors.
Or you could try to get the Twisted unit tests to run with wxreactor, and then work on making them pass.
I'm pretty sure that this is truly impossible with the current wxreactor, and possibly any reactor that is based on TSR. I found this out while trying to implement a corefoundation reactor using wxreactor as a reference.
My actual experience with wxWidgets is limited, but as far as I can tell, the same issue exists. Tests won't run because wxreactor.stop() will never stop the toolkit's main loop by itself, and anything that makes the loop end will also terminate the process.
This isn't accurate, with regards to wxreactor - wxreactor shuts down the wx main loop using a system event, and the wx main loop is restartable so there's no intrinsic problem with doing this. The way wxreactor tries to interact with the wxApp is pretty kludgy and might result in problems, though. I'm not sure why trial has so many problems with wxreactor - stuff which works fine outside of trials environment fails hard within it. It seems to have something to do with TSR, though - its _interleave loop is raising StopIteration.