bugGnash - The GNU Flash player - Bugs: bug #21754, Whack-a-doc assertion failure

 
 

bug #21754: Whack-a-doc assertion failure

Submitted by:  Benjamin Wolsey <bwy>
Submitted on:  Sat 08 Dec 2007 09:39:40 AM UTC  
 
Category: coreSeverity: 5 - Blocker
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: Zou Lunkai <zoulunkai>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 12 Dec 2007 06:51:57 AM UTC, comment #6:

should be fixed.

Zou Lunkai <zoulunkai>In charge of this item.
Wed 12 Dec 2007 01:16:51 AM UTC, comment #5:

> Can the user reference sprites used as button state characters ?


yes, but not the same as normal sprites.

>Can the user unload those sprite ?


I believe so. As long as user could reference it, user could destroy it.

> - during button transitions: in this case I wonder why the
> instance is unloaded at all since all button state instances
> remain alive as long as the button instance itself remains
> alive..


In Gnash, restart() would probably unload some characters and recreate it. I am pretty sure this is the problem with Whack-a-doc.swf.

It does not make much sense to disscuss why we need restart() for button_character_instance. button_character_instance design is completely bogus and need more love:)

Zou Lunkai <zoulunkai>In charge of this item.
Tue 11 Dec 2007 09:26:33 PM UTC, comment #4:

Nope, I didn't insist on ::restart(). As far as I remember, we just discussed about restart() and what was it's original purpose. I don't think we found an answer for that.

AFAIK restart() is called only in these two situations:

- by the GUI: when the movie is restarted? So, probably not the problem with this bug

- during button transitions: in this case I wonder why the instance is unloaded at all since all button state instances remain alive as long as the button instance itself remains alive..

Udo Giacomozzi <udog>
Project Member
Tue 11 Dec 2007 03:36:47 PM UTC, comment #3:

We stopped using ::restart for the Gui work, so is it now only needed for buttons ?
Can the user reference sprites used as button state characters ?
Can the user unload those sprite ?
Will they be recreated when the state is changed back ?

IIRC Udo insisted on a ::restart to avoid invalidating buttons
too much.

Sandro Santilli <strk>
Project Member
Tue 11 Dec 2007 08:52:06 AM UTC, comment #2:

I'v found the problem.

The culprint is sprite_instance::restart(), see following code:

void sprite_instance::restart()
{
media::sound_handler* sh = get_sound_handler();
if (sh != NULL) sh->stop_all_sounds();

restoreDisplayList(0);

m_play_state = PLAY;
}

Fix:

void sprite_instance::restart()
{
media::sound_handler* sh = get_sound_handler();
if (sh != NULL) sh->stop_all_sounds();

// Don't restart an unloaded character, it doesn't make
// any sense at all.
if( ! isUnloaded() )
{
restoreDisplayList(0);
}

m_play_state = PLAY;
}

explanation: we don't need to restart an unloaded character in any cases. Conceptually, the destine of an unloaded character is to be destroyed. A better solution might be drop the restart forever:) It's unclear, and the same for button_character_instance::restart().

I need to fix building and make check here before any commit. You can try the above patch if it blocks your work.

Zou Lunkai <zoulunkai>In charge of this item.
Sat 08 Dec 2007 09:43:12 AM UTC, comment #1:

the assertion checks that we always ::unload before ::destroy.
it's likely timeline related (5th redesign).

Sandro Santilli <strk>
Project Member
Sat 08 Dec 2007 09:39:40 AM UTC, original submission:

Whack-a-doc (File #12272) gives this failure:

lt-gtk-gnash: character.cpp:847: virtual void gnash::character::destroy(): assertion »isUnloaded()« failed.

Benjamin Wolsey <bwy>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by udog (Posted a comment)
  • -unavailable- added by strk
  • -unavailable- added by zoulunkai (Posted a comment)
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by strk
  • -unavailable- added by bwy (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 13 Dec 2007 08:11:52 AM UTCzoulunkaiStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 12 Dec 2007 06:51:57 AM UTCzoulunkaiStatusIn Progress=>Ready For Test
    Tue 11 Dec 2007 03:36:47 PM UTCstrkCarbon-Copy-=>Added udog
    Tue 11 Dec 2007 08:52:06 AM UTCzoulunkaiStatusNone=>In Progress
    Sat 08 Dec 2007 09:43:12 AM UTCstrkSeverity3 - Normal=>5 - Blocker
      Assigned toNone=>zoulunkai
      Carbon-Copy-=>Added zoulunkai

    Back to the top


    Powered by Savane 3.1-cleanup1