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. I posted some comments on: http://twistedmatrix.com/trac/ticket/1833 "there are architectural choices in TSR that prevent most of its use- cases from being fully tested. The biggest problem is that TSR allows the native toolkit's event loop to dictate when the reactor will stop. This has the most obvious implications when dealing with Trial. Trial assumes that reactor.run() will return after another thread calls reactor.crash(). This can't be done in Cocoa (so far as I can tell), because anything I've found that will make PyObjCTools.AppHelper.runEventLoop() stop will terminate the entire process. This seems to also be the issue for t.i.wxreactor." -phil