Bug 72519 - Weston crashes when running two programs with text input and the input panel.
Summary: Weston crashes when running two programs with text input and the input panel.
Status: VERIFIED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-09 12:58 UTC by Rafael Antognolli
Modified: 2014-01-06 20:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Backtrace of the crash. (2.38 KB, text/plain)
2013-12-09 12:58 UTC, Rafael Antognolli
Details
Simple workaround, probably not the right fix. (361 bytes, patch)
2013-12-09 13:01 UTC, Rafael Antognolli
Details | Splinter Review

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.