[Karmic]Easystroke: Crash when recording.

Bug #466532 reported by JustDevZero
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
easystroke (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I installed easystroke, from oficial repositories, and just when I try to record the gesture (only by doing the "click"), it crashes.

I run it under terminal, and it shows me:
 oh, you are a root ... ~ $
/home/daniel
> easystroke
zsh: floating point exception easystroke

As for logs:

Syslog, and kern.log shows the same:
Oct 31 12:49:00 Lichterman kernel: [ 2923.856156] easystroke[4004] trap divide error ip:46e09e sp:7fff78dc6530 error:0 in easystroke[400000+122000]

My Ubuntu especifications:
 Ubuntu 9.10 - Karmic Koala for x86_64
Linux Lichterman 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:05:01 UTC 2009 x86_64 GNU/Linux

Related branches

tags: added: crash
removed: crashes
Changed in ubuntu:
assignee: nobody → Easystroke Gesture Recognition (easystroke)
summary: - Easystroke crashes when recording gestures
+ [Karmic]Easystroke: Crash when record. (kernel)
Revision history for this message
Tom Jaeger (thjaeger) wrote : Re: [Karmic]Easystroke: Crash when record. (kernel)

There's no obvious place where a division by zero could occur, so I'll need a backtrace. As a first step, can you run easystroke in gdb ("gdb easystroke", then enter "run") and then issue the "bt" command when it crashes?

Revision history for this message
JustDevZero (justdevzero) wrote :

Ok, I did it, you have the results here:

 daniel, Que quieres? pesao... ~ $
/home/daniel
> gdb easystroke
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
(.....)

Leyendo símbolos desde /usr/bin/easystroke...(no debugging symbols found)...hecho.
(gdb) run
Starting program: /usr/bin/easystroke
[Thread debugging using libthread_db enabled]

Program received signal SIGFPE, Arithmetic exception.
0x000000000046e09e in ?? ()
(gdb) bt
#0 0x000000000046e09e in ?? ()
Cannot access memory in adress 0x7fffffffcf38

Revision history for this message
Tom Jaeger (thjaeger) wrote : Re: [Bug 466532] Re: [Karmic]Easystroke: Crash when record. (kernel)

Sorry, I'll need a real backtrace with debug symbols enabled. This is a
little bit more work since you need to recompile the applications. You
should be able to use the following instructions (untested):

sudo apt-get build-dep easystroke
apt-get source easystroke
cd easystroke-0.4.9
echo 'DFLAGS= -ggdb' > debug.mk
make -j2
gdb ./easystroke
run

MephSnake wrote:
> Ok, I did it, you have the results here:
>
> daniel, Que quieres? pesao... ~ $
> /home/daniel
>> gdb easystroke
> GNU gdb (GDB) 7.0-ubuntu
> Copyright (C) 2009 Free Software Foundation, Inc.
> (.....)
>
> Leyendo símbolos desde /usr/bin/easystroke...(no debugging symbols found)...hecho.
> (gdb) run
> Starting program: /usr/bin/easystroke
> [Thread debugging using libthread_db enabled]
>
>
> Program received signal SIGFPE, Arithmetic exception.
> 0x000000000046e09e in ?? ()
> (gdb) bt
> #0 0x000000000046e09e in ?? ()
> Cannot access memory in adress 0x7fffffffcf38
>

Revision history for this message
JustDevZero (justdevzero) wrote : Re: [Karmic]Easystroke: Crash when record. (kernel)

( Did you say sorry? Why!? You are helping! You don't need to say sorry ;-) )
DONE. But something strange happened when downloading the sources look:

/home/daniel
> apt-get source easystroke
(.....)
gpgv: Firmado el jue 20 ago 2009 18:50:04 CEST usando clave DSA ID 491E5389
gpgv: Imposible comprobar la firma: Clave pública no encontrada
dpkg-source: aviso: fallo al verificar la firma en ./easystroke_0.4.9-0ubuntu1.dsc
dpkg-source: información: extrayendo easystroke en easystroke-0.4.9
dpkg-source: información: easystroke_0.4.9.orig.tar.gz desempaquetado
dpkg-source: información: aplicando easystroke_0.4.9-0ubuntu1.diff.gz

This means that the sources packet, is signed by ID 491E5389, and this ID is from Julien Lavergne, that's actually working in the AWN applications, whis is a coincidence? an error? Did Julien, packed the sources for ubuntu? I'm confused.

As for your instructions:

Leyendo símbolos desde /home/daniel/easystroke-0.4.9/easystroke...done.
(gdb) run
Starting program: /home/daniel/easystroke-0.4.9/easystroke
[Thread debugging using libthread_db enabled]

Program received signal SIGFPE, Arithmetic exception.
0x000000000046e09e in Grabber::XiDevice::normalize_pressure (
    this=0x7fffffffe6d0, ev=...) at grabber.h:94
94 return 255 * (pressure - pressure_min) / (pressure_max - pressure_min);
(gdb) bt
#0 0x000000000046e09e in Grabber::XiDevice::normalize_pressure (
    this=0x7fffffffe6d0, ev=...) at grabber.h:94
#1 Main::handle_event (this=0x7fffffffe6d0, ev=...) at main.cc:1810
Cannot access memory in adress 0x7fffffffce98

By the way, the process appears in T state in ps -ax
PID TTY STAT TIME COMMAND
4315 pts/0 T 0:00 /home/daniel/easystroke-0.4.9/easystroke

Treat me as an Idiot, but are there some way to put the stuff I wrote in "spoilers tags"? I ask it for doing a much clear post.
Thanks for all, and await more instructions (if any).

Changed in ubuntu:
status: New → In Progress
status: In Progress → New
Revision history for this message
Tom Jaeger (thjaeger) wrote : Re: [Bug 466532] Re: [Karmic]Easystroke: Crash when record. (kernel)

MephSnake wrote:
> /home/daniel
>> apt-get source easystroke
> (.....)
> gpgv: Firmado el jue 20 ago 2009 18:50:04 CEST usando clave DSA ID 491E5389
> gpgv: Imposible comprobar la firma: Clave pública no encontrada
> dpkg-source: aviso: fallo al verificar la firma en ./easystroke_0.4.9-0ubuntu1.dsc
> dpkg-source: información: extrayendo easystroke en easystroke-0.4.9
> dpkg-source: información: easystroke_0.4.9.orig.tar.gz desempaquetado
> dpkg-source: información: aplicando easystroke_0.4.9-0ubuntu1.diff.gz
>
> This means that the sources packet, is signed by ID 491E5389, and this
> ID is from Julien Lavergne, that's actually working in the AWN
> applications, whis is a coincidence? an error? Did Julien, packed the
> sources for ubuntu? I'm confused.

Julian uploaded the package to ubuntu, since I'm not a MOTU and
therefore can't do the upload myself.

>
> As for your instructions:
>
> Leyendo símbolos desde /home/daniel/easystroke-0.4.9/easystroke...done.
> (gdb) run
> Starting program: /home/daniel/easystroke-0.4.9/easystroke
> [Thread debugging using libthread_db enabled]
>
> Program received signal SIGFPE, Arithmetic exception.
> 0x000000000046e09e in Grabber::XiDevice::normalize_pressure (
> this=0x7fffffffe6d0, ev=...) at grabber.h:94
> 94 return 255 * (pressure - pressure_min) / (pressure_max - pressure_min);
> (gdb) bt
> #0 0x000000000046e09e in Grabber::XiDevice::normalize_pressure (
> this=0x7fffffffe6d0, ev=...) at grabber.h:94
> #1 Main::handle_event (this=0x7fffffffe6d0, ev=...) at main.cc:1810
> Cannot access memory in adress 0x7fffffffce98

