SymbiSoft / mosync

Automatically exported from code.google.com/p/mosync
0 stars 0 forks source link

EVENT_TYPE_POINTER_DRAGGED spam on Android runtime #1147

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
If you touch and hold your finger on the Touchscreen on Android, 
the event handler gets spammed with EVENT_TYPE_POINTER_DRAGGED events, even 
though the finger is not moved and stays at the same place.
The MoSync emulator behaves normally and doesn't do this, so I guess this 
behaviour is not intended

What is the expected output? What do you see instead?
Expected: I only want to get EVENT_TYPE_POINTER_DRAGGED if the location of the 
pointer changes.
Seen instead:
10-06 10:06:01.160  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.183  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.183  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.183  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.183  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.183  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.183  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.199  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.199  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.199  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.199  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.199  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.199  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.214  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.214  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.222  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.222  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.222  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.222  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.238  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.238  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.238  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.238  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.238  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.238  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.254  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.254  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.261  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.261  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.261  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.261  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.277  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.277  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.277  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.277  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.277  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.277  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.293  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.293  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.293  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.293  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.293  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.293  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.308  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.308  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.308  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.308  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.316  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.316  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.355  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.355  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.355  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.355  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.355  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.355  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.371  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.371  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.371  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.371  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.371  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.371  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.394  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.394  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.402  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.402  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.402  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.402  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.418  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.418  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.418  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.418  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.418  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.418  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.441  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.441  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.441  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.441  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.441  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.441  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.472  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.472  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.472  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.472  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.472  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.472  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.488  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.488  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.488  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.488  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.488  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.488  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.511  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.511  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.511  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.511  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.511  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.511  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.527  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.527  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.527  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.527  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.527  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.527  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.543  3228  3228 I MoSync JNI: nativePostEvent event.type: 10
10-06 10:06:01.543  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.543  3228  3234 I MoSync Syscall: maIOCtl
10-06 10:06:01.543  3228  3234 I MoSync Syscall: maIOCtl_maWriteLog
10-06 10:06:01.543  3228  3234 I maWriteLog: EVENT_TYPE_POINTER_DRAGGED (234/397
/0)
10-06 10:06:01.543  3228  3234 I MoSync Syscall: maWait
10-06 10:06:01.574  3228  3228 I MoSync JNI: nativePostEvent event.type: 9
10-06 10:06:01.574  3228  3228 I MoSync Syscall: PostEvent
10-06 10:06:01.574  3228  3234 I MoSync Syscall: maWait
10-06 10:06:03.378  3222  3222 V SourceCache: Queue source cache refresh request
, delayed (ms): 0

What version of the product are you using? On what operating system?
MoSyncWindows-110902-0012.exe on Windows XP
Runtime: android_4 (Compiled for Sony Xperia X10 mini pro)

Please provide any additional information below.
Sample program for testing:

#include <ma.h>
#include <conprint.h>

int MAMain() {
    while(1) {
        MAEvent event;

        if(maGetEvent(&event)) {
            switch (event.type)
            {
            case EVENT_TYPE_CLOSE:
            case EVENT_TYPE_KEY_PRESSED:
                maExit(0);
                break;
            case EVENT_TYPE_POINTER_DRAGGED:
                lprintfln ("EVENT_TYPE_POINTER_DRAGGED (%d/%d/%d)\n", event.point.x,
                        event.point.y, event.touchId);
                break;
            }
        }
        maWait(0);
    }
}

Original issue reported on code.google.com by e...@csp.at on 6 Oct 2011 at 8:14

GoogleCodeExporter commented 8 years ago
I'm not sure if this is the problem you refer to but there was a problem in 
Android release runtimes that filled the logs with lots (and I man lots) of 
data which was useful for debug purposes only.  This has been fixed in 2.7 so 
that release runtimes do not send this debug into to the log.  Please advice if 
this is not the problem

Original comment by miles.mi...@mobilesorcery.com on 24 Oct 2011 at 10:21

GoogleCodeExporter commented 8 years ago
As you can see, I'm writing the EVENT_TYPE_POINTER_DRAGGED event to the log 
myself, so this is not the problem you describe.
EVENT_TYPE_POINTER_DRAGGED should only be posted if the pointer location 
changes, but in fact gets constantly posted as long as the stylus is hold down.
To test it, use code from above and look at the log.
Hold down left mouse button in Emulator, move around a bit and then let the 
cursor settle and stay at one point -> No more messages, as there is no change 
of the pointer state.

Do the same thing on Android: Push down with your finger or stylus or whatever 
and hold it down without moving: There are a lot of EVENT_TYPE_POINTER_DRAGGED 
even though the pointer location and button status remains constant.

EVENT_TYPE_POINTER_DRAGGED (234/397/0)
EVENT_TYPE_POINTER_DRAGGED (234/397/0)
EVENT_TYPE_POINTER_DRAGGED (234/397/0)

So the same event gets constantly posted until you release the finger.

Original comment by e...@csp.at on 24 Oct 2011 at 10:42

GoogleCodeExporter commented 8 years ago
My colleague will look into this further

Original comment by miles.mi...@mobilesorcery.com on 24 Oct 2011 at 12:34