Discussion:
[Gambas-user] Reading pen pressure from wacom tablets
Ricardo Díaz Martín
2012-07-25 06:15:15 UTC
Permalink
Hi,

I wonder if there is some way to read the pen pressure from wacom like
tablets in gambas. I have read some documentations for java and looks like
wacon tablets works like a normal mouse with some extra properties you can
get: pressure, rubber mode, etc...

I know there is qt4 support for this but I have not experience with qt4. I
can do it in java but of course I prefer gambas3 :-p

Regards,
Ricardo Díaz
Benoît Minisini
2012-07-25 19:04:37 UTC
Permalink
Le 25/07/2012 08:15, Ricardo Díaz Martín a écrit :
> Hi,
>
> I wonder if there is some way to read the pen pressure from wacom like
> tablets in gambas. I have read some documentations for java and looks like
> wacon tablets works like a normal mouse with some extra properties you can
> get: pressure, rubber mode, etc...
>
> I know there is qt4 support for this but I have not experience with qt4. I
> can do it in java but of course I prefer gambas3 :-p
>
> Regards,
> Ricardo Díaz

It should be possible do add support for such events. Apparently, it is
far more complex in gtk+ than in qt4, and I don't understand why. So it
will need a little time!

Regards,

--
Benoît Minisini
Ricardo Díaz Martín
2012-07-26 14:01:53 UTC
Permalink
For me it's enough in qt4.

Thanks in advance for your time!

Regards,
Ricardo Díaz



2012/7/25 Benoît Minisini <***@users.sourceforge.net>

> Le 25/07/2012 08:15, Ricardo Díaz Martín a écrit :
> > Hi,
> >
> > I wonder if there is some way to read the pen pressure from wacom like
> > tablets in gambas. I have read some documentations for java and looks
> like
> > wacon tablets works like a normal mouse with some extra properties you
> can
> > get: pressure, rubber mode, etc...
> >
> > I know there is qt4 support for this but I have not experience with qt4.
> I
> > can do it in java but of course I prefer gambas3 :-p
> >
> > Regards,
> > Ricardo Díaz
>
> It should be possible do add support for such events. Apparently, it is
> far more complex in gtk+ than in qt4, and I don't understand why. So it
> will need a little time!
>
> Regards,
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
Benoît Minisini
2012-07-26 14:06:11 UTC
Permalink
Le 26/07/2012 16:01, Ricardo Díaz Martín a écrit :
> For me it's enough in qt4.
>
> Thanks in advance for your time!
>
> Regards,
> Ricardo Díaz
>

For you. But for me, I won't add a feature to gb.qt4 if I can't add it
to gb.gtk!


--
Benoît Minisini
Benoît Minisini
2012-08-09 01:35:27 UTC
Permalink
Le 26/07/2012 16:06, Benoît Minisini a écrit :
> Le 26/07/2012 16:01, Ricardo Díaz Martín a écrit :
>> For me it's enough in qt4.
>>
>> Thanks in advance for your time!
>>
>> Regards,
>> Ricardo Díaz
>>
>
> For you. But for me, I won't add a feature to gb.qt4 if I can't add it
> to gb.gtk!
>
>

OK, now I know how to read the tablet events both in Qt and GTK+. Now it
"just" has to be done!

--
Benoît Minisini
Benoît Minisini
2012-08-09 23:46:20 UTC
Permalink
Le 25/07/2012 08:15, Ricardo Díaz Martín a écrit :
> Hi,
>
> I wonder if there is some way to read the pen pressure from wacom like
> tablets in gambas. I have read some documentations for java and looks like
> wacon tablets works like a normal mouse with some extra properties you can
> get: pressure, rubber mode, etc...
>
> I know there is qt4 support for this but I have not experience with qt4. I
> can do it in java but of course I prefer gambas3 :-p
>
> Regards,
> Ricardo Díaz

Hi,

Since revision #5024, you can catch tablet events with Gambas. But I
can't test it, so I need you now!

At the moment, it works like that:

1) Only DrawingArea can catch tablet events. You need to set its new
'UseTablet' property to TRUE.

2) Then each tablet event will raise a MousePress, MouseMove or
MouseRelease event.

3) The properties of the tablet event are stored inside the new
'Pointer' static class.

4) The 'Pointer' class has the following properties:

- X : the floating point X global coordinate.
- Y : the floating point Y global coordinate.
- XTilt: the X tilt.
- YTilt: the Y tilt.
- Pressure: the pressure.
- Rotation: the rotation.
- Type: the pointer type, which be either Pointer.Mouse, Pointer.Pen,
Pointer.Eraser or Pointer.Cursor.

I have no idea if it works. Maybe I will buy a Wacom tablet, I don't
know. But now I'm waiting for your returns!

Thanks in advance.

Regards,

--
Benoît Minisini
Ricardo Díaz Martín
2012-08-10 06:01:52 UTC
Permalink
Thanks Benoit,

I'm going directly to the shop to buy a wacom tablet to test it.

Hope to try it this weekend.

I'll keep you informed.

Regards,


2012/8/10 Benoît Minisini <***@users.sourceforge.net>

