Serial object problems, crashes

barry threw's icon

Hello,

I keep having problems with the serial object under OS X, 4.6.3. I
am trying to interface a SparkFun WiTilt, via serial. My problems are:

1) If I give the serial object the "print" command to list serial
ports, attach to the WiTilt port, then hit "print" again, the port
letters change in the listing.

2) I follow a very strict order of operations and I can get my WiTilt
reporting. However, if I close the patch and immediately open it
again, and try to follow the same order, Max will hang - presumably
forever. If I force quit Max, and then try and start it, it won't
start. Furthermore, if I list with ps -aux, and find the max pid:

barry 280 0.0 -0.0 0 0 ?? E 3:06PM 0:00.00
(MaxMSP)

Then try to kill it, it won't kill. I can't even kill -9 Max. The
only way to get it to close is a reboot.

It seems as if the serial object has, errr, issues. Any advice?

b

--
barry threw
composition : sound : programming
http://www.barrythrew.com
bthrew(at)gmail(dot)com
857-544-3967

And I know not if, save in this, such gift be allowed to man,
That out of three sounds he frame, not a fourth sound, but a star.
-Robert Browning

Jeremy's icon

I was using serial with a WiTilt for a while, as well, and had some
problems. My theory is that the WiTilt regularly drops the connection
and reconnects. At the time, I blamed it on the battery I was using
and let it go, since I wasn't working on anything important. In
general, though, the serial object doesn't appreciate being hung up
on and, although it tries to compensate, it doesn't always succeed.

I would love to tell you that I have a near-term solution to the
problem. But I don't, and chances are slim that there's going to be
one (until the near-term is over and the mid-term has begun). I
wonder if you can do some serial comm over mxj/java with greater
success?

jb

Am 07.06.2007 um 00:28 schrieb barry threw:

> It seems as if the serial object has, errr, issues. Any advice?

barry threw's icon

FWIW I did some more playing with the WiTilt, and the crash problems
*seem* to stem from the serial buffer being full...

With the higher data transmission rates, 70-100Hz, the device doesn't
receive the space bar command to stop transmission for some
time...and my qmetro was set too slow to get all of that data out of
the buffer before max closed. If I close the serial connection
before the witilt gets the stop transmission message, then that when
I experience the tragic "can't kill max" crash.

Not sure what the actual cause of these symptoms are...but it looks
like there is data buildup somewhere. If I lower the transmission
rate on the witilt, things run much more smoothly.

b

On Jun 6, 2007, at 3:42 PM, Jeremy Bernstein wrote:

> I was using serial with a WiTilt for a while, as well, and had some
> problems. My theory is that the WiTilt regularly drops the
> connection and reconnects. At the time, I blamed it on the battery
> I was using and let it go, since I wasn't working on anything
> important. In general, though, the serial object doesn't appreciate
> being hung up on and, although it tries to compensate, it doesn't
> always succeed.
>
> I would love to tell you that I have a near-term solution to the
> problem. But I don't, and chances are slim that there's going to be
> one (until the near-term is over and the mid-term has begun). I
> wonder if you can do some serial comm over mxj/java with greater
> success?
>
> jb
>
> Am 07.06.2007 um 00:28 schrieb barry threw:
>
>> It seems as if the serial object has, errr, issues. Any advice?
>

barry threw
composition : sound : programming
http://www.barrythrew.com
bthrew(at)gmail(dot)com
857-544-3967

And I know not if, save in this, such gift be allowed to man,
That out of three sounds he frame, not a fourth sound, but a star.
-Robert Browning

Jeremy's icon

Thanks, Barry, this is helpful. I'll keep you posted, once I've had a
moment to investigate this some more.

jb

Am 09.06.2007 um 01:02 schrieb barry threw:

