[Gambas-user] Reading pen pressure from wacom tablets

Benoît Minisini gambas at ...1...
Wed Aug 15 20:22:00 CEST 2012


Le 15/08/2012 20:09, Ricardo Díaz Martín a écrit :
> Hi,
>
> After some days waiting for the delivery I got new wacom bamboo pen.
>
> I was doing some test using the attached project and I got some
> crash (project and IDE).
>
> I you move the tablet pen to the screen limits then you got a signal
> 22 and a segment fault. You got it when you are running the app and
> when you are in the IDE too.

What do you mean by "in the IDE too"? That if you use the pen inside the
IDE, the IDE crashes?

> When the IDE crash you can see 'core' was generated (but I don't know
> where is it to attach to this mail).
>
> Other issue is Pointer.Rotation got the same value every time
> -14.0625
>
> XTilt and YTilt values are always 0 (maybe this wacom tablet doesn't
> support this...)
>
> Type and Pressure work fine.
>
> And interesting thing is when tablet is being registered, PositionX
> and PositionX are float and when mouse is registered are integers
> values.
>
> The gdb bt for the project was: #0  QBasicAtomicInt::ref
> (this=0x3000002a2) at /usr/include/qt4/QtCore/qatomic_x86_64.h:121 #1
> 0x00007ffff5da1132 in QString (other=..., this=0x7fffffffcd40) at
> /usr/include/qt4/QtCore/qstring.h:726 #2  text (this=0x7fffffffd2e0)
> at /usr/include/qt4/QtGui/qevent.h:236 #3  CWidget::eventFilter
> (this=0x7ffff6008290, widget=0x9586d0, event=0x7fffffffd2e0) at
> CWidget.cpp:2819 #4  0x00007ffff45f1f6c in
> QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*,
>
>
QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
> #5  0x00007ffff4b14806 in
> QApplicationPrivate::notify_helper(QObject*, QEvent*) () from
> /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #6  0x00007ffff4b19afc in
> QApplication::notify(QObject*, QEvent*) () from
> /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #7  0x00007ffff45f1e9c in
> QCoreApplication::notifyInternal(QObject*, QEvent*) () from
> /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #8  0x00007ffff4b83643 in ??
> () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #9
> 0x00007ffff4b934fe in QApplication::x11ProcessEvent(_XEvent*) ()
> from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #10 0x00007ffff4bbd0d2
> in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #11
> 0x00007ffff2e80d53 in g_main_context_dispatch () from
> /lib/x86_64-linux-gnu/libglib-2.0.so.0 #12 0x00007ffff2e810a0 in ??
> () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #13 0x00007ffff2e81164
> in g_main_context_iteration () from
> /lib/x86_64-linux-gnu/libglib-2.0.so.0 #14 0x00007ffff46213bf in
> QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
>
>
() from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
> #15 0x00007ffff4bbcd5e in ?? () from
> /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #16 0x00007ffff45f0c82 in
> QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
> from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #17 0x00007ffff45f0ed7
> in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
> /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #18 0x00007ffff45f5f67 in
> QCoreApplication::exec() () from
> /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #19 0x00007ffff5d9a949 in
> hook_loop () at main.cpp:777 #20 0x00000000004046d8 in main (argc=1,
> argv=0x7fffffffe138) at gbx.c:417
>
> The system information:
>
> [System]
>
> OperatingSystem=Linux
>
> Kernel=3.2.0-27-generic
>
> Architecture=x86_64
>
> Memory=5965424 kB
>
> DistributionVendor=Ubuntu
>
> DistributionRelease="Ubuntu 12.04 LTS"
>
> Desktop=Gnome
>
>
> [Gambas 3]
>
> Version=3.2.90
>
> Path=/usr/local/bin/gbx3
>
>
> [Libraries]
>
> Qt4=libQtCore.so.4.8.1
>
> GTK+=libgtk-x11-2.0.so.0.2400.10
>
>
> Regards,
>
> Ricardo Díaz
>

1) Please: can you recompile gb.qt4 component with no optimization?

$ cd <gambas sources>/trunk/gb.qt4
$ make clean
$ make "CFLAGS=-O0 -g -ggdb" "CXXFLAGS=-O0 -g -ggdb"
$ sudo make install

2) Then send me the backtrace of the crash again.

3) If possible, can you try your program with gb.gtk instead of gb.qt4
to compare what you get? Same crash, other crashes, no crash, other
event data...

Thanks!

-- 
Benoît Minisini




More information about the User mailing list