> Le 25/07/2012 08:15, Ricardo Díaz Martín a écrit :
> > Hi,
> >
> > I wonder if there is some way to read the pen pressure from wacom like
> > tablets in gambas. I have read some documentations for java and looks
> like
> > wacon tablets works like a normal mouse with some extra properties you
> can
> > get: pressure, rubber mode, etc...
> >
> > I know there is qt4 support for this but I have not experience with qt4.
> I
> > can do it in java but of course I prefer gambas3 :-p
> >
> > Regards,
> > Ricardo Díaz
>
> Hi,
>
> Since revision #5024, you can catch tablet events with Gambas. But I
> can't test it, so I need you now!
>
> At the moment, it works like that:
>
> 1) Only DrawingArea can catch tablet events. You need to set its new
> 'UseTablet' property to TRUE.
>
> 2) Then each tablet event will raise a MousePress, MouseMove or
> MouseRelease event.
>
> 3) The properties of the tablet event are stored inside the new
> 'Pointer' static class.
>
> 4) The 'Pointer' class has the following properties:
>
> - X : the floating point X global coordinate.
> - Y : the floating point Y global coordinate.
> - XTilt: the X tilt.
> - YTilt: the Y tilt.
> - Pressure: the pressure.
> - Rotation: the rotation.
> - Type: the pointer type, which be either Pointer.Mouse, Pointer.Pen,
> Pointer.Eraser or Pointer.Cursor.
>
> I have no idea if it works. Maybe I will buy a Wacom tablet, I don't
> know. But now I'm waiting for your returns!
>
> Thanks in advance.
>
> Regards,
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
Ricardo Díaz Martín
2012-08-15 18:09:09 UTC
Permalink
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. 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

2012/8/10 Ricardo Díaz Martín <***@gmail.com>

> Thanks Benoit,
>
> I'm going directly to the shop to buy a wacom tablet to test it.
>
> Hope to try it this weekend.
>
> I'll keep you informed.
>
> Regards,
>
>
> 2012/8/10 Benoît Minisini <***@users.sourceforge.net>
>
>> Le 25/07/2012 08:15, Ricardo Díaz Martín a écrit :
>> > Hi,
>> >
>> > I wonder if there is some way to read the pen pressure from wacom like
>> > tablets in gambas. I have read some documentations for java and looks
>> like
>> > wacon tablets works like a normal mouse with some extra properties you
>> can
>> > get: pressure, rubber mode, etc...
>> >
>> > I know there is qt4 support for this but I have not experience with
>> qt4. I
>> > can do it in java but of course I prefer gambas3 :-p
>> >
>> > Regards,
>> > Ricardo Díaz
>>
>> Hi,
>>
>> Since revision #5024, you can catch tablet events with Gambas. But I
>> can't test it, so I need you now!
>>
>> At the moment, it works like that:
>>
>> 1) Only DrawingArea can catch tablet events. You need to set its new
>> 'UseTablet' property to TRUE.
>>
>> 2) Then each tablet event will raise a MousePress, MouseMove or
>> MouseRelease event.
>>
>> 3) The properties of the tablet event are stored inside the new
>> 'Pointer' static class.
>>
>> 4) The 'Pointer' class has the following properties:
>>
>> - X : the floating point X global coordinate.
>> - Y : the floating point Y global coordinate.
>> - XTilt: the X tilt.
>> - YTilt: the Y tilt.
>> - Pressure: the pressure.
>> - Rotation: the rotation.
>> - Type: the pointer type, which be either Pointer.Mouse, Pointer.Pen,
>> Pointer.Eraser or Pointer.Cursor.
>>
>> I have no idea if it works. Maybe I will buy a Wacom tablet, I don't
>> know. But now I'm waiting for your returns!
>>
>> Thanks in advance.
>>
>> Regards,
>>
>> --
>> Benoît Minisini
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-***@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>
Benoît Minisini
2012-08-15 18:22:00 UTC
Permalink
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
Benoît Minisini
2012-08-15 18:33:33 UTC
Permalink
Le 15/08/2012 20:22, Benoît Minisini a écrit :
>
> 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!
>

Another point: can you test all mouse events (MousePress, MouseMove and
MouseRelease) and tell me what you get exactly?

Thanks.

--
Benoît Minisini
Benoît Minisini
2012-08-15 18:33:24 UTC
Permalink
Le 15/08/2012 20:09, Ricardo Díaz Martín a écrit :
> When the IDE crash you can see 'core' was generated (but I
> don't know where is it to attach to this mail).
>

Your core file would be too big and useless for me, because the
information must be extracted from the same machine that made the core file.

But if you find it, you can run 'gdb' on it to get the backtrace of the
crash.

Regards,

--
Benoît Minisini
Ricardo Díaz Martín
2012-08-16 07:06:12 UTC
Permalink
Ok, this is the information I got:

- When I said crash in the IDE too, it means after the crash in the
project, if you still moving the pen in the tablet, the IDE got the crash
with no information (IDE disappear)
- With gtk+ components the tablet is not detected. Tablet is detected as
normal mouse. No crash in the project. No crash in the IDE.
- The event Move, Down, Up are right fired. Work as expected with the pen
and with the mouse.
- If you set Tracking property to true in the drawing area control you you
got the MouseDown event and MouseUp event some times is fired and some
times no.
- I got the same crash by compiling gambas with no qt4 optimizations

gdb with gambas3 qt4 no optimizations compiled was:
Starting program: /usr/local/bin/gbx3
[Depuración de hilo usando libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Nuevo Thread 0x7fffea237700 (LWP 20134)]
[Nuevo Thread 0x7fffe9a36700 (LWP 20135)]
[Nuevo Thread 0x7fffe37c4700 (LWP 20136)]

Program received signal SIGSEGV, Segmentation fault.
QBasicAtomicInt::ref (this=0x18700000131) at
/usr/include/qt4/QtCore/qatomic_x86_64.h:121
121 : "memory");


