Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile/app: panic with palm touch on iOS app #13435

Closed
nobonobo opened this issue Nov 30, 2015 · 7 comments
Closed

x/mobile/app: panic with palm touch on iOS app #13435

nobonobo opened this issue Nov 30, 2015 · 7 comments
Milestone

Comments

@nobonobo
Copy link

@nobonobo nobonobo commented Nov 30, 2015

@hyangah hyangah added this to the Unreleased milestone Dec 1, 2015
@hyangah hyangah changed the title x/mobile/app/darwin_armx.go: I get panic when palm touch on iOS app x/mobile/app: panic with palm touch on iOS app Dec 1, 2015
@hyangah
Copy link
Contributor

@hyangah hyangah commented Dec 1, 2015

/cc @crawshaw Is the following comment no longer true?

// It is widely reported that the iPhone can handle up to 5 simultaneous
// touch events, while the iPad can handle 11.

@nobonobo
Copy link
Author

@nobonobo nobonobo commented Dec 5, 2015

patch & log

diff --git a/app/darwin_armx.go b/app/darwin_armx.go
index 5344e27..f6fa027 100644
--- a/app/darwin_armx.go
+++ b/app/darwin_armx.go
@@ -132,6 +132,7 @@ var touchEvents struct {

 //export sendTouch
 func sendTouch(cTouch, cTouchType uintptr, x, y float32) {
+       log.Println(cTouch, cTouchType, x, y)
        id := -1
        for i, val := range touchIDs {
                if val == cTouch {
2015/12/05 22:25:26 5601104144 0 149 62
2015/12/05 22:25:26 5602228320 0 832 231
2015/12/05 22:25:26 5601879616 0 1090 337
2015/12/05 22:25:26 5601973040 0 428 117
2015/12/05 22:25:35 5601128704 0 239 91
2015/12/05 22:25:35 5601104144 0 299 612
2015/12/05 22:25:35 5601118880 0 990 122
2015/12/05 22:25:35 5601111664 0 619 133
2015/12/05 22:25:35 5601092240 0 603 327
2015/12/05 22:25:35 5601077024 0 817 107
2015/12/05 22:25:35 5601860816 0 560 597
2015/12/05 22:25:37 5602222480 0 656 160
2015/12/05 22:25:37 5602223728 0 583 597
panic: out of touchIDs

device: iPhone5s
iOS: 9.1(13B143)

@nobonobo
Copy link
Author

@nobonobo nobonobo commented Dec 7, 2015

6 fingers touch and release on iPhone5S.

expect:

  • 6 touch.TypeBegin events receive.
  • 6 touch.TypeEnd events receive.

instead:

  • 6 touch.TypeBegin events receive.
  • These touch.TypeEnd events disappeared.

No problem if less than 6 fingers.

@nobonobo
Copy link
Author

@nobonobo nobonobo commented Dec 8, 2015

need handle touchesCancelled ?

@gopherbot
Copy link

@gopherbot gopherbot commented Dec 28, 2015

CL https://golang.org/cl/18180 mentions this issue.

@nobonobo
Copy link
Author

@nobonobo nobonobo commented Dec 30, 2015

No occur panic in Android, but there was a problem of lost touch sequence (similar IOS).
cancel-events must handle for real-device.

  • AMOTION_EVENT_ACTION_CANCEL for android
  • touchesCancelled for iOS

Proposal:

  • Add const value "TypeCancel" to "event/touch/touch.go".
  • cancel-event send to app.
  • touchIDs delete cancelled ID for iOS
@crawshaw
Copy link
Contributor

@crawshaw crawshaw commented Jan 7, 2016

@nobonobo I missed your comment before submitting your CL. Want to move this to #13859?

@golang golang locked and limited conversation to collaborators Jan 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.