> FWIW I did some more playing with the WiTilt, and the crash
> problems *seem* to stem from the serial buffer being full...
>
> With the higher data transmission rates, 70-100Hz, the device
> doesn't receive the space bar command to stop transmission for some
> time...and my qmetro was set too slow to get all of that data out
> of the buffer before max closed. If I close the serial connection
> before the witilt gets the stop transmission message, then that
> when I experience the tragic "can't kill max" crash.
>
> Not sure what the actual cause of these symptoms are...but it looks
> like there is data buildup somewhere. If I lower the transmission
> rate on the witilt, things run much more smoothly.
>
> b
>
> On Jun 6, 2007, at 3:42 PM, Jeremy Bernstein wrote:
>
>> I was using serial with a WiTilt for a while, as well, and had
>> some problems. My theory is that the WiTilt regularly drops the
>> connection and reconnects. At the time, I blamed it on the battery
>> I was using and let it go, since I wasn't working on anything
>> important. In general, though, the serial object doesn't
>> appreciate being hung up on and, although it tries to compensate,
>> it doesn't always succeed.
>>
>> I would love to tell you that I have a near-term solution to the
>> problem. But I don't, and chances are slim that there's going to
>> be one (until the near-term is over and the mid-term has begun). I
>> wonder if you can do some serial comm over mxj/java with greater
>> success?
>>
>> jb
>>
>> Am 07.06.2007 um 00:28 schrieb barry threw:
>>
>>> It seems as if the serial object has, errr, issues. Any advice?
>>
>
> barry threw
> composition : sound : programming
> http://www.barrythrew.com
> bthrew(at)gmail(dot)com
> 857-544-3967
>
> And I know not if, save in this, such gift be allowed to man,
> That out of three sounds he frame, not a fourth sound, but a star.
> -Robert Browning
>
>

yair reshef's icon

serial on windows is still problematic. it starts off good but after a
while- quicker if switching apps- the clock drops from qmetro 20ms to 150.
for now i can work with terminal logging as this is not real time.
please cycling, look into it when holidays/max5 is over.
i cant offer a bug report as even the help file is effected by it. and there
are no spectacular crashes, just a slowdown.
any tips? slower metro, baud rate?

On Jun 11, 2007 12:39 PM, Jeremy Bernstein wrote:

> Thanks, Barry, this is helpful. I'll keep you posted, once I've had a
> moment to investigate this some more.
>
> jb
>
> Am 09.06.2007 um 01:02 schrieb barry threw:
>
> > FWIW I did some more playing with the WiTilt, and the crash
> > problems *seem* to stem from the serial buffer being full...
> >
> > With the higher data transmission rates, 70-100Hz, the device
> > doesn't receive the space bar command to stop transmission for some
> > time...and my qmetro was set too slow to get all of that data out
> > of the buffer before max closed. If I close the serial connection
> > before the witilt gets the stop transmission message, then that
> > when I experience the tragic "can't kill max" crash.
> >
> > Not sure what the actual cause of these symptoms are...but it looks
> > like there is data buildup somewhere. If I lower the transmission
> > rate on the witilt, things run much more smoothly.
> >
> > b
> >
> > On Jun 6, 2007, at 3:42 PM, Jeremy Bernstein wrote:
> >
> >> I was using serial with a WiTilt for a while, as well, and had
> >> some problems. My theory is that the WiTilt regularly drops the
> >> connection and reconnects. At the time, I blamed it on the battery
> >> I was using and let it go, since I wasn't working on anything
> >> important. In general, though, the serial object doesn't
> >> appreciate being hung up on and, although it tries to compensate,
> >> it doesn't always succeed.
> >>
> >> I would love to tell you that I have a near-term solution to the
> >> problem. But I don't, and chances are slim that there's going to
> >> be one (until the near-term is over and the mid-term has begun). I
> >> wonder if you can do some serial comm over mxj/java with greater
> >> success?
> >>
> >> jb
> >>
> >> Am 07.06.2007 um 00:28 schrieb barry threw:
> >>
> >>> It seems as if the serial object has, errr, issues. Any advice?
> >>
> >
> > barry threw
> > composition : sound : programming
> > http://www.barrythrew.com
> > bthrew(at)gmail(dot)com
> > 857-544-3967
> >
> > And I know not if, save in this, such gift be allowed to man,
> > That out of three sounds he frame, not a fourth sound, but a star.
> > -Robert Browning
> >
> >
>
>