gdb backtrace was:
#0 QBasicAtomicInt::ref (this=0x18700000131) at
/usr/include/qt4/QtCore/qatomic_x86_64.h:121
#1 0x00007ffff5da1184 in QString (other=..., this=0x7fffffffcd10) at
/usr/include/qt4/QtCore/qstring.h:726
#2 text (this=0x7fffffffd2b0) at /usr/include/qt4/QtGui/qevent.h:236
#3 CWidget::eventFilter (this=0x7ffff60082a0, widget=0x986050,
event=0x7fffffffd2b0) at CWidget.cpp:2822
#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 0x00007ffff5d9a94f in hook_loop () at main.cpp:777
#20 0x000000000044262b in main (argc=1, argv=0x7fffffffe138) at gbx.c:417

If I can help you with extra information please say to me.

Regards,
Ricardo Díaz

2012/8/15 Benoît Minisini <***@users.sourceforge.net>

> Le 15/08/2012 20:09, Ricardo Díaz Martín a écrit :
> > When the IDE crash you can see 'core' was generated (but I
> > don't know where is it to attach to this mail).
> >
>
> Your core file would be too big and useless for me, because the
> information must be extracted from the same machine that made the core
> file.
>
> But if you find it, you can run 'gdb' on it to get the backtrace of the
> crash.
>
> Regards,
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
Ricardo Díaz Martín
2012-08-16 07:08:36 UTC
Permalink
In addition I attach the project with last modifications.

Regards

2012/8/16 Ricardo Díaz Martín <***@gmail.com>

> Ok, this is the information I got:
>
> - When I said crash in the IDE too, it means after the crash in the
> project, if you still moving the pen in the tablet, the IDE got the crash
> with no information (IDE disappear)
> - With gtk+ components the tablet is not detected. Tablet is detected as
> normal mouse. No crash in the project. No crash in the IDE.
> - The event Move, Down, Up are right fired. Work as expected with the pen
> and with the mouse.
> - If you set Tracking property to true in the drawing area control you you
> got the MouseDown event and MouseUp event some times is fired and some
> times no.
> - I got the same crash by compiling gambas with no qt4 optimizations
>
> gdb with gambas3 qt4 no optimizations compiled was:
> Starting program: /usr/local/bin/gbx3
> [Depuración de hilo usando libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> [Nuevo Thread 0x7fffea237700 (LWP 20134)]
> [Nuevo Thread 0x7fffe9a36700 (LWP 20135)]
> [Nuevo Thread 0x7fffe37c4700 (LWP 20136)]
>
> Program received signal SIGSEGV, Segmentation fault.
> QBasicAtomicInt::ref (this=0x18700000131) at
> /usr/include/qt4/QtCore/qatomic_x86_64.h:121
> 121 : "memory");
>
>
> gdb backtrace was:
> #0 QBasicAtomicInt::ref (this=0x18700000131) at
> /usr/include/qt4/QtCore/qatomic_x86_64.h:121
> #1 0x00007ffff5da1184 in QString (other=..., this=0x7fffffffcd10) at
> /usr/include/qt4/QtCore/qstring.h:726
> #2 text (this=0x7fffffffd2b0) at /usr/include/qt4/QtGui/qevent.h:236
> #3 CWidget::eventFilter (this=0x7ffff60082a0, widget=0x986050,
> event=0x7fffffffd2b0) at CWidget.cpp:2822
> #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 0x00007ffff5d9a94f in hook_loop () at main.cpp:777
> #20 0x000000000044262b in main (argc=1, argv=0x7fffffffe138) at gbx.c:417
>
> If I can help you with extra information please say to me.
>
> Regards,
> Ricardo Díaz
>
>
> 2012/8/15 Benoît Minisini <***@users.sourceforge.net>
>
>> Le 15/08/2012 20:09, Ricardo Díaz Martín a écrit :
>> > When the IDE crash you can see 'core' was generated (but I
>> > don't know where is it to attach to this mail).
>> >
>>
>> Your core file would be too big and useless for me, because the
>> information must be extracted from the same machine that made the core
>> file.
>>
>> But if you find it, you can run 'gdb' on it to get the backtrace of the
>> crash.
>>
>> Regards,
>>
>> --
>> Benoît Minisini
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-***@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>
Benoît Minisini
2012-08-16 12:07:11 UTC
Permalink
Le 16/08/2012 09:06, Ricardo Díaz Martín a écrit :
> Ok, this is the information I got:
>
> - When I said crash in the IDE too, it means after the crash in the
> project, if you still moving the pen in the tablet, the IDE got the crash
> with no information (IDE disappear)

If the IDE segfaults too, then this crash may be a bug in Qt itself...

> - With gtk+ components the tablet is not detected. Tablet is detected as
> normal mouse. No crash in the project. No crash in the IDE.

How do you know that the tablet is not detected? Did you any X11 stuff
to configure your tablet?

> - The event Move, Down, Up are right fired. Work as expected with the pen
> and with the mouse.
> - If you set Tracking property to true in the drawing area control you you
> got the MouseDown event and MouseUp event some times is fired and some
> times no.

Mmm...

> - I got the same crash by compiling gambas with no qt4 optimizations
>
> gdb with gambas3 qt4 no optimizations compiled was:
> Starting program: /usr/local/bin/gbx3
> [Depuración de hilo usando libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> [Nuevo Thread 0x7fffea237700 (LWP 20134)]
> [Nuevo Thread 0x7fffe9a36700 (LWP 20135)]
> [Nuevo Thread 0x7fffe37c4700 (LWP 20136)]
>
> Program received signal SIGSEGV, Segmentation fault.
> QBasicAtomicInt::ref (this=0x18700000131) at
> /usr/include/qt4/QtCore/qatomic_x86_64.h:121
> 121 : "memory");
>
>
> gdb backtrace was:
> #0 QBasicAtomicInt::ref (this=0x18700000131) at
> /usr/include/qt4/QtCore/qatomic_x86_64.h:121
> #1 0x00007ffff5da1184 in QString (other=..., this=0x7fffffffcd10) at
> /usr/include/qt4/QtCore/qstring.h:726
> #2 text (this=0x7fffffffd2b0) at /usr/include/qt4/QtGui/qevent.h:236
> #3 CWidget::eventFilter (this=0x7ffff60082a0, widget=0x986050,
> event=0x7fffffffd2b0) at CWidget.cpp:2822

