-
-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crashs since Xcode 14.3 compilation CIContext#render. #1175
Comments
I have heard that Xcode 14.3 has bugs. Even if you update to 14.5, I think crashes will still occur. |
I've downgraded my Xcode version and all seems to be ok. It's probably a bug with Xcode 14.3... Yes we are using the #986 patch ! Here are some data : |
There may be a possibility that the detailed behavior of DispatchQueue has changed for situations with low memory capacity. Since all of them have low memory capacity, I'm concerned about the possibility of memory leaks occurring in Xcode 14.3. I will investigate. thank you. |
Thanks @shogo4405 ! |
I'm having difficulty reproducing the issue. I believe that the application crashes due to limited available memory, so I recommend that you limit memory usage on the application side to prevent this. Please let me know if there are other people who have the same issue. |
Xcode 14.3.1 is out, hope it will fix it ! |
The issue still here with XCode 14.3.1 :( |
Hello, I have the same issue, but hard to reproduce, there is no tool to overhead the memory of the device... Did you manage to reproduce this ? |
Just a guess to figure out the source, maybe try to use no optimization for target's Build Settings - Swift Compiler - Optimization Level? And test it on small selection of user base. |
Recalling a similar issue that happened on iOS 15 (?). There was a bug when user connects headphones, this would make the encoding to freeze for a few seconds, while
|
Thanks @leo150 for the research lead, I'll try. I admit that I was waiting to see under Xcode 15 if this fixes anything.. |
Does anyone have luck with XCode 15? I can't compile with 14.2 anymore because of the recent changes. |
Also waiting for feedbacks with Xcode 15 😅 |
Oops! The app being killed due to OOM (Out of Memory) when it exceeds device limits is an iOS specification. I believe it's up to the application to control memory usage and ensure it doesn't exceed the limits. Is everyone pausing xcode updates for now? |
The weird things is that OOM appear since Xcode 14.3 compilation... |
Hello, I've just tested on XCode 15.0.1. @shogo4405 do you think it's leak on our side? Or in the library? HaishinKit and Sonoma aren't compatible with XCode 14.2 so I can't use it to build :( Technical details : I'm using @heestand-xyz did you fix the issue on your side ? |
@Goule Goule In that usage, if you follow the next steps, you can save memory usage and reduce the chances of crashing due to memory shortage: On the app side, set the following value:
For HaishinKit, you need to make the following adjustments:
|
@floriangbh Is "attachScreen" for iOS or macOS? |
Thanks for your help @shogo4405 ! I will try with your recommendation. Before that I've tested with I'll try to reproduce it with the sample project ! |
It is difficult to fix the issue of crashing due to memory capacity limits. I believe that what was previously undetectable as OOM can now be detected as crashes through Firebase. I think it's better to come up with solutions to avoid reaching memory limits rather than trying to fix it afterwards. I'm adding code to the example that deliberately leads to memory shortage. It uses |
I can reproduce it. Prerequisites
Reproduce
How to fix it.https://github.com/shogo4405/HaishinKit.swift/blob/main/Sources/Media/MTHKView.swift#L71 currentStream.mixer.videoIO.context = CIContext(mtlDevice: device!) currentStream.mixer.videoIO.lockQueue.async {
self.currentStream.mixer.videoIO.context = CIContext(mtlDevice: device!)
} |
Describe the bug
Hello,
Since I compiled my app with Xcode 14.3 I've noticed some crashes:
It's hard to put code here since there are a lot of contexts with the app. But if someone has had the same issue since the Xcode 14.3 compilation maybe it can help.
To Reproduce
Expected behavior
No crash
Version
Smartphone info.
Additional context
No response
Screenshots
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: