gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Segfault with smsd


From: Trevor Nichols
Subject: Segfault with smsd
Date: Fri, 28 Aug 2009 10:47:08 +0930

Hi Guys,

Getting a segfault when it tries to read a message in smsd.

Phone is a 6210 connected via serial cable.

I compiled from the latest source and has the same issue - host is Ubuntu 9.04. It works on another Gentoo box, so not sure whats the difference

/opt/gnokii/bin/gnokii --version
GNOKII Version 0.6.27
Copyright (C) Hugh Blemings <address@hidden>, 1999, 2000
Copyright (C) Pavel Janik ml. <address@hidden>, 1999, 2000
Copyright (C) Pavel Machek <address@hidden>, 2001
Copyright (C) Pawel Kot <address@hidden>, 2001-2006
Copyright (C) BORBELY Zoltan <address@hidden>, 2002
gnokii is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
There is absolutely no warranty for gnokii.  See GPL for details.
Built 10:37:05 Aug 28 2009



(gdb) bt
#0  0x00007ffda15b7e13 in ValidateSMS (data="" state=0x8a76e0) at nk7110.c:1266
#1  0x00007ffda15b84bf in NK7110_Functions (op=<value optimized out>, data="" state=0x8a76e0) at nk7110.c:1276
#2  0x00007ffda15a89a8 in gn_sms_get (data="" state=0x8a76e0) at gsm-sms.c:996
#3  0x0000000000403496 in RefreshSMS (number=4) at lowlevel.c:235
#4  0x0000000000403778 in RealConnect (phone=0x88b900) at lowlevel.c:447
#5  0x0000000000403930 in Connect (phone=0x88b900) at lowlevel.c:489
#6  0x00007ffda13653ba in start_thread () from /lib/libpthread.so.0
#7  0x00007ffda10d1fcd in clone () from /lib/libc.so.6
#8  0x0000000000000000 in ?? ()

The segfault is being caused by

(gdb) p data->raw_sms->number
$6 = 0

In the code it uses that value -1.

Config:

[global]
port = /dev/ttyS0
model=6210
initlength = default
connection = dau9p
use_locking = yes
serial_baudrate = 19200
smsc_timeout = 10
[xgnokii]
allow_breakage = 0
[gnokiid]
bindir = /usr/sbin/
[connect_script]
TELEPHONE = 12345678
[disconnect_script]
[logging]
debug = on
rlpdebug = off
xdebug = off