---> That lines means the crash occurs while receiving a *keyboard*
event. Does it make any sense to receive a keyboard event while using a pen?

We must find other Gambas users having a tablet to help us!

--
Benoît Minisini
Ricardo Díaz Martín
2012-08-16 14:01:06 UTC
Permalink
Hi Benoit,

When I said using gtk+ components tablet is not detected is because the
Pointer.Type is 0 (this is the same value you get using qt4 when you use
the mouse for drawing in the drawing area control).

In using Ubuntu 12.04 gnome 3 so you wacom tablets are plug and play with
the kernel. You don't need to parch kernel neigther X11 no more (you can
read this in sourceforge wacom driver for linux).

It's really strange the crash is produced by keyboard event... I didn't
touch any key 8-)

BTW I have installed qt creator (ubuntu officical repo) and there is an
"tablet" name example. Everything works in this example. In adition looks
like xtilt and ytilt are allways 0 with my wacom bamboo pen. Rotation is
setted to -14.0625 like in gambas3.

Hope that it helps you.

Regards,
Ricardo Díaz



2012/8/16 Benoît Minisini <***@users.sourceforge.net>

> Le 16/08/2012 09:06, Ricardo Díaz Martín a écrit :
> > Ok, this is the information I got:
> >
> > - When I said crash in the IDE too, it means after the crash in the
> > project, if you still moving the pen in the tablet, the IDE got the crash
> > with no information (IDE disappear)
>
> If the IDE segfaults too, then this crash may be a bug in Qt itself...
>
> > - With gtk+ components the tablet is not detected. Tablet is detected as
> > normal mouse. No crash in the project. No crash in the IDE.
>
> How do you know that the tablet is not detected? Did you any X11 stuff
> to configure your tablet?
>
> > - The event Move, Down, Up are right fired. Work as expected with the pen
> > and with the mouse.
> > - If you set Tracking property to true in the drawing area control you
> you
> > got the MouseDown event and MouseUp event some times is fired and some
> > times no.
>
> Mmm...
>
> > - I got the same crash by compiling gambas with no qt4 optimizations
> >
> > gdb with gambas3 qt4 no optimizations compiled was:
> > Starting program: /usr/local/bin/gbx3
> > [Depuración de hilo usando libthread_db enabled]
> > Using host libthread_db library
> "/lib/x86_64-linux-gnu/libthread_db.so.1".
> > [Nuevo Thread 0x7fffea237700 (LWP 20134)]
> > [Nuevo Thread 0x7fffe9a36700 (LWP 20135)]
> > [Nuevo Thread 0x7fffe37c4700 (LWP 20136)]
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > QBasicAtomicInt::ref (this=0x18700000131) at
> > /usr/include/qt4/QtCore/qatomic_x86_64.h:121
> > 121 : "memory");
> >
> >
> > gdb backtrace was:
> > #0 QBasicAtomicInt::ref (this=0x18700000131) at
> > /usr/include/qt4/QtCore/qatomic_x86_64.h:121
> > #1 0x00007ffff5da1184 in QString (other=..., this=0x7fffffffcd10) at
> > /usr/include/qt4/QtCore/qstring.h:726
> > #2 text (this=0x7fffffffd2b0) at /usr/include/qt4/QtGui/qevent.h:236
> > #3 CWidget::eventFilter (this=0x7ffff60082a0, widget=0x986050,
> > event=0x7fffffffd2b0) at CWidget.cpp:2822
>
> ---> That lines means the crash occurs while receiving a *keyboard*
> event. Does it make any sense to receive a keyboard event while using a
> pen?
>
> We must find other Gambas users having a tablet to help us!
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
Ricardo Díaz Martín
2012-08-16 14:16:42 UTC
Permalink
Benoit,

Ummm, take an oulook to this: http://doc.trolltech.com/4.6/qtabletevent.html

this is the event definition:
QTabletEvent::QTabletEvent ( Type type, const QPoint & pos, const QPoint &
globalPos, const QPointF & hiResGlobalPos, int device, int pointerType,
qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal
rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID )

there is a "keyState specifies which keyboard modifiers are pressed (e.g.,
Ctrl)."

Could it be the segment fault for this keyState property?

Regards,
Ricardo

2012/8/16 Ricardo Díaz Martín <***@gmail.com>

