Subject: Re: Crash on unplug
>>>>> "Tim" == Tim Schneider <schneid5@xxxxxxxxxxxxxx> writes:
Tim> Hello, after I was helped here really quick with my last problem,
Tim> I'm hoping you guys can also help me with this:
Tim> When I have a ftdi device connected and I'm reading data from it
Tim> via libftdi, the program crashes if I just unplug the device. Of
Tim> course one should never do that but I thought, the ftdi_read_data
Tim> call would return some kind of error code if it did
Tim> happen. Unfortunately it doesn't.
Tim> Is this the normal behavior? Are there any ways how to detect
Tim> weather the device has been disconnected before calling the read
Tim> function? Any Ideas how to fix or work around this?
You have to digg into libusb and libftdi to understand what's going on and
howto fix it. Does the crash happen in libusb, libftdi or your user program.
If it happens in your user program, what was the return value ?
What version of libusb do you use?
Uwe Bonnes bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx