Maxium Touch Index Exceeded, 10, the maxium index allowed is 9

Hi, all
I’m using touch to implement some feature in my project. However, I found touch under linux doesn’t work. The log is as bellows:
LogSlate: Warning: Maxium Touch Index Exceeded, 10, the maxium index allowed is 9

Actually, when the program start up, I did the follewing tests:    
First touch:I can touch on the screen and move
Second touch: the fingerleave screen and touch again, touch  doesn't work
Thrid touch: work
Fourth: doesn't work
...
Ninetheen touch: 
**LogSlate: Warning: Maxium Touch Index Exceeded, 10, the maxium index allowed is 9**
And the touch didn't work anymore unless I restart the program.

BTW, the program can work perfect on windows. Any help? Thank you very much.

Could you please confirm that you’re on 4.21.2 and not earlier (there were changes for 4.21.2 fixing some touch issues). Particularly could you please check that you have this commit in your code base.

@RCL Hi ,sorry for late response.
I’ve checked the version I used both on linux and windows(cross compile binary for linux).
On Windows, my version is 4.21.2
On Linux, the patch is in the repo, and I checked the path code manually in my local, it is already here.
Do you have any suggestions? Because I think it’s important feature for linux developers.

Thanks

@RCL Hi ,sorry for late response.
I’ve checked the versio I used both on linux and windows(cross compile binux for linux).
On Windows, my version is 4.21.2
On Linux, the patch is in the repo, and I checked the path code manually in my local, it is already here.
Do you have any suggestions? Because I think it’s important feature for linux developers.

Thanks

@RCL any updates? thanks

Try increasing the verbosity for LogLinuxWindows events. Previously, the touch indices were ever increasing because there was a bug in not handling FINGERUP event. The code that you’re referring to should be handling FINGERUP so the first thing to clarify is how the indices get incremented.

In Ue 4.25.1 and Ubuntu 16.04 and 18.04 Linux, SDL_FINGERUP events are not firing only when doing a swipe. When I tap, the SDL_FINGERUP event trigger, but when the user swipes, the the SDL_FINGERUP event does not trigger, and the finger index increments.
When it reaches 10 the message above occurs.

On Ubuntu 18.04 LTS, after the first missing SDL_FINGERUP, I start receiving “Received unknown SDL event type=2050” messages which are SDL_MULTIGESTURE.
After adding logging to the SDL_MULTIGESTURE event, you can see that the mgesture.numFingers continues to increment until the application is restarted. I’ve seen numFingers report as high as 80 or 90 fingers on the screen.

After 10 swipes, input stops propagating to the game, and the app needs to be restarted.
This block can be worked around by clearing the Touches map while processing the SDL_FINGERDOWN event.
Touches.Empty();

But, the issue persists. The real issue is that there should be a matching SDL_FINGERUP event for every SDL_FINGERDOWN event. and when swiping the screen with a single finger, there should not be SDL_MULTIGESTURE events firing.

Also, for some reason the logs show that for every other swipe, the logs show input as MOUSE_UP, then MOUSE_DOWN, and the other swipes coming in as SDL_FINGERDOWN, followed by SDL_FINGERMOTION without an SDL_FINGERUP.

There is custom logic in the libSDL2 included in UE’s source, so I believe the bug may originate there.

This is the only showstopper in our upgrade from 4.14 to 4.25. It would be great if this can be addressed quickly.

These are the changes I made to LinuxApplication.cpp and SlateUser,cpp to get more consistent logging, and prevent input from being blocked after 10 swipes. Our game does need that SDL_FINGERUP event though.

And adding this to DefaultEngine.ini (on the game side) will filter out log entries unrelated to Touch, and show verbose logging for log messages related to Touch.

[Core.Log]
global=Error
LogLinuxWindow=Verbose
LogLinuxWindowType=Verbose
LogLinuxWindowEvent=Verbose
LogSlate=Verbose
LogLinux=Verbose
PixelStreamerInputDevice

link text

1 Like

We are running into this exact issue with UE4.27.1 and Ubuntu 20.04.3 LTS. This is a huge problem. Is there a fix available? Why is Unreal using a custom SDL library?

1 Like

I am also seeing the same problem on UE5.0.3+Ubuntu20.04. I can’t imagine why Unreal hasn’t fixed such a critical bug.

Excuse me!Have you resolved it?

hi!I would appreciate it if you can help me to analyze your code.

Same issue here with UE5.2.1, can somebody at Epic help with this ? This is a huge issue at the moment in my company, we cannot ship Linux builds with Touch…

Ok, if anyone’s wondering how to solve it I tested a lot of thing and figured out that setting the Input Mode To Game Only seems to solve the problem, just add the node “Input Mode Game Only” to your Game Instance or Gamemode at startup and I don’t have the problem anymore…

I am having this issue on CENTOS 7 and CENTOS 9

LogSlate: Warning: Maximum Touch Index Exceeded, 10, the maximum index allowed is 9

Out touchscreen that we where testing changed models. The touchscreen used to send BTN_LEFT

this was handled fine. Now the new one sends BTN_TOUCH.

when this is fired 10 times Unreal becomes unresponsive to touches.

I have tried multiple blueprints to see how I can ignore any “Pointer Indexes” about 9

but even though that is there unreal still becomes unresponsive to touches.

Any help as we will be in the future using this Touchscreen

Anyone???

Ok it seems the issue is that I get a touchStarted event,

but I also get a mouse event. which prevents the touchEnded to happen.

Also seems to be a linux issue as Unreal engine seems to not release the Touch Event as the OS moves the mouse and the touch at the same time

Any fixes or a way to handle this???

Any Developers on here

Still having this issue, would like to see how it can be resolved. As it is related to linux.

Still having this issue in linux.

Did you ever figure this out?