> Hi Benoit,
>
> When I said using gtk+ components tablet is not detected is because the
> Pointer.Type is 0 (this is the same value you get using qt4 when you use
> the mouse for drawing in the drawing area control).
>
> In using Ubuntu 12.04 gnome 3 so you wacom tablets are plug and play with
> the kernel. You don't need to parch kernel neigther X11 no more (you can
> read this in sourceforge wacom driver for linux).
>
> It's really strange the crash is produced by keyboard event... I didn't
> touch any key 8-)
>
> BTW I have installed qt creator (ubuntu officical repo) and there is an
> "tablet" name example. Everything works in this example. In adition looks
> like xtilt and ytilt are allways 0 with my wacom bamboo pen. Rotation is
> setted to -14.0625 like in gambas3.
>
> Hope that it helps you.
>
> Regards,
> Ricardo Díaz
>
>
>
> 2012/8/16 Benoît Minisini <***@users.sourceforge.net>
>
>> Le 16/08/2012 09:06, Ricardo Díaz Martín a écrit :
>> > Ok, this is the information I got:
>> >
>> > - When I said crash in the IDE too, it means after the crash in the
>> > project, if you still moving the pen in the tablet, the IDE got the
>> crash
>> > with no information (IDE disappear)
>>
>> If the IDE segfaults too, then this crash may be a bug in Qt itself...
>>
>> > - With gtk+ components the tablet is not detected. Tablet is detected as
>> > normal mouse. No crash in the project. No crash in the IDE.
>>
>> How do you know that the tablet is not detected? Did you any X11 stuff
>> to configure your tablet?
>>
>> > - The event Move, Down, Up are right fired. Work as expected with the
>> pen
>> > and with the mouse.
>> > - If you set Tracking property to true in the drawing area control you
>> you
>> > got the MouseDown event and MouseUp event some times is fired and some
>> > times no.
>>
>> Mmm...
>>
>> > - I got the same crash by compiling gambas with no qt4 optimizations
>> >
>> > gdb with gambas3 qt4 no optimizations compiled was:
>> > Starting program: /usr/local/bin/gbx3
>> > [Depuración de hilo usando libthread_db enabled]
>> > Using host libthread_db library
>> "/lib/x86_64-linux-gnu/libthread_db.so.1".
>> > [Nuevo Thread 0x7fffea237700 (LWP 20134)]
>> > [Nuevo Thread 0x7fffe9a36700 (LWP 20135)]
>> > [Nuevo Thread 0x7fffe37c4700 (LWP 20136)]
>> >
>> > Program received signal SIGSEGV, Segmentation fault.
>> > QBasicAtomicInt::ref (this=0x18700000131) at
>> > /usr/include/qt4/QtCore/qatomic_x86_64.h:121
>> > 121 : "memory");
>> >
>> >
>> > gdb backtrace was:
>> > #0 QBasicAtomicInt::ref (this=0x18700000131) at
>> > /usr/include/qt4/QtCore/qatomic_x86_64.h:121
>> > #1 0x00007ffff5da1184 in QString (other=..., this=0x7fffffffcd10) at
>> > /usr/include/qt4/QtCore/qstring.h:726
>> > #2 text (this=0x7fffffffd2b0) at /usr/include/qt4/QtGui/qevent.h:236
>> > #3 CWidget::eventFilter (this=0x7ffff60082a0, widget=0x986050,
>> > event=0x7fffffffd2b0) at CWidget.cpp:2822
>>
>> ---> That lines means the crash occurs while receiving a *keyboard*
>> event. Does it make any sense to receive a keyboard event while using a
>> pen?
>>
>> We must find other Gambas users having a tablet to help us!
>>
>> --
>> Benoît Minisini
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-***@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>
Benoît Minisini
2012-08-16 14:23:44 UTC
Permalink
Le 16/08/2012 16:16, Ricardo Díaz Martín a écrit :
> Benoit,
>
> Ummm, take an oulook to this: http://doc.trolltech.com/4.6/qtabletevent.html
>
> this is the event definition:
> QTabletEvent::QTabletEvent ( Type type, const QPoint & pos, const QPoint &
> globalPos, const QPointF & hiResGlobalPos, int device, int pointerType,
> qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal
> rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID )
>
> there is a "keyState specifies which keyboard modifiers are pressed (e.g.,
> Ctrl)."
>
> Could it be the segment fault for this keyState property?
>

Mmm... no.

The crash is really while receiving a keyboard event (a QEvent whose
type is QEvent::KeyPress).

Did you try your pen with the GIMP? To see if it detects it, as it uses
GTK+.

--
Benoît Minisini
Ricardo Díaz Martín
2012-08-16 14:39:51 UTC
Permalink
Yes, with gimp works nice.


2012/8/16 Benoît Minisini <***@users.sourceforge.net>

> Le 16/08/2012 16:16, Ricardo Díaz Martín a écrit :
> > Benoit,
> >
> > Ummm, take an oulook to this:
> http://doc.trolltech.com/4.6/qtabletevent.html
> >
> > this is the event definition:
> > QTabletEvent::QTabletEvent ( Type type, const QPoint & pos, const QPoint
> &
> > globalPos, const QPointF & hiResGlobalPos, int device, int pointerType,
> > qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal
> > rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID )
> >
> > there is a "keyState specifies which keyboard modifiers are pressed
> (e.g.,
> > Ctrl)."
> >
> > Could it be the segment fault for this keyState property?
> >
>
> Mmm... no.
>
> The crash is really while receiving a keyboard event (a QEvent whose
> type is QEvent::KeyPress).
>
> Did you try your pen with the GIMP? To see if it detects it, as it uses
> GTK+.
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
Ricardo Díaz Martín
2012-08-16 14:45:46 UTC
Permalink
Extra information.

I said that IDE crash after the poject crash. So I try now to do a gdb to
gambas3 and I got this:

