On Wed, Jul 30, 2008 at 01:29:30AM +0800, Tom Stellard wrote: > I have been trying to use the VM._global object to look up and retrieve > properties while trying to execute some of the code in ABC blocks, and I > keep getting this error message when i try and call functions that use the > global object (as_object::dump_members() for example): > > lt-gprocessor: ../libbase/GC.h:232: void gnash::GC::addCollectable(const > gnash::GcResource*): Assertion `self == mainThread' failed. > > I was wondering if someone could give me some more information about what > this message means, why it might be happening, and what I can do to avoid > it.
The garbage collector maintain every GcResource object, which includes as_object and all descendants. GcResource instances register themselves at construction time and gnash model only supports registration with GC happening in main thread, that is the same thread that created the GC instance. If you get that assertion failure I guess you're trying to execute ABC blocks at parse time, as the parser runs in a separate thread. What you should be doing is defining a class like DoActionTag (see libcore/swf/DoActionTag.h), that is a ControlTag. ControlTag instances are executed by main thread when the playhead enters the frame containing it. You'll just have to register the ControlTag with the movie_definition containing it (addControlTag, see DoActionTag::doActionLoader)) and provide an execute() method. --strk; _______________________________________________ Gnash-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnash-dev

