[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] segfault using cairo/SDL
From: |
Markus Klotzbuecher |
Subject: |
Re: [Chicken-users] segfault using cairo/SDL |
Date: |
Tue, 3 Jan 2012 21:11:40 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi All,
On Fri, Dec 23, 2011 at 04:56:07PM +0100, Markus Klotzbuecher wrote:
> On Thu, Dec 22, 2011 at 10:57:39AM +0100, Markus Klotzbuecher wrote:
>
> > On Thu, Dec 22, 2011 at 09:41:05AM +0100, Christian Kellermann wrote:
> > > * Markus Klotzbuecher <address@hidden> [111221 21:12]:
> > > > Dear All,
> > > >
> > > > I'm trying to use the cairo and sdl eggs for a small visualization
> > > > tool. One thing I would like to do is to use the mouse to move around
> > > > the current figure by clicking and holding it. However, I am getting
> > > > frequent segfaults after a few seconds of this moving around. The
> > > > crash happens both when running compiled and interpreted. Below an
> > > > slightly modified version of the test-cairo.scm from the cairo egg
> > > > that implements this "dragging" (I would have pasted it to
> > > > http://paste.call-cc.org/ , but the service seems down)
> > > >
> > > > Is anyone else using these eggs and has seen such problems? Does
> > > > anyone have a suggestions how to track this down?
> > >
> > > Yes, I am currently using it for a small doodle framework for easy
> > > visualisations and games. I haven't looked (yet) into mouse support.
> > > The SDL egg is rather dusty and there might be such dark corners.
> > >
> > > I will file this as a bug and will have a look at it during the
> > > holidays.
> >
> > Great, much appreciated!
> >
> > > If you find the time you could build a chicken with debugging
> > > information (add DEBUGBUILD=1 to the make call) and show be the
> > > backtrace of that. This might be of more help than the standard
> > > backtrace.
> >
> > Fine, i'll try to do that during the holidays!
>
> The problem seems to be triggered by the use of text-extents. I
> uploaded a newer testcase to the bug report that makes heavier use of
> extents and also crashes almost immediately on my machine. I also
> added a backtraces from a CHICKEN built with DEBUGBUILD=1.
I took another attempt to figure out this crash. I still don't see the
problem, but I've found a smaller testcase that reliably crashes (for
me, at least):
(use cairo)
(define t1 (make-cairo-text-extents-type))
(display t1)
(cairo-text-extents-x-bearing-set! t1 1)
(display t1)
I also discovered a bug in the record printer for the extents types,
patch attached.
Thanks in advance for any suggestions!
Markus
>From a93a5743232fe11399fbffdb0a12c1dd0f587be5 Mon Sep 17 00:00:00 2001
From: Markus Klotzbuecher <address@hidden>
Date: Tue, 3 Jan 2012 21:09:05 +0100
Subject: [PATCH] Fix record printing of cairo-text-extents-type
---
release/4/cairo/trunk/cairo.scm | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/release/4/cairo/trunk/cairo.scm b/release/4/cairo/trunk/cairo.scm
index c2ad2b5..d568bcf 100644
--- a/release/4/cairo/trunk/cairo.scm
+++ b/release/4/cairo/trunk/cairo.scm
@@ -308,14 +308,14 @@ EOF
(lambda () (maker (make-blob sizeof-cairo-text-extents)))))
(define-record-printer (cairo-text-extents-type te out)
- (for-each (lambda (x) (display x out)
- (list "#<cairo-text-extents "
- (cairo-text-extents-x-bearing te)" "
- (cairo-text-extents-y-bearing te)" "
- (cairo-text-extents-width te)" "
- (cairo-text-extents-height te)" "
- (cairo-text-extents-x-advance te)" "
- (cairo-text-extents-y-advance te)">"))))
+ (for-each (lambda (x) (display x out))
+ (list "#<cairo-text-extents "
+ (cairo-text-extents-x-bearing te)" "
+ (cairo-text-extents-y-bearing te)" "
+ (cairo-text-extents-width te)" "
+ (cairo-text-extents-height te)" "
+ (cairo-text-extents-x-advance te)" "
+ (cairo-text-extents-y-advance te)">")))
(define-foreign-type cairo_text_extents_t scheme-pointer)
@@ -341,13 +341,13 @@ EOF
(lambda () (maker (make-blob sizeof-cairo-font-extents)))))
(define-record-printer (cairo-font-extents-type e out)
- (for-each (lambda (x) (display x out)
- (list "#<cairo-font-extents "
- (cairo-font-extents-ascent e)" "
- (cairo-font-extents-descent e)" "
- (cairo-font-extents-height e)" "
- (cairo-font-extents-max-x-advance e)" "
- (cairo-font-extents-max-y-advance e)">"))))
+ (for-each (lambda (x) (display x out))
+ (list "#<cairo-font-extents "
+ (cairo-font-extents-ascent e)" "
+ (cairo-font-extents-descent e)" "
+ (cairo-font-extents-height e)" "
+ (cairo-font-extents-max-x-advance e)" "
+ (cairo-font-extents-max-y-advance e)">")))
(define-foreign-type cairo_font_extents_t scheme-pointer)
--
1.7.7.3
- Re: [Chicken-users] segfault using cairo/SDL,
Markus Klotzbuecher <=