***@ubuntu-desarrollo:~/Documentos/gambassource/trunk/app/src/gambas3$
gdb gbx3
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Para las instrucciones de informe de errores, vea:
<http://bugs.launchpad.net/gdb-linaro/>...
Leyendo símbolos desde /usr/local/bin/gbx3...hecho.
(gdb) run
Starting program: /usr/local/bin/gbx3
[Depuración de hilo usando libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
ERROR: #2: Cannot load class 'CReportBrush': Unable to load class file
[Inferior 1 (process 6213) exited with code 01]

Maybe it's related maybe not. I don't know...




2012/8/16 Ricardo Díaz Martín <***@gmail.com>

> Yes, with gimp works nice.
>
>
> 2012/8/16 Benoît Minisini <***@users.sourceforge.net>
>
>> Le 16/08/2012 16:16, Ricardo Díaz Martín a écrit :
>> > Benoit,
>> >
>> > Ummm, take an oulook to this:
>> http://doc.trolltech.com/4.6/qtabletevent.html
>> >
>> > this is the event definition:
>> > QTabletEvent::QTabletEvent ( Type type, const QPoint & pos, const
>> QPoint &
>> > globalPos, const QPointF & hiResGlobalPos, int device, int pointerType,
>> > qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal
>> > rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID )
>> >
>> > there is a "keyState specifies which keyboard modifiers are pressed
>> (e.g.,
>> > Ctrl)."
>> >
>> > Could it be the segment fault for this keyState property?
>> >
>>
>> Mmm... no.
>>
>> The crash is really while receiving a keyboard event (a QEvent whose
>> type is QEvent::KeyPress).
>>
>> Did you try your pen with the GIMP? To see if it detects it, as it uses
>> GTK+.
>>
>> --
>> Benoît Minisini
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-***@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>
Ricardo Díaz Martín
2012-08-16 15:05:04 UTC
Permalink
More extra information...

If I keep the pen pressed (it means mouse down its fired) I can move the
pen to everywhere in the screen with no crash. If I try to do it with pen
pressure = 0 (the pencil is some millimeter over the tablet) the I got the
crash.

I wrote on before that MouseUp and MouseDown sometimes where fired and
sometimes not. It was my mistake. Both of then are right fired. Sorry.

Regards,
Ricardo



2012/8/16 Ricardo Díaz Martín <***@gmail.com>

> Extra information.
>
> I said that IDE crash after the poject crash. So I try now to do a gdb to
> gambas3 and I got this:
>
> ***@ubuntu-desarrollo:~/Documentos/gambassource/trunk/app/src/gambas3$
> gdb gbx3
> GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
> Copyright (C) 2012 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> Para las instrucciones de informe de errores, vea:
> <http://bugs.launchpad.net/gdb-linaro/>...
> Leyendo símbolos desde /usr/local/bin/gbx3...hecho.
> (gdb) run
> Starting program: /usr/local/bin/gbx3
> [Depuración de hilo usando libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> ERROR: #2: Cannot load class 'CReportBrush': Unable to load class file
> [Inferior 1 (process 6213) exited with code 01]
>
> Maybe it's related maybe not. I don't know...
>
>
>
>
> 2012/8/16 Ricardo Díaz Martín <***@gmail.com>
>
>> Yes, with gimp works nice.
>>
>>
>> 2012/8/16 Benoît Minisini <***@users.sourceforge.net>
>>
>>> Le 16/08/2012 16:16, Ricardo Díaz Martín a écrit :
>>> > Benoit,
>>> >
>>> > Ummm, take an oulook to this:
>>> http://doc.trolltech.com/4.6/qtabletevent.html
>>> >
>>> > this is the event definition:
>>> > QTabletEvent::QTabletEvent ( Type type, const QPoint & pos, const
>>> QPoint &
>>> > globalPos, const QPointF & hiResGlobalPos, int device, int pointerType,
>>> > qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal
>>> > rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID )
>>> >
>>> > there is a "keyState specifies which keyboard modifiers are pressed
>>> (e.g.,
>>> > Ctrl)."
>>> >
>>> > Could it be the segment fault for this keyState property?
>>> >
>>>
>>> Mmm... no.
>>>
>>> The crash is really while receiving a keyboard event (a QEvent whose
>>> type is QEvent::KeyPress).
>>>
>>> Did you try your pen with the GIMP? To see if it detects it, as it uses
>>> GTK+.
>>>
>>> --
>>> Benoît Minisini
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Gambas-user mailing list
>>> Gambas-***@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>>
>>
>>
>
Benoît Minisini
2012-08-16 15:08:56 UTC
Permalink
Le 16/08/2012 17:05, Ricardo Díaz Martín a écrit :
> More extra information...
>
> If I keep the pen pressed (it means mouse down its fired) I can move the
> pen to everywhere in the screen with no crash. If I try to do it with pen
> pressure = 0 (the pencil is some millimeter over the tablet) the I got the
> crash.
>
> I wrote on before that MouseUp and MouseDown sometimes where fired and
> sometimes not. It was my mistake. Both of then are right fired. Sorry.
>
> Regards,
> Ricardo
>

Can you try to run your test program with valgrind, and send me the output?

--
Benoît Minisini
Ricardo Díaz Martín
2012-08-16 15:16:09 UTC
Permalink
He it goes!



2012/8/16 Benoît Minisini <***@users.sourceforge.net>

> Le 16/08/2012 17:05, Ricardo Díaz Martín a écrit :
> > More extra information...
> >
> > If I keep the pen pressed (it means mouse down its fired) I can move the
> > pen to everywhere in the screen with no crash. If I try to do it with pen
> > pressure = 0 (the pencil is some millimeter over the tablet) the I got
> the
> > crash.
> >
> > I wrote on before that MouseUp and MouseDown sometimes where fired and
> > sometimes not. It was my mistake. Both of then are right fired. Sorry.
> >
> > Regards,
> > Ricardo
> >
>
> Can you try to run your test program with valgrind, and send me the output?
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
Benoît Minisini
2012-08-16 16:38:54 UTC
Permalink
Le 16/08/2012 17:16, Ricardo Díaz Martín a écrit :
> He it goes!
>

OK. This was a stupid error with { ... }. Please try revision #5048!

--
Benoît Minisini
Ricardo Díaz Martín
2012-08-16 17:37:11 UTC
Permalink
Yes, now works fine!!

Thanks a lot Benoit

2012/8/16 Benoît Minisini <***@users.sourceforge.net>

> Le 16/08/2012 17:16, Ricardo Díaz Martín a écrit :
> > He it goes!
> >
>
> OK. This was a stupid error with { ... }. Please try revision #5048!
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
Benoît Minisini
2012-08-16 23:10:52 UTC
Permalink
Le 16/08/2012 19:37, Ricardo Díaz Martín a écrit :
> Yes, now works fine!!
>
> Thanks a lot Benoit
>

Cool. Now beware that I may change the interface for reading tablet
events sooner or later before the version release!

Now I don't understand why your pen is detected with the GIMP that uses
GTK+, and not by gb.gtk...

--
Benoît Minisini
Ricardo Díaz Martín
2012-08-17 06:50:09 UTC
Permalink
Ok, I'm in the forum. So if you change I'll know it and test again.

I don't know too why gb.gtk doens't want to detect.

If you want to include in gambas examples I attach last version with some
improvements (a small pointer position cache).

Regards,
Ricardo

2012/8/17 Benoît Minisini <***@users.sourceforge.net>

> Le 16/08/2012 19:37, Ricardo Díaz Martín a écrit :
> > Yes, now works fine!!
> >
> > Thanks a lot Benoit
> >
>
> Cool. Now beware that I may change the interface for reading tablet
> events sooner or later before the version release!
>
> Now I don't understand why your pen is detected with the GIMP that uses
> GTK+, and not by gb.gtk...
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
Benoît Minisini
2012-08-17 09:20:28 UTC
Permalink
Le 17/08/2012 08:50, Ricardo Díaz Martín a écrit :
> Ok, I'm in the forum. So if you change I'll know it and test again.
>
> I don't know too why gb.gtk doens't want to detect.
>
> If you want to include in gambas examples I attach last version with some
> improvements (a small pointer position cache).
>
> Regards,
> Ricardo
>

Before I want to change the "tablet" events interface.

You must know that in GTK+, you must explicitely tell him which widget
gets "extended" (i.e. tablet) events. With Qt this is not required.
Hence the "UseTablet" property.

I finally want to define special events for "tablets":
- PointerPress
- PointerRelease
- PointerMove

Note that there are two special events too (named "proximity in" and
"proximity out"), but they are handled differently in Qt and GTK+, so I
must think before implementing them.

And I want to make Pointer.X and Pointer.Y relative to the control
receiving the events (like Mouse.X and Mouse.Y), and make
Pointer.ScreenX and Pointer.ScreenY properties too for the global
coordinates.

So you will have to update your example after I have made the changes,
and then I will put it with the other Gambas examples.

Regards,

--
Benoît Minisini
Benoît Minisini
2012-08-17 09:40:27 UTC
Permalink
Le 17/08/2012 11:20, Benoît Minisini a écrit :
>
> Before I want to change the "tablet" events interface.
>
> You must know that in GTK+, you must explicitely tell him which widget
> gets "extended" (i.e. tablet) events. With Qt this is not required.
> Hence the "UseTablet" property.
>
> I finally want to define special events for "tablets":
> - PointerPress
> - PointerRelease
> - PointerMove

--> That should allow me to remove the UseTablet property.

--
Benoît Minisini
Ricardo Díaz Martín
2012-08-17 10:24:19 UTC
Permalink
Ok, so when you define special events for tablets and make PointerX and
PointerY relative to the control I'll change the project.

Regards,

2012/8/17 Benoît Minisini <***@users.sourceforge.net>

> Le 17/08/2012 08:50, Ricardo Díaz Martín a écrit :
> > Ok, I'm in the forum. So if you change I'll know it and test again.
> >
> > I don't know too why gb.gtk doens't want to detect.
> >
> > If you want to include in gambas examples I attach last version with some
> > improvements (a small pointer position cache).
> >
> > Regards,
> > Ricardo
> >
>
> Before I want to change the "tablet" events interface.
>
> You must know that in GTK+, you must explicitely tell him which widget
> gets "extended" (i.e. tablet) events. With Qt this is not required.
> Hence the "UseTablet" property.
>
> I finally want to define special events for "tablets":
> - PointerPress
> - PointerRelease
> - PointerMove
>
> Note that there are two special events too (named "proximity in" and
> "proximity out"), but they are handled differently in Qt and GTK+, so I
> must think before implementing them.
>
> And I want to make Pointer.X and Pointer.Y relative to the control
> receiving the events (like Mouse.X and Mouse.Y), and make
> Pointer.ScreenX and Pointer.ScreenY properties too for the global
> coordinates.
>
> So you will have to update your example after I have made the changes,
> and then I will put it with the other Gambas examples.
>
> Regards,
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
Benoît Minisini
2012-08-17 16:02:32 UTC
Permalink
Le 17/08/2012 12:24, Ricardo Díaz Martín a écrit :
> Ok, so when you define special events for tablets and make PointerX and
> PointerY relative to the control I'll change the project.
>
> Regards,
>

Hi again,

1) In revision #5051, I have updated the Tablet event management:

- Finally I decided to keep the DrawingArea tablet property. But I
renamed it 'Tablet' instead of 'UseTablet'.

- So there is no special events. Just MouseDown, MouseUp and MouseMove.

- Pointer absolute coordinates are now returned in Pointer.ScreenX and
Pointer.ScreenY properties.

- Pointer.X and Pointer.Y return the pointer coordinates relative to the
control receiving the events.

2) I have modified gb.gtk so that it enables all detected XInput pointer
devices (they are all disabled by default apparently). Does it change
something when you use your example with gb.gtk?

