weston/clients
Bryce Harrington 5c611d933f
terminal: Fix crash due to race condition in init
weston-terminal intermittently crashes on startup.  This occurs because
some parameters in the weston_terminal structure such as data_pitch,
don't get set to non-zero until the resize_handler() callback gets
triggered.  That callback makes a call to terminal_resize_cells(), to
calculate the proper values for these parameters.

On occasion, the resize handler call is slow to resolve, and the program
proceeds to start processing characters for the terminal window.  With
the parameters defaulting to zero, certain calculations come out wrong,
leading the program to attempt to scroll the buffer when it shouldn't,
and thus follows the crash.

Instead, force the call to terminal_resize_cells() during the init, with
some dummy defaults, to ensure the parameters are always non-zero.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=97539
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-09-01 00:52:10 +02:00
..
calibrator.c Moved helper macro to a discrete include file. 2015-06-15 17:11:45 -07:00
clickdot.c clients & tests: Unify multiple definitions of x*alloc and related functions 2016-03-17 14:13:13 +02:00
cliptest.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
confine.c clients/confine: Toggle maximized state with 'm' 2016-07-26 17:21:15 +08:00
desktop-shell.c config-parser: Add weston_config_section_get_color 2016-07-26 15:57:14 -07:00
dnd.c clients & tests: Unify multiple definitions of x*alloc and related functions 2016-03-17 14:13:13 +02:00
editor.c weston-editor: Close the data source after sending 2016-08-16 12:51:49 +08:00
eventdemo.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
flower.c client: fix spelling mistake 2016-04-05 16:00:21 -07:00
fullscreen.c clients: Use zalloc 2016-03-09 22:54:54 -08:00
gears.c clients: Update boilerplate from MIT X11 license to MIT Expat licenses 2015-06-15 13:04:18 -07:00
image.c cosmetic: Remove a few double semicolons 2015-10-07 11:22:03 -07:00
ivi-shell-user-interface.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
keyboard.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
multi-resource.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
nested-client.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
nested.c clients/nested: use weston_check_egl_extension over strstr 2016-07-22 15:29:04 +01:00
presentation-shm.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
resizor.c clients/resizor: Use pointer locking for resizing window 2016-07-26 17:21:15 +08:00
scaler.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
screenshot.c clients & tests: Unify multiple definitions of x*alloc and related functions 2016-03-17 14:13:13 +02:00
simple-damage.c clients/simple-damage: Port to xdg_shell unstable v6 2016-08-15 20:15:58 +08:00
simple-dmabuf-intel.c clients/simple-dmabuf-intel: Port to xdg_shell unstable v6 2016-08-15 20:15:58 +08:00
simple-dmabuf-v4l.c gl-renderer, simple-dmabuf-v4l: fix dmabuf y-invert 2016-08-15 19:07:48 +02:00
simple-egl.c clients/simple-egl: Port to xdg_shell unstable v6 2016-08-15 20:15:58 +08:00
simple-shm.c clients/simple-shm: Port to xdg_shell unstable v6 2016-08-15 20:15:58 +08:00
simple-touch.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
smoke.c client: fix spelling mistake 2016-04-05 16:00:21 -07:00
stacking.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
subsurfaces.c clients & tests: Unify multiple definitions of x*alloc and related functions 2016-03-17 14:13:13 +02:00
terminal.c terminal: Fix crash due to race condition in init 2016-09-01 00:52:10 +02:00
transformed.c clients: Update boilerplate from MIT X11 license to MIT Expat licenses 2015-06-15 13:04:18 -07:00
weston-info.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
weston-simple-im.c clients: Use ARRAY_LENGTH macro in weston-simple-im 2016-09-01 00:47:18 +02:00
window.c toytoolkit: Port to xdg_shell unstable v6 2016-08-15 20:15:58 +08:00
window.h include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00