Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

NukeUI + Introspect issue #42

Open
andrewsexcellent opened this issue May 15, 2022 · 5 comments
Open

NukeUI + Introspect issue #42

andrewsexcellent opened this issue May 15, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@andrewsexcellent
Copy link

andrewsexcellent commented May 15, 2022

Hello,

First off - thanks for the effort on the library - really appreciate it!

In my project I'm using NukeUI and Introspect
I have a view that uses about 10 LazyImages to download and show an mp4 and another piece of that view that responds to a sheet modifier that utilizes detents on iOS 15 via Introspect, as they're not yet in SwiftUI.

The issue that I'm seeing is that if I show that view via a NavigationView more than 3 times, the mp4s no longer load and play.

Additionally, inspecting the memory graph, shows that even if I navigate away from that view, there are about 60 LazyImage and VideoPlayerView sticking around in memory, which I assume is the crux of the issue.

Commenting out the Introspect portion fixes the issue and everything works as expected, but I need it in my app for other things as well.

Now, this might very well be an Introspect issue and I'm raising an issue in that repo as well, but just wanted to see whether the maintainer here might have any insights into why this is happening.

Code that reproduces the issue

Tested on iOS 15.4.1 on iPhone 12 Pro Max, compiled with Xcode 13.3.1 (interestingly the simulator doesn't show the issue)

NukeUI version: 0.8.1
Introspect version: 0.1.4

Video of the issue:

RPReplay_Final1652631340.mov

Memory graph:

Screen Shot 2022-05-15 at 19 18 40

Thanks!

@andrewsexcellent andrewsexcellent changed the title NukeUI + Introspection issue NukeUI + Introspect issue May 15, 2022
@pgorrindo
Copy link

hi @kean - we'd love to hear your thoughts on this issue if you have a moment! it is a blocker for us, and ultimately will determine if we can use Nuke/NukeUI. Thanks so much for a great library!

@kean
Copy link
Owner

kean commented May 19, 2022

The issue that I'm seeing is that if I show that view via a NavigationView more than 3 times, the mp4s no longer load and play.

Unfortunately, it's a known limitation. The number of players you can have at once on-screen is limited. The limit is not documented and depends on the platform. In general, expect to have about four players playing at once. So the app needs to be designed to work around that.

I don't think there are any known leaks in NukeUI. If you find them, I would appreciate if you could report them.

@andrewsexcellent
Copy link
Author

Hey kean, thanks for the reply!

We're going back and forth in a navigation stack, that should theoretically kill off the VideoPlayer views, but it doesn't seem like it is.

Surely it doesn't mean that you can only ever have 4 players play your mp4s and that's it?

@kean
Copy link
Owner

kean commented May 19, 2022

You can have around four playing at the same time.

@pgorrindo
Copy link

You can have around four playing at the same time.

Great, thanks for reiterating this point! Our concern is more that it seems the VideoPlayer views aren't being killed off when navigating in the stack. We aren't asking at all about the number playing at the same time -- but rather about player views persisting when they shouldn't be.

@kean kean added the bug Something isn't working label Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants