Bug 72519

Summary: Weston crashes when running two programs with text input and the input panel.
Product: Wayland Reporter: Rafael Antognolli <rafael.antognolli>
Component: westonAssignee: Wayland bug list <wayland-bugs>
Status: VERIFIED FIXED QA Contact:
Severity: critical    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Backtrace of the crash.
Simple workaround, probably not the right fix.

Description Rafael Antognolli 2013-12-09 12:58:26 UTC
Created attachment 90510 [details]
Backtrace of the crash.

Start weston-editor, the input panel (virtual keyboard) should open. Start a new weston-editor, weston then crashes.

The backtrace is attached, and it's possible to see that inside the input_panel_configure() function, right before weston_slide_run, the view->output is NULL. It should be assigned to something else in the weston_view_update_transform(), but that function returns earlier because the transform is not dirty.

A simple workaround of assigning that output fixes the problem. But I'm not sure if it should be already assigned somewhere else when it reaches this point of the code.

Anyway, a workaround is simple and should fix it.
Comment 1 Rafael Antognolli 2013-12-09 13:01:38 UTC
Created attachment 90511 [details] [review]
Simple workaround, probably not the right fix.

Just adding that the view->output is probably set to NULL on weston_view_unmap(), when hiding the input panel surface.
Comment 2 Kristian Høgsberg 2014-01-02 09:34:41 UTC
commit 2eebcd34fc954fa5b5b6ae0a753fe250da78302c
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu Jan 2 01:27:06 2014 -0800

    shell: Test for surface->width == 0 to see if input-panel was unmapped
    
    The input-panel codes tries to see determine if a buffer has not yet
    been attached (or a NULL buffer has been attached), and doesn't map
    the input panel surface yet in that case.  However, it test for
    buffer_ref being NULL, which can happen for other reasons.  The right
    test is to see if surface->width is 0, which means that either a
    buffer hasn't yet been attached or a NULL buffer has been attached.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=72519

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.