Skip to content
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

Memory usage continues to increase when receiving Payload #2147

Open
24arifrian opened this issue Oct 4, 2023 · 0 comments
Open

Memory usage continues to increase when receiving Payload #2147

24arifrian opened this issue Oct 4, 2023 · 0 comments
Labels
P3 Priority 3 issue (default for bugs or new feature requests; things we'd like to work on) platform: apple An issue with the macOS or iOS implementation project: connections An issue with the Connections project type: bug Something is broken or not working as intended

Comments

@24arifrian
Copy link

24arifrian commented Oct 4, 2023

Project

Nearby Connections

Language

Swift

OS Platform

Apple

What happened?

I'm trying to use the nearby connection api to connect an Android device to an IOS (Simulator), and both can connect perfectly.

However, when receiving Payload on iOS, I found that the memory usage increased over time. And that can happen even if the data received is not handled at all. It doesn't matter if the Payload received is of Stream or Data (Bytes) type. Both can cause it.

The data received is a real-time audio recording, so every few milliseconds the device will receive the data.

I am a newbie in Swift (IOS) by the way, I don't know if there is a way to free the received data in memory or not. I apologize if this was my mistake in handling the API, and this issue is not a bug. And I ask for help to resolve this issue


Attachment
image

What did you expect to happen?

Immediately free memory allocation once the received data is handled, or at least memory usage does not continue to increase

How can we reproduce it (as minimally and precisely as possible)?

  1. Start Advertising on android (or another IOS)
  2. Start Discovery on IOS
  3. Attempt to connect to discovered Android
  4. After both connected, try send Payload Stream from android, or send Payload Bytes continuously
  5. When receiving a Payload Stream or Bytes, open a debug session in navigation from Xcode
image

How often does this bug happen?

Every time

Standalone code to reproduce the issue

No response

Relevant log output

No response

Anything else we need to know?

No response

@24arifrian 24arifrian added needs-triage Issue still needs to be assigned, labeled and deduplicated type: bug Something is broken or not working as intended labels Oct 4, 2023
@bourdakos1 bourdakos1 added P3 Priority 3 issue (default for bugs or new feature requests; things we'd like to work on) project: connections An issue with the Connections project platform: apple An issue with the macOS or iOS implementation and removed needs-triage Issue still needs to be assigned, labeled and deduplicated labels Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Priority 3 issue (default for bugs or new feature requests; things we'd like to work on) platform: apple An issue with the macOS or iOS implementation project: connections An issue with the Connections project type: bug Something is broken or not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants