OCaml Forge

Detail: [#1232] Crash when doing many redisplay in gtk

Bugs: Browse | Download .csv | Monitor

[#1232] Crash when doing many redisplay in gtk

Date:
2012-10-29 10:49
Priority:
3
State:
Closed
Submitted by:
Pierre Chambart (chambart)
Assigned to:
Pierre Hauweele (antegallya)
Hardware:
None
Resolution:
Fixed
Severity:
critical
Version:
None
Component:
Cairo
Operating System:
Linux
Product:
Cairo
 
URL:
Summary:
Crash when doing many redisplay in gtk

Detailed description
When running the example gtk_demo and resizing a lot the window to trigger redisplay it crashes with:

gtk_demo.native: /tmp/buildd/cairo-1.12.2/src/cairo-surface.c:851: cairo_surface_destroy: Assertion `((*&(&surface->ref_count)->ref_count) > 0)' failed.

Followup

Message
Date: 2012-11-18 22:52
Sender: Pierre Hauweele

Your fix has been commited in the repository. However, it is a quick fix only for that bug and it does not fix the underlying problem of expressing the dependency of the context on either a cairo_surface_t or a GdkDrawable, which should be adressed later.
Date: 2012-11-18 14:26
Sender: Pierre Chambart

This can be fixed by the provided patch:
When creating a gtk context, there is no associated surface, so there is a problem when destroying the surface after destroying the context. The simple fix is to increase the count of references on the backing surface when creating a gtk context.

Attached Files:

Attachments:
0001-Fix-destruction-of-gtk-context.patch

Changes:

Field Old Value Date By
close_dateNone2012-11-18 22:52antegallya
assigned_tonone2012-11-18 22:52antegallya
ResolutionNone2012-11-18 22:52antegallya
status_idOpen2012-11-18 22:52antegallya
File Added197: 0001-Fix-destruction-of-gtk-context.patch2012-11-18 14:26chambart