Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Media plugins issue - Game is crashed after completion of video in ios.... — Gideros Forum

Media plugins issue - Game is crashed after completion of video in ios....

SarthakSarthak Member
edited February 2015 in General questions
Video is played using media player inside my game.

It's working perfectly in Android devices, but in iOS devices, it will crashed after the completion of video with error message : "exc_bad_access code=1 address=0x91756e9a".

So is there any solution?

Comments

  • seems to be a memory problem
    which ios version and devices have you tried? Will retest on mine
  • SarthakSarthak Member
    edited March 2015
    Got the solution...

    Thanks to my friend, who is ios developer.

    it is related with memory. In the plugins, there is a mediaplayer in being released,then after it is set as nil. To solve this

    In Xcode Project,
    Open GMediaClass.mm from Plugins folder, and then replace your stop method with below code,
    -(void)stop{
        if(self.Alayer != nil)
        {
            [self.Alayer removeFromSuperlayer];
            self.Alayer = nil;
            [self.Alayer release];
        }
        if(self.player != nil){
            [self.player pause];
            [self.player release];
            self.player = nil;
        }
        if([self superview]!=nil)
            [self removeFromSuperview];
    }
    +1 -1 (+3 / -0 )Share on Facebook
  • ar2rsawseenar2rsawseen Maintainer
    edited March 2015 Accepted Answer
    Thank you @Sarthak, incorporating fix now ;)

    I only don't understand, how come it should be nilled and only then released?
    Well, not an IOS developer, but if this is working for you :)

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.