[agl-discussions] Weston Crash on Touch input

Hiroto IMAMURA imamura.hiroto at nttd-mse.com
Thu Jan 26 08:12:08 UTC 2017


Hi,

I took in an advice of the debbug meeting held on Jan. 18th in Japan and have tried changing my code of a touch detection function from based on simple-touch.c to based on simple-egl.c.
As a result, I could not resolve this issue.

At first, I changed simply a code from based on simple-touch.c to based on simple-egl.c.
However, the surface was destroyed by Home screen in a few seconds.

Therefore, I hacked the code of simple-egl.c and I noticed the error of surface id. (Other apploications use PID for id.)

The code is the following.
https://cgit.freedesktop.org/wayland/weston/tree/clients/simple-egl.c?h=1.9

---------------------------------------------------------------------------
[snip]
#define IVI_SURFACE_ID 9000

[snip]
static void
create_ivi_surface(struct window *window, struct display *display)
{
	uint32_t id_ivisurf = IVI_SURFACE_ID + (uint32_t)getpid();
	window->ivi_surface =
		ivi_application_surface_create(display->ivi_application,
					       id_ivisurf, window->surface);

	if (window->ivi_surface == NULL) {
		fprintf(stderr, "Failed to create ivi_client_surface\n");
		abort();
	}

	ivi_surface_add_listener(window->ivi_surface,
				 &ivi_surface_listener, window);
}
[snip]
---------------------------------------------------------------------------

Secondly, I modified IVI_SURFACE_ID from 9000 to 0.
In this case, the surface was not destroyed, but weston was crashed when I touched the display.

Unfortunately, I could not improve this issue using this approach.

Regards,
Hiroto Imamura

On Thu, 29 Dec 2016 14:21:50 +0530
Vishnu Jayan <Vishnu.Jayan at tataelxsi.co.in> wrote:

> Hi Jens,
> 
>  >>Maybe related?
>  >>https://cgit.freedesktop.org/wayland/weston/commit/?id=2c40d1d30eabe46706822a8b5c94579aeba58e84 <https://cgit.freedesktop.org/wayland/weston/commit/?id=2c40d1d30eabe46706822a8b5c94579aeba58e84>
> 
> I tried the above patch, but the issue didn't solved.
> 
> Regards
> Vishnu
> 
> On 12/28/2016 7:30 PM, Hiroto IMAMURA wrote:
> > Hi Jens and all,
> >
> > I face to a similar problem.
> >
> > I have confirmed that AGL Distributor (Dec. 22th master) is patched with the following patch, but a problem which is a crash of weston occurs even now.
> >> https://cgit.freedesktop.org/wayland/weston/commit/?id=2c40d1d30eabe46706822a8b5c94579aeba58e84
> > Therefore, I added the debug logging message to a signal handler of weston and confirmed the ARM register when weston crashed.
> > I found that the weston process accessed a NULL pointer at the following processing. (Line. 490)
> >
> > $ vi {AGL_TOP}/build/tmp/work/cortexa15hf-neon-agl-linux-gnueabi/wayland-ivi-extension/1.9.1-r0/git/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
> > [snip]
> >   457 static void
> >   458 touch_grab_down(struct weston_touch_grab *grab, uint32_t time, int touch_id,
> >   459                 wl_fixed_t x, wl_fixed_t y)
> >   460 {
> > [snip]
> >   486         /* Find a focused surface from subsurface list */
> >   487         send_surf = surf;
> >   488         if (!wl_list_empty(&surf->subsurface_list)) {
> >   489             wl_list_for_each(sub, &surf->subsurface_list, parent_link) {
> > *490                 if (sub->surface == grab->touch->focus->surface) {
> >   491                     send_surf = sub->surface;
> >   492                     break;
> >   493                 }
> >   494             }
> >   495         }
> > [snip]
> >
> > I analyzed using objdump and it seems to be following.
> >   - "&surf->subsurface_list(struct wl_list)" was NULL pointer when a problem occurred.
> >   - Segmentation fault occurred, because "wl_container_of" macro (it is expanded by "wl_list_for_each" macro) accessed "&surf->subsurface_list".
> >
> > Moreover, I found the report in the GENIVI-ivi-layer-management ML, which is similar to our problem.
> > http://lists.genivi.org/pipermail/genivi-ivi-layer-management/2015-December/003172.html
> >
> > Does anyone know the status of this report?
> >
> > Regards,
> > Hiroto Imamura
> >
> > On Wed, 28 Dec 2016 10:23:20 +0000
> > "Bocklage, Jens" <Jens_Bocklage at mentor.com> wrote:
> >
> >> Maybe related?
> >>
> >> https://cgit.freedesktop.org/wayland/weston/commit/?id=2c40d1d30eabe46706822a8b5c94579aeba58e84
> >>
> >>
> >> Von meinem iPhone gesendet
> >>
> >> Am 27.12.2016 um 07:08 schrieb Vishnu Jayan <vishnu.jayan at tataelxsi.co.in<mailto:vishnu.jayan at tataelxsi.co.in>>:
> >>
> >>
> >> Hi,
> >>
> >>
> >> Weston is crashing on touch event in ivi shell.
> >>
> >>
> >> I executed a sample application and set the "Layermanager set input foucs as touch".
> >>
> >> But on touching the screen the weston gets crash.
> >>
> >> "[   71.073382] audit: type=1701 audit(1480104583.051:4): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=System pid=3032 comm="weston" exe="/usr/bin/weston" sig=5"
> >>
> >>
> >> Platform: H3
> >>
> >> Touch Controller: ilitek
> >>
> >>
> >>
> >> Regards
> >>
> >> Vishnu
> >>
> >> _______________________________________________
> >> automotive-discussions mailing list
> >> automotive-discussions at lists.linuxfoundation.org<mailto:automotive-discussions at lists.linuxfoundation.org>
> >> https://lists.linuxfoundation.org/mailman/listinfo/automotive-discussions
> 
> 

-- 
Hiroto IMAMURA <imamura.hiroto at nttd-mse.com>
NTT DATA MSE CORPORATION

TEL : +81 50 3823 3062




More information about the automotive-discussions mailing list