This is inside a for-loop searching through ci.connections[].
I added the following statement before the loop to find out what 'i' was,
because it seemed large:
fprintf(stderr, "UGETW(ci.numPorts) = %d\n", (int)UGETW(ci.numPorts));
Strange thing is that UGETW(ci.numPorts) is a pretty large number.
It's obvious that this is why it crashses. And it changes a lot.
I don't understand the ugen driver very well, but shouldn't the value returned
by this be somewhat consistent from run to run?
Examples of values of UGETW(ci.numPorts) are 12320, 26144, 31904 just to give examples of 3 runs (under gdb).
GDB always reports the following:
Program received signal SIGBUS, Bus error.
0x806c7ef in pconn_usb_open (pconn=0x8090000, device=0x808e060 "/dev/ugen0",
protocol=PCONN_STACK_DEFAULT) at PConnection_usb.c:643
643 if (ci.connections[i].portFunctionID == hs_usbfun_Hotsync)
(gdb)
.coldsyncrc is:
listen usb "treo90" {For your further entertainment, here's a partial result of using -d io:9:
device: /dev/ugen0;
}
bash-2.04$ ./coldsync -d io:9 -mI 2>&1 | less
/dev/ugen0: Device not configured
/dev/ugen0: Device not configured
/dev/ugen0: Device not configured
/dev/ugen0: Device not configured
/dev/ugen0: Device not configured
UGETW(ci.numPorts) = 37216
ConnectionInfo: entry 0 function unknown on port 196
ConnectionInfo: entry 1 function unknown on port 73
ConnectionInfo: entry 2 function unknown on port 195
ConnectionInfo: entry 3 function Generic on port 64
ConnectionInfo: entry 4 function unknown on port 195
ConnectionInfo: entry 5 function unknown on port 230
ConnectionInfo: entry 6 function unknown on port 0
ConnectionInfo: entry 7 function Generic on port 0
ConnectionInfo: entry 8 function Generic on port 0
ConnectionInfo: entry 9 function Generic on port 0
ConnectionInfo: entry 10 function Generic on port 0
ConnectionInfo: entry 11 function Generic on port 0
ConnectionInfo: entry 12 function Generic on port 0
ConnectionInfo: entry 13 function Generic on port 0
ConnectionInfo: entry 14 function Generic on port 0
ConnectionInfo: entry 15 function Generic on port 0
ConnectionInfo: entry 16 function Generic on port 0
ConnectionInfo: entry 17 function Generic on port 0
ConnectionInfo: entry 18 function Generic on port 0
ConnectionInfo: entry 19 function Generic on port 0
ConnectionInfo: entry 20 function unknown on port 40
ConnectionInfo: entry 21 function Generic on port 181
ConnectionInfo: entry 22 function unknown on port 40
ConnectionInfo: entry 23 function unknown on port 140
ConnectionInfo: entry 24 function unknown on port 40
ConnectionInfo: entry 25 function unknown on port 117
ConnectionInfo: entry 26 function unknown on port 40
ConnectionInfo: entry 27 function unknown on port 192
ConnectionInfo: entry 28 function unknown on port 40
ConnectionInfo: entry 29 function Generic on port 0
ConnectionInfo: entry 30 function Generic on port 0
ConnectionInfo: entry 31 function unknown on port 140
ConnectionInfo: entry 32 function unknown on port 40
ConnectionInfo: entry 33 function unknown on port 155
ConnectionInfo: entry 34 function unknown on port 40
ConnectionInfo: entry 35 function unknown on port 192
ConnectionInfo: entry 36 function unknown on port 1
ConnectionInfo: entry 37 function unknown on port 243
ConnectionInfo: entry 38 function unknown on port 191
ConnectionInfo: entry 39 function unknown on port 139
ConnectionInfo: entry 40 function unknown on port 40
ConnectionInfo: entry 41 function unknown on port 149
ConnectionInfo: entry 42 function unknown on port 40
ConnectionInfo: entry 43 function unknown on port 94
ConnectionInfo: entry 44 function unknown on port 9
ConnectionInfo: entry 45 function Generic on port 181
ConnectionInfo: entry 46 function unknown on port 40
ConnectionInfo: entry 47 function Generic on port 0
ConnectionInfo: entry 48 function Generic on port 0
ConnectionInfo: entry 49 function unknown on port 3
ConnectionInfo: entry 50 function Generic on port 0
ConnectionInfo: entry 51 function Generic on port 0
ConnectionInfo: entry 52 function unknown on port 0
ConnectionInfo: entry 53 function unknown on port 242
ConnectionInfo: entry 54 function unknown on port 191
ConnectionInfo: entry 55 function RemoteFileSys on port 0
ConnectionInfo: entry 56 function Generic on port 0
ConnectionInfo: entry 57 function Generic on port 0
ConnectionInfo: entry 58 function Generic on port 0
ConnectionInfo: entry 59 function Generic on port 2
ConnectionInfo: entry 60 function unknown on port 103
ConnectionInfo: entry 61 function unknown on port 110
ConnectionInfo: entry 62 function unknown on port 0
ConnectionInfo: entry 63 function Generic on port 0
ConnectionInfo: entry 64 function Generic on port 0
ConnectionInfo: entry 65 function Generic on port 0
ConnectionInfo: entry 66 function Generic on port 0
ConnectionInfo: entry 67 function Generic on port 0
ConnectionInfo: entry 68 function Generic on port 0
ConnectionInfo: entry 69 function Generic on port 0
ConnectionInfo: entry 70 function Generic on port 0
ConnectionInfo: entry 71 function Generic on port 0
ConnectionInfo: entry 72 function Generic on port 0
ConnectionInfo: entry 73 function Generic on port 0
ConnectionInfo: entry 74 function Generic on port 0
ConnectionInfo: entry 75 function Generic on port 0
ConnectionInfo: entry 76 function Generic on port 0
ConnectionInfo: entry 77 function Generic on port 0
ConnectionInfo: entry 78 function Generic on port 0
ConnectionInfo: entry 79 function Generic on port 0
ConnectionInfo: entry 80 function unknown on port 114
ConnectionInfo: entry 81 function unknown on port 100
ConnectionInfo: entry 82 function unknown on port 99
ConnectionInfo: entry 83 function unknown on port 32
ConnectionInfo: entry 38 function unknown on port 191
ConnectionInfo: entry 39 function unknown on port 139
ConnectionInfo: entry 40 function unknown on port 40
ConnectionInfo: entry 41 function unknown on port 149
ConnectionInfo: entry 42 function unknown on port 40
ConnectionInfo: entry 43 function unknown on port 94
ConnectionInfo: entry 44 function unknown on port 9
ConnectionInfo: entry 45 function Generic on port 181
ConnectionInfo: entry 46 function unknown on port 40
ConnectionInfo: entry 47 function Generic on port 0
ConnectionInfo: entry 48 function Generic on port 0
ConnectionInfo: entry 49 function unknown on port 3
ConnectionInfo: entry 50 function Generic on port 0
ConnectionInfo: entry 51 function Generic on port 0
ConnectionInfo: entry 52 function unknown on port 0
ConnectionInfo: entry 53 function unknown on port 242
ConnectionInfo: entry 54 function unknown on port 191
ConnectionInfo: entry 55 function RemoteFileSys on port 0
etc etc. until it core dumps.
I'm running FreeBSD 4.6-STABLE. From reading up on the hackers archive, there's no indication that upgrading will fix this, but maybe that's ancient history to the people on this list. Reading the archive indicates that sync still does not work with 4.7 or 5.0 via USB.
I've attempted to build with --with-libusb, but it does not compile.
The first problem I get is:
gcc -Wall -ansi -pedantic -g -O2 -DHAVE_CONFIG_H -I. -I./..
-I./../include -I/usr/local/include -c PConnection_libusb.c
PConnection_libusb.c:39: usb.h: No such file or directory
*** Error code 1
Stop in /goose/src/coldsync-cvs/libpconn.
*** Error code 1
Stop in /goose/src/coldsync-cvs.
bash-2.04$
Well then, usb.h is in /usr/include/dev/usb/usb.h, so I reconfigure
with
CPPFLAGS=-I/usr/include/dev/usb ./configure --with-libusband I get
gcc -Wall -ansi -pedantic -g -O2 -DHAVE_CONFIG_H -I. -I./..
-I./../include -I/usr/include/dev/usb -c PConnection_libusb.c
In file included from PConnection_libusb.c:22:
/usr/include/stdlib.h:110: warning: ANSI C does not support `long
long'
/usr/include/stdlib.h:114: warning: ANSI C does not support `long
long'
PConnection_libusb.c:74: syntax error before `usb_dev_handle'
PConnection_libusb.c: In function `usb_read':
PConnection_libusb.c:219: warning: implicit declaration of function
`usb_bulk_read'
PConnection_libusb.c:219: structure has no member named `dev'
PConnection_libusb.c:224: warning: implicit declaration of function
`usb_strerror'
PConnection_libusb.c:224: warning: format argument is not a pointer
(arg 3)
PConnection_libusb.c: In function `usb_write':
PConnection_libusb.c:239: warning: implicit declaration of function
`usb_bulk_write'
PConnection_libusb.c:239: structure has no member named `dev'
PConnection_libusb.c:243: warning: format argument is not a pointer
(arg 3)
Any advice? I'm hoping for some direction on how to pursue this.
Thanks (especially if you got this far),
Randy