[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-dev] Re: WARNING: add_bitmap called with bi=NULL
From: |
strk |
Subject: |
[Gnash-dev] Re: WARNING: add_bitmap called with bi=NULL |
Date: |
Mon, 6 Nov 2006 09:53:40 +0100 |
On Mon, Nov 06, 2006 at 12:09:41AM +0100, Udo Giacomozzi wrote:
> s> Where does the add_bitmap method come from ?
> s> It seems not be a render_handler.h interface, so is it AGG-only ?
> s> I think the behaviour of being called with a NULL pointer should
> s> be documented in it's definition.
>
> It's defined in render_handler_agg_style.h and invoked from
> render_handler_agg.cpp. The warning happens when
> fill_styles[].get_bitmap_info() == NULL which is not rare. It seems
> not to be a problem (some movies contain 5-6 fill styles even if
> they're never used) but it must be handled to avoid segfaults.
>
> Don't know what's the reason for this and thus the warning message.
It seems NULL return from fill_style.get_bitmap_info() happens
when there's no bitmap character associated to a BITMAP fill...
The only reaon I can think of for this to happen is that while
reading/parsing the fill-style record we get a character_id which
is not found in the characters dictionary.
I added a warning there, to further inspect.
It turns out that on my testcase "magical trevor"
http://weebls-stuff.com/toons/flash/6964trev3c.swf
The fill-style contains a character id=65535 (0xFFFF).
I might think this is a spurious and unused fill-style
accidentally left in from the SWF generator (just think about
a .doc file and laugh). Anyway, if that is really unused,
why is AGG ever passed it ?
This seems another occasion to use our new macros (malformed SWF?)
As usual, the best approach would be trying to *produce* such
a malformed SWF to find out why and how it should be handled.
--strk;