Discussion:
[Bitpim-devel] BitPim mac issues...
Steven Palm
2004-04-29 16:52:24 UTC
Permalink
Not sure what's going on here, Roger, but on a clean machine I can't
get USB to work at the moment... It won't show any of the USB interface
ports of the phone in the comscsan box. Very odd.

Given that I'm behind times here, extremely busy and holding you up,
why don't you take a pass on -test9 for the Mac, at least for now. I
can freeze my build environment here and keep working on issues, and
get you one as time permits. That will let you commit further changes
for -test10.

Steve
Steven Palm
2004-04-29 17:12:09 UTC
Permalink
Post by Steven Palm
Not sure what's going on here, Roger, but on a clean machine I can't
get USB to work at the moment... It won't show any of the USB
interface ports of the phone in the comscsan box. Very odd.
Also, as for bitfling...

On the machine with the phone connected I run bitfling, and on a
remote host (with bitfling enabled) I attempt to do a "test". It sits
there for a VERY long time (ten plus minutes at this point) toggling
menu items on and off (enable/disable), but no output anywhere... (Same
behavior as when I ran it on the same machine)

In the console I ran bitfling from, I saw this fairly quickly at the
beginning:

./BitPim.app/Contents/MacOS/BitPim bitfling
ica of ('192.168.168.106', None, None)
ica of ('192.168.168.106', None, None)
ica of ('192.168.168.106', 'n9yty', u'testpass')

And then nothing.
Roger Binns
2004-04-29 20:53:55 UTC
Permalink
Post by Steven Palm
In the console I ran bitfling from, I saw this fairly quickly at the
./BitPim.app/Contents/MacOS/BitPim bitfling
ica of ('192.168.168.106', None, None)
ica of ('192.168.168.106', None, None)
ica of ('192.168.168.106', 'n9yty', u'testpass')
ica stands for "is connection allowed". The first two are the code
checking if the specific address can connect, with the latter
verifying a username/password from an address.
Post by Steven Palm
toggling menu items on and off (enable/disable)
This is due to an accidental implementation detail about a
year ago :-) [Yes I do make mistakes].

The com/usbscan code runs in the gui thread. The BitFling stuff
runs in a secondary thread. The problem is that the BitFling client
may need to get a certificate verified, so it Posts a message to
the gui thread. That confuses the heck out everything,
as the gui thread may have called bitflingscan and be blocked
waiting for a result, and the bitfling thread posts a message
asking for the certificate to be verified. They would deadlock
forever.

So instead the gui thread stays stuck in a loop like this:

while responseq.empty(): # this is the object results from bitfling thread
# come back in
wx.SafeYield() # need to run this as certficate verification message
# may be sent to this gui thread

SafeYield on Mac and Linux disables and enables the UI.

The fix is going to be moving bitfling/com/usbscan to the worker thread.

Roger
Roger Binns
2004-04-29 20:56:14 UTC
Permalink
Post by Steven Palm
Not sure what's going on here, Roger, but on a clean machine I can't
get USB to work at the moment... It won't show any of the USB interface
ports of the phone in the comscsan box. Very odd.
Given that I'm behind times here, extremely busy and holding you up,
why don't you take a pass on -test9 for the Mac, at least for now.
I have done a tag BITPIM_0_7_TEST9 so you can work against that.
(It is a straight forward tag, not a branch).

Roger

Loading...