libftdi Archives

Subject: Re: libftdi 1.x testing

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 10 Oct 2012 11:50:47 +0800
On Wed, Oct 10, 2012 at 10:22 AM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
> On Tue, Oct 9, 2012 at 10:27 PM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
>> Somehow I got segmental fault with the find_all_pp example
>> under Mac OS X 10.7.5. This is with the latest git.
>>
>> Not so sure if this is a libusb Darwin problem or libftdi issue.
>>
>
> I think it is not a OS specific problem. I built libftdi git under
> Windows and find_all_pp crashed as well. Again eeprom
> example works fine.
>

Same thing happened under Ubuntu Linux 12.04.

mcuee@Ubuntu1204VM:~/Desktop/build/libftdi/libftdi/build/examples$
./find_all_pp -v 0x0403 -p 0xcff8
Found devices ( VID: 0x403, PID: 0xcff8 )
------------------------------------------------
Segmentation fault (core dumped)

mcuee@Ubuntu1204VM:~/Desktop/build/libftdi/libftdi/build/examples$ gdb
--args ./find_all_pp -v 0x0403 -p 0xcff8
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from
/home/mcuee/Desktop/build/libftdi/libftdi/build/examples/find_all_pp...done.
(gdb) run
Starting program:
/home/mcuee/Desktop/build/libftdi/libftdi/build/examples/find_all_pp
-v 0x0403 -p 0xcff8
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Found devices ( VID: 0x403, PID: 0xcff8 )
------------------------------------------------

Program received signal SIGSEGV, Segmentation fault.
list_add (head=0x804c228, entry=0x805549c) at libusbi.h:96
96              head->next->prev = entry;
(gdb) bt
#0  list_add (head=0x804c228, entry=0x805549c) at libusbi.h:96
#1  libusb_open (dev=0x80554c8, handle=0x804c00c) at core.c:1014
#2  0xb7d185ec in ftdi_usb_get_strings (ftdi=0x804c008, dev=0x80554c8,
    manufacturer=0xbfffeb4c "\364\277\354\267\001", mnf_len=512,
    description=0xbfffed4c "\260&з\330\355\377\277", desc_len=512,
    serial=0xbfffef4c "\001", serial_len=512)
    at /home/mcuee/Desktop/build/libftdi/libftdi/src/ftdi.c:416
#3  0xb7fd42ca in Ftdi::Context::get_strings (this=0xbffff178)
    at /home/mcuee/Desktop/build/libftdi/libftdi/ftdipp/ftdi.cpp:306
#4  0xb7fd480f in Ftdi::List::List (this=0x80554b8, devlist=0x804d3a0)
    at /home/mcuee/Desktop/build/libftdi/libftdi/ftdipp/ftdi.cpp:465
#5  0xb7fd4d34 in Ftdi::List::find_all (vendor=1027, product=53240)
    at /home/mcuee/Desktop/build/libftdi/libftdi/ftdipp/ftdi.cpp:629
#6  0x080491fc in main (argc=5, argv=0xbffff334)
    at /home/mcuee/Desktop/build/libftdi/libftdi/examples/find_all_pp.cpp:48
(gdb) quit
A debugging session is active.

        Inferior 1 [process 7487] will be killed.

Quit anyway? (y or n) y

-- 
Xiaofan

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx

Current Thread