Aralekk/simple360player_iOS

memory issue

cyxse opened this issue · 24 comments

cyxse commented

Memory leak when playing by Xcode profile tool launch app, why?

Will have a look

skscene and skvideonode not dealloc

Yes, I will put a fix, thank you !

Should be better now

Nope still leaking. Have a look at this: https://forums.developer.apple.com/thread/21855
Play the video 2-3 times (scrub back). Received memory warning will appear 2-3 times in the debugger and then it crashes. I'm experiencing the same with my own version of a VR 360 video player. Please file a bug report at Apple. This has been unfixed for some time...

Not able to reproduce here, if it happens I'll file a radar, thanks NickAtGit

kosso commented

This is still happening for me.
Try making the video loop. I also just had it happen on a longer YouTube 360 mp4 url. It crashed after a few minutes.

To loop a video I added :

        NSNotificationCenter.defaultCenter().addObserver(self,
            selector: "loopVideo",
            name: AVPlayerItemDidPlayToEndTimeNotification,
            object: player?.currentItem
        )

and

    func loopVideo()  {

        player!.pause()

        let seconds : Int64 = 0
        let preferredTimeScale : Int32 = 1
        let seekTime : CMTime = CMTimeMake(seconds, preferredTimeScale)
        player!.seekToTime(seekTime)
        player!.play()
    }

Try letting it run for a few minutes or loops.

@kosso did just that and let it run 7-8 times without issue :/ I am on a 6S plus maybe that's that. I ll try on an iphone 5

kosso commented

@Aralekk I'm on an iPhone6 running iOS 9.2.1

I just let it run with the included vr.mp4 demo and the memory warnings started after about 40 seconds, then crashed a few seconds later.

The bug definitely is still present, run a memory leak profile with instruments...

kosso commented

Yes. Running through Instruments shows the memory heap growing and growing to over a 1Gb until it crashes.

I thought it might be my looping. But playing a long 360 mp4 from YouTube caused the same result eventually. I can't quite tell what's causing it. But there are a lot of references to something called "jet_texture_Metal" taking up the majority of the persistent allocations. This seems to have something to do with SpriteKit.

Wanted to bump this. Did anyone come to a solution for the memory leak? I've been trying and cannot find one.

kosso commented

Same here. No luck.

Bumping. iOS 9.3.2, the issue remains :(

I am at WWDC in June. I will talk to the SceneKit team there and hope they'll fix it soon...

Awesome, I keep my fingers crossed :)

@NickAtGit I'll be at WWDC too, maybe we can catchup and go at them a unified front ? ;)
Hope the fix will come sonner rather than later..

@Aralekk yeah let's do this

Unified front sounds like a winner. At the moment I had to turn to Google VR SDK but it just doesn't feel right ;)

They do, it’s called cardboard and has a toggle button implemented in GVRWidgetView (http://cocoadocs.org/docsets/GVRSDK/0.8.0/Classes/GVRWidgetView.html http://cocoadocs.org/docsets/GVRSDK/0.8.0/Classes/GVRWidgetView.html)

25 maj 2016 kl. 02:46 skrev Contra notifications@github.com:

@sajoneri https://github.com/sajoneri It seems that Google VR SDK doesn't support stereo video?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub #2 (comment)

@sajoneri OK Thanks.
I also found this: "Stereo videos should be 1:1 aspect ratio." https://developers.google.com/vr/concepts/vrview#supported_formats

@Aralekk where are you at WWDC? I'm sitting in the Broadway download area in front of Pacific Heights... The SceneKit Lab is this afternoon

Ok I'm coming up ! You can reach me(415) 483 6088

Ok i asked everybody there, you must have left :) reach me on twitter @aswiniarski if you want to meet :)