I have a strange idea anyway if it does not work: using the GIMP device
configuration file to configure the devices! But the user will have to
install GIMP and configure XInput devices from it. A bit weird, isn't it?

3) I'd like to put your project in the Gambas examples, but it has a few
problems. Can you fix them?

- Controls should be made private to the form.

- It is useless and slower to write 'Me.MyControl' to access MyControl
from its form. Just write 'MyControl'.

- Can you use the Paint class instead of the Draw class? The Paint class
can draw things anti-aliased at floating-point coordinates.

Thanks in advance.

--
Benoît Minisini
sheldon sobel
2012-08-17 16:13:11 UTC
Permalink
Hello -


Please remove me from the gambas email user list.
Ricardo Díaz Martín
2012-08-18 18:44:59 UTC
Permalink
2012/8/17 Benoît Minisini <***@users.sourceforge.net>

> Le 17/08/2012 12:24, Ricardo Díaz Martín a écrit :
> > Ok, so when you define special events for tablets and make PointerX and
> > PointerY relative to the control I'll change the project.
> >
> > Regards,
> >
>
> Hi again,
>
> 1) In revision #5051, I have updated the Tablet event management:
>
> - Finally I decided to keep the DrawingArea tablet property. But I
> renamed it 'Tablet' instead of 'UseTablet'.
>
> - So there is no special events. Just MouseDown, MouseUp and MouseMove.
>
> - Pointer absolute coordinates are now returned in Pointer.ScreenX and
> Pointer.ScreenY properties.
>
> - Pointer.X and Pointer.Y return the pointer coordinates relative to the
> control receiving the events.
>
> 2) I have modified gb.gtk so that it enables all detected XInput pointer
> devices (they are all disabled by default apparently). Does it change
> something when you use your example with gb.gtk?
>
> I have a strange idea anyway if it does not work: using the GIMP device
> configuration file to configure the devices! But the user will have to
> install GIMP and configure XInput devices from it. A bit weird, isn't it?
>
>
Sorry but still the same issue. When you set the gb.gtk component the
pointer type is always 0 (it means mouse detected). I don't know how you
can configure XInput in gtk using the GIMP configuration file at runtime.



