[Hamlib-developer] segfaults...
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: <rs...@su...> - 2001-10-15 14:35:51
|
Hi!
My program segfaults sometimes.
One time (AOR):
#4 0x40d544e6 in fileno_unlocked () from /lib/libc.so.6
#5 0x4001e4b1 in fread_block (p=0x80e809c,
rxbuffer=0xbfffe44c "\230\200\016\b", count=1) at serial.c:548
#6 0x415c9bc6 in aor_transaction (rig=0x80e8098, cmd=0x415ca182 "EX",
cmd_len=2, data=0xbfffe44c "\230\200\016\b", data_len=0xbfffe448)
at aor.c:102
#7 0x415c9c20 in aor_close (rig=0x80e8098) at aor.c:125
#8 0x4001a043 in rig_close (rig=0x80e8098) at rig.c:520
#9 0x4002c473 in Rig::close (this=0x8113750) at rigclass.cc:70
Another (RPC):
#4 0x00000010 in ?? ()
#5 0x4001a043 in rig_close (rig=0x80e8098) at rig.c:520
#6 0x4002c473 in Rig::close (this=0x80fcc00) at rigclass.cc:70
It seems like some drivers cannot handle it when a Rig::close() is called
without a preceding Rig::open().
How about a public method bool isOpen()? The setXxx/getXxx methods could
throw an exception if !isOpen(). close() should just be tolerant and do
nothing.
BTW: Does ~Rig() automatically call close()? I believe it should.
73, Robert
PS: I have created a very small page at http://kontakt.sf.net and linked
it to the hamlib pages.
--
Robert Steinhaeusser, DL1NC / N9KBK rs...@su...
http://1409.org ro...@st...
|