Thanks, this was very helpful. So your mouse reports 3 or more axes,
and easystroke assumes that the third axis represents pressure and is in
absolute coordinates, without actually making sure that this is an
absolute axis, so there is a division by zero when normalizing the axis
range. The solution is to only support pressure if the pressure axis
has min < max.

I'm curious, though, what kind of device this is and what information
the third axis contains. Can you attach the output of 'xinput list'?

I've fixed this in git and uploaded an updated package to my PPA, which
should build within the next hour or so. Please just install the
package and don't add the PPA to your sources.list, as I use the PPA as
a dumping ground for all sorts of strange packages:

https://launchpad.net/~thjaeger/+archive/ppa/+packages

Once xserver-1.7 gets uploaded to lucid, I'll get easystroke 0.5 plus
this fix into ubuntu, and after that we can think about a SRU.

Changed in ubuntu:
status: New → Confirmed
summary: - [Karmic]Easystroke: Crash when record. (kernel)
+ [Karmic]Easystroke: Crash when recording.
Changed in ubuntu:
status: Confirmed → Invalid
affects: ubuntu → easystroke (Ubuntu)
Changed in easystroke (Ubuntu):
assignee: Easystroke Gesture Recognition (easystroke) → nobody
status: Invalid → Confirmed
Revision history for this message
JustDevZero (justdevzero) wrote :

OK, here you have the xinput list....
I know it, It's an M$ Keyboard & Mouse...(but the University gave it to me for free)
It's curious, but the M$ Hardware works better in Linux! And the other curiosity is that the M$ Hardware is better than Software, must M$ forget all about the Software and dedicate to Hardware?

I atached the input.

Revision history for this message
gidantribal (aedo999) wrote :

I have the same crash problem, but with an ordinary 3/buttons mouse.

Revision history for this message
Tom Jaeger (thjaeger) wrote : Re: [Bug 466532] Re: [Karmic]Easystroke: Crash when recording.

Well, did the package from my PPA fix it?

gidantribal wrote:
> I have the same crash problem, but with an ordinary 3/buttons mouse.
>

Revision history for this message
JustDevZero (justdevzero) wrote :

The package fixed MY problem.

Revision history for this message
gidantribal (aedo999) wrote :

@Tom Jaeger:
    Package FIXED my problem too. Bug fixed at the speed of light.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package easystroke - 0.5.2-0ubuntu1

---------------
easystroke (0.5.2-0ubuntu1) lucid; urgency=low

  [ Thomas Jaeger ]
  * New upstream release (LP: #502366)
    - Fixes crash when the third axis is a relative one (LP: #466532)
    - Uses XI2 now, so upgrade Build-Depends accordingly

  [ Benjamin Drung ]
  * Wrap Build-Depends
  * Bump Standards-Version to 3.8.3
  * Add ${misc:Depends} to dependency list
  * Switch to debhelper v7.
 -- Thomas Jaeger <email address hidden> Sun, 03 Jan 2010 01:02:54 +0100

Changed in easystroke (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.