Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#4024 closed defect (fixed)

Touch crashes on 13.1.0 os5 - XO 1.75

Reported by: humitos Owned by: garnacho
Priority: Urgent Milestone:
Component: Sugar Version: 0.97.x
Severity: Blocker Keywords: r+, olpc-test-passed
Cc: manuq, godiard, erikos, garnacho Distribution/OS: Unspecified
Bug Status: Assigned

Description

I'm not sure what is happening but I found that Touch Gestures are not working properly on ImageViewer because the Activity crashes with a SIGNAL 11 (SIGSEGV) that means: a segmentation fault

This happens immediately you touch the screen with two fingers.

The strange thing is that ImageViewer works on os5 with an older version of the git repository and the same patch that adds gestures. I tried to find out what was the error introduced in the newest version but I couldn't. So, I copy some of the ImageViewer code to make a new Activity without all the ImageViewer logic (to keep it simple) as an example to show the issue.

I'm attaching a .tar.gz file that contains a very simple Sugar Activity that shows a gray screen (it is just a ScrolledWindow inside a Notebook) and when you touch it the Activity crashes with SIGNAL 11.

Attachments (3)

GesturesTest.tar.gz (1.7 KB) - added by humitos 12 years ago.
Activity to test Touch Gestures
GesturesTest-1.xo (2.2 KB) - added by humitos 12 years ago.
.xo version
0001-Prevent-crash-if-the-controller-didn-t-handle-TOUCH_.patch (1.1 KB) - added by garnacho 12 years ago.
Patch to fix the crash

Download all attachments as: .zip

Change History (13)

Changed 12 years ago by humitos

Activity to test Touch Gestures

comment:1 Changed 12 years ago by humitos

  • Summary changed from Touch crashes on 13.1.0 os5 to Touch crashes on 13.1.0 os5 - XO 1.75

Changed 12 years ago by humitos

.xo version

comment:2 Changed 12 years ago by humitos

After researching with Gonzalo we found that removing the Gtk.ScrolledWindow and using just the Gtk.Notebook this example activity does not crash but the SugarGesture callbacks are not called at all.

Then, I removed the Gtk.Notebook and used just Gtk.ScrolledWindow and the SugarGesture callbacks are called without problems.

Is Gtk.Notebook incompatible with SugarGestures? Is there a bug with Gtk.Notebook + Gtk.ScrolledWindow + SugarGestures?

comment:3 Changed 12 years ago by humitos

  • Cc garnacho added

comment:4 follow-up: Changed 12 years ago by garnacho

This is a bug in GTK+, scrolled windows get confused on multiple touches if touch events are coerced through it due to a child setting touch events, I've got a half baked patch I'll be testing more thoroughly

comment:5 Changed 12 years ago by godiard

May be this is related to #3994 ?

comment:6 in reply to: ↑ 4 Changed 12 years ago by erikos

  • Bug Status changed from Unconfirmed to Assigned
  • Owner changed from erikos to garnacho
  • Priority changed from Normal to Urgent
  • Severity changed from Unspecified to Blocker
  • Status changed from new to assigned
  • Version changed from Unspecified to 0.97.x

Replying to garnacho:

This is a bug in GTK+, scrolled windows get confused on multiple touches if touch events are coerced through it due to a child setting touch events, I've got a half baked patch I'll be testing more thoroughly

Carlos, this is the latest version of the scrolled window/two touch points I had: http://dev.laptop.org/~erikos/gtk3_patches/0005-Stop-scrolling-when-a-second-touch-point-is-detected.patch

comment:7 Changed 12 years ago by garnacho

Hrm, I've been indeed chasing the wrong bone here. That gtk+ patch is good as is, I'm attaching a sugar-toolkit-gtk3 that fixes the crash.

There's however a misconception in the testcase, the event controllers are attached to the activity toplevel widget. Even if it won't crash now, there's the possibility that a toplevel won't receive all events, as those get propagated from bottom to top, so child widgets may block upwards propagation, event controllers are better suited for the target widget

Changed 12 years ago by garnacho

Patch to fix the crash

comment:8 Changed 12 years ago by erikos

  • Keywords r+ olpc-test-pending added
  • Resolution set to fixed
  • Status changed from assigned to closed

Thanks Carlos, pushed.

Humitos, Gonzalo can you attach a test case how to verify the fix in a build?

comment:9 Changed 11 years ago by greenfeld

  • Keywords olpc-test-passed added; olpc-test-pending removed

Touching with more than one finger does not crash ImageViewer in OLPC 13.1.0 os8 (on a XO-1.75 touch which can track more than two points), and two fingers can be used to pinch to resize the window as long as the size of the image does not cause ImageViewer to only offer scrolling with one finger instead.

comment:10 Changed 11 years ago by dnarvaez

  • Milestone 0.98 deleted

Milestone 0.98 deleted

Note: See TracTickets for help on using tickets.