Aralekk / simple360player_iOS

Simple 360 Video player for iOS using SceneKit
161 stars 22 forks source link

memory issue #2

Closed cyxse closed 8 years ago

cyxse commented 8 years ago

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

Aralekk commented 8 years ago

Will have a look

Rannie commented 8 years ago

skscene and skvideonode not dealloc

Aralekk commented 8 years ago

Yes, I will put a fix, thank you !

Aralekk commented 8 years ago

Should be better now

NickAtGit commented 8 years ago

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...

Aralekk commented 8 years ago

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

kosso commented 8 years ago

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.

Aralekk commented 8 years ago

@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 8 years ago

@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.

NickAtGit commented 8 years ago

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

kosso commented 8 years ago

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.

micahchiang commented 8 years ago

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

kosso commented 8 years ago

Same here. No luck.

sajoneri commented 8 years ago

Bumping. iOS 9.3.2, the issue remains :(

NickAtGit commented 8 years ago

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

sajoneri commented 8 years ago

Awesome, I keep my fingers crossed :)

Aralekk commented 8 years ago

@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..

NickAtGit commented 8 years ago

@Aralekk yeah let's do this

sajoneri commented 8 years ago

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

sajoneri commented 8 years ago

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 https://github.com/Aralekk/simple360player_iOS/issues/2#issuecomment-221443816

avantcontra commented 8 years ago

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

NickAtGit commented 8 years ago

@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

Aralekk commented 8 years ago

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

Aralekk commented 8 years ago

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