From 6ddba1ce89f7d44b868ad182c4941a06a53e2bf9 Mon Sep 17 00:00:00 2001 From: Emanuele Aina Date: Tue, 16 Dec 2014 14:58:55 +0100 Subject: [PATCH 1/3] cairo-trace: Fix duplicated surface push on similar-image The current code results in trace lines with the source surface being pushed on the stack two times instead of one: s1 s1 //ARGB32 48 48 similar-image % s2 Instead of: s1 //ARGB32 48 48 similar-image % s2 This greatly confuses later commands when the script was replayed, causing traces for trivial GTK3 programs to be unplayable, usually yielding the following error: "invalid value (typically too big) for the size of the input (surface, pattern, etc.)" Drop the duplicated entry from the trace line printed by the cairo_surface_create_similar_image() override. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73580 Signed-off-by: Emanuele Aina --- util/cairo-trace/trace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c index 4d3482646695..d5d76689c067 100644 --- a/util/cairo-trace/trace.c +++ b/util/cairo-trace/trace.c @@ -3738,8 +3738,7 @@ cairo_surface_create_similar_image (cairo_surface_t *other, else _trace_printf ("%d index ", current_stack_depth - other_obj->operand - 1); - _trace_printf ("s%ld //%s %d %d similar-image %% s%ld\n", - _get_surface_id (other), + _trace_printf ("//%s %d %d similar-image %% s%ld\n", _format_to_string (format), width, height, new_obj->token); -- 2.1.4