|
From: Braden M. <br...@en...> - 2010-05-03 06:26:08
|
On Thu, 2010-04-01 at 15:57 -0400, Braden McDaniel wrote:
> On 3/29/10 4:58 PM, Braden McDaniel wrote:
> > I'm still trying to get a handle on exactly what's going on
> > here. I'm getting closer; I think I'm looking at a race between some
> > stream handling threads. But I haven't isolated it yet.
>
> This may or may not be the case. Regardless, there is definitely
> something screwy going on in the PNG decoder. I think what's happening
> is that for some images, the decoder is not detecting the number of
> pixel components correctly and consequently isn't giving libpng a big
> enough buffer to work with. libpng calls then proceed to stomp all over
> memory (which on my machine appears consistently to be the browser's
> node_metatype_registry); hilarity ensues.
This bug continues to elude me. :-(
I have discovered a few things...
* Even if I comment out all of the texture URLs in pngboxes.wrl, I
get a segfault in sdl-viewer occasionally. So there's
*something* screwy going on irrespective of the image loading
code.
* Fiddling with valgrind has made it clear that Text nodes are
leaky. But, since valgrind isn't showing a lot of the symbols in
its backtrace to the allocation point, tracking the leaks down
is difficult. I found one spot where we were leaking FT_Glyphs
and fixed it; but it seems there's more. However, it seems
unlikely that this is the source of the memory *corruption* that
appears to be happening.
* One somewhat ominous looking message I'm getting from valgrind
is pointing to my Spirit-based node metatype identifier parser
(which is just a minor augmentation of my URI parser). It's not
obvious to me that I'm doing something wrong here; conceivably
there's some threading-related bug in Spirit. However, Spirit
has been substantially rewritten since I wrote this; and my code
has not been updated to take advantage of the new version. As I
doubt the Spirit developers are hugely interested in possible
obscure bugs in the old version of their project, my next step
is to rewrite my URI and node metatype identifier parsers using
Spirit2.
One nice side effect of me combing through the text rendering code is
that I have broken some big scary functions into smaller scary
functions.
--
Braden McDaniel <br...@en...>
|