discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating jpegs in a separate Thread


From: Alexander Malmberg
Subject: Re: Creating jpegs in a separate Thread
Date: Wed, 19 Nov 2003 02:17:33 +0100

Adam Fedor wrote:
> On Tue, 2003-11-18 at 16:48, Stefan Kleine Stegemann wrote:
> > Hi,
> >
> > i've a problem when trying to create an NSImage from a jpeg file in
> > separate
> > thread. I get a core dump that points somewhere into libwraster. So i
> > digged
> > deeper, and found that the wraster context is null in the method
> > _initFromWrasterFile
> > in XGBitmapImageRep.
> >
> > any workarounds for this?
> >
> 
> Well, currently the current GSDisplayServer is stored on a per-thread
> basis, which is probably a bug.

This is no bug. GSDisplayServer, like the rest of the backend (and most
of -gui) is explicitly not thread safe, so if you want to use it from
two threads, you need two separate instances.

The bug is that image loading touches these parts at all. Yet another
issue caused by using wraster to load images, and one that would be
fixed by fixing this to use lib{jpeg,png,...} directly. I thought we had
a task for this, but I can't see it now. Anyway, it's fairly
straightforward work, and it'd fix many issues; patches are very
welcome. :)

- Alexander Malmberg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]