[Top][All Lists]

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

Re: [Gnash-dev] std::bad_cast

From: Benjamin Wolsey
Subject: Re: [Gnash-dev] std::bad_cast
Date: Sun, 10 May 2009 18:26:43 -0400

Am Sonntag, den 10.05.2009, 17:29 +0200 schrieb Andrea Palmatè:
> Hi,
> i'm trying several swf files to understand what is wrong with youtube  
> and similar player.
> Using verbose output i receive a lot of:
> DEBUG: Unexpected exception from swf_function execution: std::bad_cast

Gnash may throw exceptions during function execution to signify certain
failures. They should be caught by one of the function classes so that
Gnash can continue. The swf_function class still catches a
std::exception, which means that any standard exception thrown will be
caught there.

This is bad behaviour, as Gnash should only throw GnashExceptions if
they aren't expected to be caught immediately. Your bad_cast is most
likely an implementation bug on AmigaOS that's being masked by this
generic catch.

The catch in swf_function should be changed to catch only
GnashExceptions; any other std::exception that's thrown is unexpected
and isn't something that Gnash can deal with and continue. It would also
give you a better idea of what's going wrong. If it is a legitimate
throw of bad_cast, it should be caught at the point it's thrown.


The current release of Gnash is 0.8.5

Benjamin Wolsey, Software Developer -

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

reply via email to

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