Jump to content
Search Community

blitMask.disableBitmapMode causing crash [HELP]

Applauz test
Moderator Tag

Recommended Posts

I have a very strange problem happening.

 

I have a movie clip that gets loaded. It has a blitMask in it. When the MovieClip animates in with TweenMAX .. I have an onComplete:blitMask.disableBitmapMode being called.

 

The first time I load this movie clip everything works just fine.

 

However when I exit this movie clip and the movie clip is removed and nulled. .. The second time I access it .. When the TweenMAX runs and fires the onComplete:blitMask.disableBitmapMode .. the app crashes and shuts down.

 

It happens every single time.

 

Is there something conflicting when I remove the movie clip and null it ? maybe something not garbage collected with the biltMask ? ... or the Tweens ?

 

if I remove "onComplete:blitMask.disableBitmapMode" .. the crash problem goes away.

 

Thoughts ?

Link to comment
Share on other sites

To be sure .. can you tell me of a way to completely null and make sure blitMask is a fresh instance when I load up this movie clip for the second time. ?

 

Is there something I can put in my killMovieclip function to be sure ?

Link to comment
Share on other sites

BlitMask has a dispose() method, yes, but I'd really like to see an example FLA that demonstrates the crashing behavior. I can't imagine what the problem could be. And I'm just curious if you get the same problem by ONLY calling the BlitMask's update() method instead of the disableBitmapMode() method.

Link to comment
Share on other sites

The problem is not present when using the update() function. It's only there when I run a disableBitmapMode.

 

Also .. this problem only happens on iOS.

 

Also an interesting finding.

 

This problem only happens when I perform in the following order.

 

1.) Open movie clip that has a blitmask in it

2.) Close that movie clip, destroy all listeners, call blitMask.dispose()

3.) Open a different movie clip that also has a blitMask in it

4.) Close that movie clip, destroy all listeners, call blitMask.dispose()

5.) Re-Open the first movie clip ... when enable bitmapMode is called .. CRASH

 

Strange that as the second movie clip I open .. I can open any other movie clip that doesn't contain a blitMask in it and the crash doesn't happen.

Link to comment
Share on other sites

That is bizarre. I can't imagine how the problem could reside with BlitMask itself (maybe it's an iOS bug) but it's tough to say without being able to reproduce the issue on my end. Feel free to look inside the BlitMask class and see what's happening in the disableBitmapMode() method - it just sets bitmapMode to false, so you can look in that setter and see precisely what happens. You said it doesn't crash when you only call update(), so we know that's not the problem. The rest of the code is pretty basic in there, but maybe try commenting out each line to see which one affects the crash. Let me know if you figure anything out.

 

Oh, and you're not calling any methods on the SAME BlitMask instance after you call dispose() on it, are you? Obviously that would be a bad idea (once a BlitMask is disposed, you shouldn't use it).

Link to comment
Share on other sites

No .. I don't have any other calls to it. It's a really strange problem for sure.

 

I just don't understand why it only happens if I close out of that movie clip and open up another movie clip that has a blitmask in it and then return to the previous one. If I open a movie clip that doesn't include a blitmask... and return back to the troubled movie clip .. it doesn't crash.

 

I know that the iPad3 is strange and slightly buggy... especially in it's handling of retina graphics from AIR.

 

But this is just strange.

 

Another strange finding...

 

MovieClip1 is the movie clip in question

MovieClip2 is another movie clip with a blitMask in it ( this is what causes movieclip1 to crash)

MovieClip3 doesn't contain a blitMask

 

*When each of these movieclips is exited I am calling a destroy method that removes all listeners and nulls the closed out movie clip and also calls system.gc()

 

If I open MovieClip1 then close it .. then open MovieClip2 then close it .. then open MovieClip1 .. it crashes.

 

 

However..

 

If I open MovieClip1 then close it .. then open MovieClip2 then close it .. then open MovieClip3 then close it .. then open MovieClip1.. it doesn't crash.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...