The debug trace:
LOG: debug mask is 0x1
Config read from file /etc/gnokiirc.
Lockfile /var/lock/LCK..ttyS0 is stale. Overriding it..
phone instance config:
model = 6210
port = /dev/ttyS0
connection = dau9p
initlength = default
serial_baudrate = 19200
serial_write_usleep = -1
handshake = software
require_dcd = 0
smsc_timeout = 10
rfcomm_channel = 0
sm_retry = 0
Connecting
Serial device: opening device /dev/ttyS0
Serial device: setting speed to 115200
Serial device: setting RTS to low and DTR to high
Getting model...
Message sent: 0x1b / 0x0006
00 01 00 03 01 32                               |      2         
[Received Ack of type 1b, seq:  0]
[Sending Ack of type 1b, seq: 6]
Message received: 0x1b / 0x0037
01 1c 00 04 00 56 20 30 35 2e 30 32 0a 30 32 2d |      V 05.02 02-
30 34 2d 30 31 0a 4e 50 45 2d 33 0a 28 63 29 20 | 04-01 NPE-3 (c)
4e 4d 50 2e 00 4d 50 2e 00 4d 50 2e 00 00 00 00 | NMP. MP. MP.   
00 00 00 00 00 01 00                            |                
Received message type 1b
Received model NPE-3
Message sent: 0x40 / 0x0004
00 01 64 01                                     |   d            
[Received Ack of type 40, seq:  1]
[Sending Ack of type 40, seq: 7]
Message received: 0x40 / 0x000c
01 01 64 02 01 4c 0d 01 01 01 1b 58             |   d  L     X   
Received message type 40
Unknown security command
Message: Extended commands enabled.
Getting model...
Message sent: 0x1b / 0x0006
00 01 00 03 01 32                               |      2         
[Received Ack of type 1b, seq:  2]
[Sending Ack of type 1b, seq: 0]
Message received: 0x1b / 0x0037
01 1c 00 04 00 56 20 30 35 2e 30 32 0a 30 32 2d |      V 05.02 02-
30 34 2d 30 31 0a 4e 50 45 2d 33 0a 28 63 29 20 | 04-01 NPE-3 (c)
4e 4d 50 2e 00 4d 50 2e 00 4d 50 2e 00 4d 50 2e | NMP. MP. MP. MP.
00 00 00 00 00 00 00                            |                
Received message type 1b
Received model NPE-3
Received revision 05.02
Found model "NPE-3"
Found model "NPE-3"
Getting SMS Folder (8) status ...
Special case INBOX in GetSMSFolderStatus!
Message sent: 0x14 / 0x0007
00 01 00 6b 08 0f 01                            |    k           
[Received Ack of type 14, seq:  3]
[Sending Ack of type 14, seq: 1]
Message received: 0x14 / 0x0006
01 25 00 6c 00 00                               |  % l           
Received message type 14
Message: SMS Folder status received
Message: Number of Entries: 0
Message: IDs of Entries :
Message sent: 0x14 / 0x0007
00 01 00 6b f8 0f 01                            |    k           
[Received Ack of type 14, seq:  4]
[Sending Ack of type 14, seq: 2]
Message received: 0x14 / 0x000e
01 25 00 6c 00 04 00 04 00 03 00 02 00 01       |  % l           
Received message type 14
Message: SMS Folder status received
Message: Number of Entries: 4
Message: IDs of Entries : 4, 3, 2, 1,
Getting SMS (validating)...
Getting SMS Folders...
Message sent: 0x14 / 0x0006
00 01 00 7a 00 00                               |    z           
[Received Ack of type 14, seq:  5]
[Sending Ack of type 14, seq: 3]
Message received: 0x14 / 0x006f
01 25 00 7b 06 08 00 49 00 6e 00 62 00 6f 00 78 |  % {   I n b o x
00 00 10 00 4f 00 75 00 74 00 62 00 6f 00 78 00 |     O u t b o x
00 18 00 41 00 72 00 63 00 68 00 69 00 76 00 65 |    A r c h i v e
00 00 20 00 54 00 65 00 6d 00 70 00 6c 00 61 00 |     T e m p l a
74 00 65 00 73 00 00 29 00 50 00 69 00 63 00 74 | t e s  ) P i c t
00 75 00 72 00 65 00 73 00 00 31 00 4f 00 64 00 |  u r e s  1 O d
64 00 20 00 53 00 70 00 6f 00 74 00 73 00 00    | d   S p o t s  
Received message type 14
Message: 6 SMS Folders received:
Folder Index: 14    Folder name: Inbox
Folder Index: 15    Folder name: Outbox
Folder Index: 16    Folder name: Archive
Folder Index: 17    Folder name: Templates
Folder Index: 21    Folder name: Pictures
Folder Index: 22    Folder name: Odd Spots
Getting SMS Folder (8) status ...
Special case INBOX in GetSMSFolderStatus!
Message sent: 0x14 / 0x0007
00 01 00 6b 08 0f 01                            |    k           
[Received Ack of type 14, seq:  6]
[Sending Ack of type 14, seq: 4]
Message received: 0x14 / 0x0006
01 25 00 6c 00 00                               |  % l           
Received message type 14
Message: SMS Folder status received
Message: Number of Entries: 0
Message: IDs of Entries :
Message sent: 0x14 / 0x0007
00 01 00 6b f8 0f 01                            |    k           
[Received Ack of type 14, seq:  7]
[Sending Ack of type 14, seq: 5]
Message received: 0x14 / 0x000e
01 25 00 6c 00 04 00 04 00 03 00 02 00 01       |  % l           
Received message type 14
Message: SMS Folder status received
Message: Number of Entries: 4
Message: IDs of Entries : 4, 3, 2, 1,
Segmentation fault


Any ideas?

Thanks!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]