Bug#312632: Unbreakable loop causes xgnokii to hang

2005-06-09 Thread Richard Wallman
Package: gnokii
Version: 0.6.5-1
Severity: important

Using a Nokia 6230, connecting via BlueTooth. Connection is good (can
read the phonebook with xgnokii, and gnokii seems to work fine)

When entering into the SMS editor and activating the SMS reading,
xgnokii enters an unbreakable loop (xgnokii_lowlevel.c line 408)

The 'error' value (set on line 416) for this phone returns
GN_ERR_INVALIDMEMORYTYPE, which is not explicity caught - the default
action seems to be freeing memory and sleeping (lines 434-435) which
never leaves the loop.

Because there is no valid break condition, xgnokii enters an infinite
loop and hangs.

Changing line 428 to include the condition:

error == GN_ERR_INVALIDMEMORYTYPE

prevents the hang (still doesn't read the messages though :( )

The command-line gnokii program can read the messages okay, so it's just
an xgnokii problem.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686-smp
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages gnokii depends on:
ii  libbluetooth1   2.15-2   Library to use the BlueZ Linux Blu
ii  libc6   2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  libglib1.2  1.2.10-10The GLib library of C routines
ii  libgnokii2  0.6.5-1  Gnokii library
ii  libgtk1.2   1.2.10-17The GIMP Toolkit set of widgets fo
ii  liblockfile11.06 NFS-safe locking library, includes
ii  libx11-64.3.0.dfsg.1-14  X Window System protocol client li
ii  libxext64.3.0.dfsg.1-14  X Window System miscellaneous exte
ii  libxi6  4.3.0.dfsg.1-14  X Window System Input extension li
ii  libxpm4 4.3.0.dfsg.1-14  X pixmap library
ii  passwd  1:4.0.3-31sarge5 change and administer password and
ii  timeout 1.11-6.1 Run a command with a time limit.
ii  xlibs   4.3.0.dfsg.1-14  X Keyboard Extension (XKB) configu

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#312632: Unbreakable loop causes xgnokii to hang

2005-06-09 Thread Pawel Kot
Hi Richard,

On 6/9/05, Richard Wallman <[EMAIL PROTECTED]> wrote:
> Using a Nokia 6230, connecting via BlueTooth. Connection is good (can
> read the phonebook with xgnokii, and gnokii seems to work fine)
> 
> When entering into the SMS editor and activating the SMS reading,
> xgnokii enters an unbreakable loop (xgnokii_lowlevel.c line 408)

For your phone model it shouldn't get into this loop. Line 339 checks
the capabilities of the phone. The branch with the loop you are
talking about is entered only when the phone has no folder
capabilities. Quick look into common/misc.c tells that there's
PM_FOLDERS for 6230 defined. Could you please:
 - show your model information (*## on the keyboard)
 - try to trace what is the value of phoneMonitor.supported value
? Is seems that it goes wrong somewehere earlier.

take care,
pkot
-- 
Pawel Kot
http://www.gnokii.org/



Bug#312632: Unbreakable loop causes xgnokii to hang

2005-06-09 Thread Richard Wallman
Pawel Kot wrote:
> For your phone model it shouldn't get into this loop. {snip}

See below

>  - show your model information (*## on the keyboard)

V 03.15
17-03-04
RH-12
GSM P1.1
(c) NMP.

>  - try to trace what is the value of phoneMonitor.supported value
> ? Is seems that it goes wrong somewehere earlier.

>From gdb:

(gdb) step
339 if (phoneMonitor.supported & PM_FOLDERS) {
(gdb) print phoneMonitor
$1 = {rfLevel = 100, batteryLevel = 100, powerSource = GN_PS_BATTERY,
  working = 0x80af579 "Refreshing SMSes...", alarm = 0, phone = {
model = 0x815b540 "unknown", imei = 0x80f5238 "352953007569209",
revision = 0x81d9e58 "V 03.15 ", version = 0x8213d10 "V 03.15
  "},
  sms = {unRead = 0, number = 0, changed = 0, messages = 0x0}, call = {
callInProgress = CS_Idle, callNum = '\0' },
  netmonitor = {number = 0, screen = '\0' ,
screen3 = '\0' , screen4 = '\0' ,
screen5 = '\0' }, supported = 0}

phoneMonitor.supported == 0, but the interesting thing is that the
phoneMonitor.phone.model == 'unknown'.

Should "gnokii --identify" return a model of "RH12_28_-" or should it
give me "6230"? Is the problem that the phone model is not being
identified correctly?

-- 
Richard Wallman


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#312632: Unbreakable loop causes xgnokii to hang

2005-06-09 Thread Pawel Kot
Hi Richard,

On 6/9/05, Richard Wallman <[EMAIL PROTECTED]> wrote:
> Pawel Kot wrote:
> >  - show your model information (*## on the keyboard)
> 
> V 03.15
> 17-03-04
> RH-12
> GSM P1.1
> (c) NMP.
> 
[...]
> 
> phoneMonitor.supported == 0, but the interesting thing is that the
> phoneMonitor.phone.model == 'unknown'.

That's the reason. Please edit common/misc.c file and find there 6230
identification line (it should be line 220). Copy this line replacing
"RH-12_28_" with "RH-12". Let me know if it works. I'll commit it
then.

take care,
pkot
-- 
Pawel Kot
http://www.gnokii.org/



Bug#312632: Unbreakable loop causes xgnokii to hang

2005-06-09 Thread Richard Wallman
Pawel Kot wrote:
>> {snip: phone not being identified correctly}
> That's the reason. Please edit common/misc.c file and find there 6230
> identification line (it should be line 220). Copy this line replacing
> "RH-12_28_" with "RH-12". Let me know if it works. I'll commit it
> then.

I don't think that would work - the phone is identifying itself as
"RH12_28_-" (no hyphen between the RH and 12)

I've copied the existing 6230 line (I presumed it must be there with
that identifier for some reason), changed one copy to "RH12_28_-" and
recompiled. SMS and calendar functions now seem to work. Just sent a
text message through xgnokii and it was received okay. :)

It seems to dump what appears to be picture messages to the console, but
that's a completely different problem...

As for the original unbreakable loop, there should be something done
about that anyway - it may reappear as a problem with another phone in
future.

-- 
Richard Wallman


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#312632: Unbreakable loop causes xgnokii to hang

2005-06-09 Thread Pawel Kot
Hi Richard,

On 6/9/05, Richard Wallman <[EMAIL PROTECTED]> wrote:
> I've copied the existing 6230 line (I presumed it must be there with
> that identifier for some reason), changed one copy to "RH12_28_-" and
> recompiled. SMS and calendar functions now seem to work. Just sent a
> text message through xgnokii and it was received okay. :)

Glad to hear that.

> As for the original unbreakable loop, there should be something done
> about that anyway - it may reappear as a problem with another phone in
> future.

Yes, we may add some double checking in case of the incorrect
configuration. If the error is GN_ERR_INVALIDMEMORYTYPE I will return
an error.

take care,
pkot
-- 
Pawel Kot
http://www.gnokii.org/



Bug#312632: Unbreakable loop causes xgnokii to hang

2005-06-10 Thread Pawel Kot
HI again,

Both fixes are now in CVS, so they will be included in gnokii 0.6.8 --
not sure how it will be managed in Debian packages. IN any case these
are the diffs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnokii/gnokii/common/misc.c.diff?tr1=1.93&tr2=1.94&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnokii/gnokii/xgnokii/xgnokii_lowlevel.c.diff?tr1=1.88&tr2=1.89&r1=text&r2=text

take care,
pkot

On 6/9/05, Pawel Kot <[EMAIL PROTECTED]> wrote:
> Hi Richard,
> 
> On 6/9/05, Richard Wallman <[EMAIL PROTECTED]> wrote:
> > I've copied the existing 6230 line (I presumed it must be there with
> > that identifier for some reason), changed one copy to "RH12_28_-" and
> > recompiled. SMS and calendar functions now seem to work. Just sent a
> > text message through xgnokii and it was received okay. :)
> 
> Glad to hear that.
> 
> > As for the original unbreakable loop, there should be something done
> > about that anyway - it may reappear as a problem with another phone in
> > future.
> 
> Yes, we may add some double checking in case of the incorrect
> configuration. If the error is GN_ERR_INVALIDMEMORYTYPE I will return
> an error.
> 
> take care,
> pkot
> --
> Pawel Kot
> http://www.gnokii.org/
> 


-- 
Pawel Kot
http://www.gnokii.org/