Scirra / Construct-bugs

Public bug report submissions for Construct 3 and Construct Animate. Please read the guidelines then click the 'Issues' tab to get started.
https://www.construct.net
107 stars 83 forks source link

Touch End does not always work #1188

Closed eddynardo closed 6 years ago

eddynardo commented 6 years ago

Problem description

Touch object sometimes does not register "touch end" on android devices and thinks that the screen is still in touch (for example on my platformer game sometimes the jump button gets stuck and is always pressed down)

Attach a .c3p

https://drive.google.com/file/d/1ae0S3sEOknZ_39lQgfJEMq5Fk-SXd-QW/view?usp=sharing

Steps to reproduce

note: The .c3p above is just a grid of boxes, each box lights up when you touch it, and becomes transparent when you don't, I also added a spritefont object that shows to you how many fingers are touching the screen at any given time using the "set text to Touch.TouchCount" action

1.Download the attached .c3p above 2.Import into Construct3 3.Export as android Debug APK for version 5.0 and above 4.Install it on a device 5.Start touching the screen at random places using multiple fingers at the same time 6.Keep doing that, sometimes it takes more than 1 or 2 minutes of spamming the screen with touch inputs until it fails to register a TouchEnd

Observed result

At some point a box will stay lit up as if you are still touching it

Expected result

All boxes should be transparent when you are not touching the screen

Affected browsers

only tested on android apk exported as Debug apk using Construct3 directly

System details

I am using an LG K4 (2017) with Android 6.0.1 but it also has happened on every other device that I have tested it, including some Xiaomi and TpLink devices ,

View details PASTE HERE
eddynardo commented 6 years ago

I should also note that if you keep doing that for a few minutes you can observe that the Touch.TouchCount can go over 20 , which doesn't make sense because max touch inputs should be 10 for my device.

AshleyScirra commented 6 years ago

We fire the touch end whenever the browser does, it's as simple as that. In the past we've seen similar reports that were either browser bugs or problems with the device's touchscreen driver. So I'm not sure we'll be able to fix this ourselves.

AshleyScirra commented 6 years ago

Can't reproduce on a HTC 10. Strongly suspect an OS or driver issue, I'm afraid you'll have to report it to Google or your device manufacturer.

eddynardo commented 6 years ago

I really don't think that is the case. It happens on every phone that I tested my game on and it makes it unplayable. Later today i will test it on 5 different smartphones and upload a video with how to replicate it.

AshleyScirra commented 6 years ago

There's still very little we can do about it. Like I said, a touch ends when the browser tells our code, and if it doesn't tell us, there's nothing we can do. You might have a better chance of getting it fixed if you post it on the Chromium bug tracker at crbug.com.

eddynardo commented 6 years ago

well luckily, I have an older version of my game created with C2 and exported with intelXDK and there is no problem in that version, so that means that the problem comes either from C3 or the exporter it uses. doing some tests now to let you know more info

psycloned commented 6 years ago

Tested it on Huawei P9 and Lenovo K3 Note and the problem persists. It took about 1 minute to happen.

eddynardo commented 6 years ago

Xiaomi Redmi 3s Confirmed TP-Link Neffos C5 also Confirmed I am uploading the video right now to show you how to replicate it because my explanation might not have been clear.

eddynardo commented 6 years ago

https://www.youtube.com/watch?v=uYYs6S7W40Y&feature=youtu.be It happens first time at about 2 minutes

eddynardo commented 6 years ago

Also I have uploaded the .apk if somebody just wants to test this without having to build it themselves https://drive.google.com/file/d/1QDuH1AON1HUcZ6CvBzFO4C8HrTsG3Lgx/view?usp=sharing

AshleyScirra commented 6 years ago

C3 uses the same runtime code as C2. So if it works in C2 with the Intel XDK, it shows our code is correct, and it must be caused by something else, e.g. the OS or Chromium. So unfortunately there may not be anything we can do ourselves about this.

eddynardo commented 6 years ago

well you realize this means we can't build android games with Construct 3 because at any time there could be an invisible finger touching our screens. It literally makes the game I spend 1 year making unplayable

AshleyScirra commented 6 years ago

Yes, it sucks. My point is to file it at crbug.com where someone might actually be able to fix the issue.

eddynardo commented 6 years ago

you are absolutely sure that this is not a bug of C3, and you are not gonna assign anyone else to take a look at it? An engine breaking bug that makes exporting to Android almost useless?

AshleyScirra commented 6 years ago

It certainly wouldn't be the first, and I doubt it would be the last.