On Sat, Jan 9, 2010 at 10:58 PM, Graeme Gill <graeme@xxxxxxxxxxxxx> wrote: > Lars Tore Gustavsen wrote: >> >> When I run dispread it stop the measurements at about patch 340 and >> just hangs there. When I use the binary provided from Gill there is >> no such error. > > If you edit the source and change the SW_THREAD_TIMEOUT > #define to a smaller value (say 20.0 seconds), does it fail sooner ? > > If so it's a concurrent access issue with the USB driver. > > The way the switch is detected is that there is a concurrent > outstanding USB read that gets returned if the switch is hit. There > is normally a timeout of 10 minutes on this, so you get through > about 300 x 2 second display reads before it times out and the > timeout clashes with another USB read. > > The switch read is actually necessary on the Rev A and Rev B > instruments, or the instrument suffers 1.5 second internal delays. > [The Rev D. may not be so sensitive since it uses a different > micro and seems to have more buffering its USB.] > > libusb has to be able to deal with two threads accessing the > same device having independent timeouts. The original libusb V0.1 > code didn't handle that. > I changed SW_THREAD_TIMEOUT to 20 and it now crash after 107 patches. So your assumption are correct, I guess. Attached logfiles.