> 3) I'd like to put your project in the Gambas examples, but it has a few
> problems. Can you fix them?
>
> - Controls should be made private to the form.
>

I usually set to public to use Me.


> - It is useless and slower to write 'Me.MyControl' to access MyControl
> from its form. Just write 'MyControl'.
>
>
I'm faster writing code when I use Me. Why? Because I usually have to make
forms with a lot of controls (most of them textboxes) filled with database
values. For this reason I have to use long identifiers for controls names.
So when you are writing the code it's really easy to write Me. + the first
part of the control name I want to use and I can easy select it from code
completion. I know you can start writing the name of control for code
completion but most of times I didn't remember the beginning of control's
name. But it's only my point of view.... or maybe is a long time ugly habit
I got! ;-) Anyway I did form controls private and delete all the Me.


> - Can you use the Paint class instead of the Draw class? The Paint class
> can draw things anti-aliased at floating-point coordinates.
>
>
I attach new version using Paint class but I can't see any difference in
the final draw. Must it be a clear difference using Paint class instead
Draw?


Thanks in advance.
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
Benoît Minisini
2012-08-18 20:02:20 UTC
Permalink
Le 18/08/2012 20:44, Ricardo Díaz Martín a écrit :
> Sorry but still the same issue. When you set the gb.gtk component the
> pointer type is always 0 (it means mouse detected). I don't know how you
> can configure XInput in gtk using the GIMP configuration file at runtime.

OK. I finally bought a Wacom Bamboo pen, and succeeded in getting GTK+
tablet events.

GTK+ gives me a list of all input device and the type of each one. I
decided to enable all devices that are not "Mouse" (which apparently are
enabled anyway).

>
>
>
>> 3) I'd like to put your project in the Gambas examples, but it has a few
>> problems. Can you fix them?
>>
>> - Controls should be made private to the form.
>>
>
> I usually set to public to use Me.
>
>
>> - It is useless and slower to write 'Me.MyControl' to access MyControl
>> from its form. Just write 'MyControl'.
>>
>>
> I'm faster writing code when I use Me. Why? Because I usually have to make
> forms with a lot of controls (most of them textboxes) filled with database
> values. For this reason I have to use long identifiers for controls names.
> So when you are writing the code it's really easy to write Me. + the first
> part of the control name I want to use and I can easy select it from code
> completion. I know you can start writing the name of control for code
> completion but most of times I didn't remember the beginning of control's
> name. But it's only my point of view.... or maybe is a long time ugly habit
> I got! ;-) Anyway I did form controls private and delete all the Me.
>
>
>> - Can you use the Paint class instead of the Draw class? The Paint class
>> can draw things anti-aliased at floating-point coordinates.
>>
>>
> I attach new version using Paint class but I can't see any difference in
> the final draw. Must it be a clear difference using Paint class instead
> Draw?

I will look at it...

--
Benoît Minisini
Loading...