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

Issue with iOS #115

Open
HereafterMills opened this issue Apr 29, 2024 · 8 comments
Open

Issue with iOS #115

HereafterMills opened this issue Apr 29, 2024 · 8 comments

Comments

@HereafterMills
Copy link

Hi,

So iv been trying to debug this the last few weeks. On iOS, connecting to voice and talking works great. BUT open any new map, even the menu map, 2-7 seconds later, the app crashes.

None of this happens if i never connect to voice.

Any hints as to what might be causing this?

@HereafterMills
Copy link
Author

HereafterMills commented May 1, 2024

Adding the logs folder in the agora settings to ProjectLogsDir>voice.log also doesnt save any file on ios. When i retrieve the container using xcode, it doesnt show me this logs file. I've tried a whole bunch of folder combinations to no avail. Any help with this would be nice, as it would help us identify the issue.

I think the issue is with leaving the voice channel.

@HereafterMills
Copy link
Author

@WinterPu some help please

@WinterPu
Copy link
Contributor

You could build an iOS app and select [Debug - Attach to the Process] to trace the logs. I suspect that you may be triggering a garbage collection or neglecting to perform certain operations on the game's main thread. However, I'm not sure. You could give it a try.

@HereafterMills
Copy link
Author

@WinterPu I had managed to fix this in another app, but getting the smae issue in a new app. THe issue previously was that i was setting the outer for the RTCEngine and EventHandler as the player controller - which of course is destroyed once we start a new map.

Now im setting the outer as the game instance, but crash still occurs.

@HereafterMills HereafterMills reopened this Nov 5, 2024
@HereafterMills
Copy link
Author

HereafterMills commented Dec 4, 2024

@WinterPu These are the last logs generated before the crash:

[2024.12.02-11.57.03:452][829]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_REQ: Transmit - Set Transmit Auto  
[2024.12.02-11.57.03:472][829]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_REQ: Transmit - Update Channel Media Options  
[2024.12.02-11.57.03:473][829]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Connection State | Connected - Mic Off
[2024.12.02-11.57.03:473][829]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Mic State Changed | State:  | PUB_STATE_PUBLISHING |  | Channel:  | �
[2024.12.02-11.57.03:528][834]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Connection State | Connected - Mic On
[2024.12.02-11.57.03:528][834]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Mic State Changed | State:  | PUB_STATE_PUBLISHED |  | Channel:  | �
[2024.12.02-11.57.04:356][884]LogAudioMixer: Warning: AudioMixerPlatformInterface Timeout [ 5 Seconds] waiting for h/w. InstanceID=1
[2024.12.02-11.57.04:534][894]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_REQ: Transmit - Set Transmit Auto  
[2024.12.02-11.57.04:535][894]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Connection State | Connected - Mic Off
[2024.12.02-11.57.04:535][894]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Mic State Changed | State:  | PUB_STATE_NO_PUBLISHED |  | Channel:  | フ
[2024.12.02-11.57.09:360][184]LogAudioMixer: Warning: AudioMixerPlatformInterface Timeout [ 5 Seconds] waiting for h/w. InstanceID=1
[2024.12.02-11.57.14:358][484]LogAudioMixer: Warning: AudioMixerPlatformInterface Timeout [ 5 Seconds] waiting for h/w. InstanceID=1
[2024.12.02-11.57.19:361][784]LogAudioMixer: Warning: AudioMixerPlatformInterface Timeout [ 5 Seconds] waiting for h/w. InstanceID=1

Like i said, this occurs on starting any new map (connecting to a channel the second time - whether its the same channel or a different one).

Heres another one from another session:

[2024.12.02-17.11.32:009][384]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_REQ: Getting Token For Agora  
[2024.12.02-17.11.32:010][384]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_REQ: Enable Volume Tracking  
[2024.12.02-17.11.32:011][384]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_REQ: Enable Spatial Sound  | true 
[2024.12.02-17.11.32:189][395]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Response From Agora Token | 006d82c59c6d9b04dac970531919d2a72cfIABxuPlqCNQwSg+NS9HCJdaH3rcbf2NGqmzFU5noPLtW77ehzxP3pB9mIgA1qSEFxDtPZwQAAQBc/01nAgBc/01nAwBc/01nBABc/01n
[2024.12.02-17.11.32:200][395]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_REQ: Join Channel  
[2024.12.02-17.11.32:201][395]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Local User Registered | 1000000616
[2024.12.02-17.11.32:201][395]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Connection State | Connecting
[2024.12.02-17.11.32:201][395]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Connection State Changed | CONNECTION_STATE_CONNECTING |   | Reason: | CONNECTION_CHANGED_CONNECTING
[2024.12.02-17.11.32:284][399]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: User Joined Success | NSError"8@"NSDictionary"16@"NSDictionary"24 |   | 1000000616 |   | raahil
[2024.12.02-17.11.32:284][399]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Connection State | Connected - Mic Off
[2024.12.02-17.11.32:284][399]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Connection State Changed | CONNECTION_STATE_CONNECTED |   | Reason: | CONNECTION_CHANGED_JOIN_SUCCESS
[2024.12.02-17.11.32:284][399]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Connection State | Connected - Mic Off
[2024.12.02-17.11.32:284][399]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Mic State Changed | State:  | PUB_STATE_NO_PUBLISHED |  | Channel:  | �
[2024.12.02-17.11.32:393][407]LogAudioMixer: Warning: AudioMixerPlatformInterface Timeout [ 5 Seconds] waiting for h/w. InstanceID=1
[2024.12.02-17.11.33:510][474]LogBlueprintUserMessages: [MenuInterface_C_2147479824] Change Input Mode Ran
[2024.12.02-17.11.36:461][651]LogBlueprintUserMessages: [MenuInterface_C_2147479824] Change Input Mode Ran
[2024.12.02-17.11.36:461][651]LogViewport: Display: Viewport MouseCaptureMode Changed, CaptureDuringMouseDown -> NoCapture
[2024.12.02-17.11.37:395][708]LogAudioMixer: Warning: AudioMixerPlatformInterface Timeout [ 5 Seconds] waiting for h/w. InstanceID=1
[2024.12.02-17.11.37:660][723]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_REQ: Transmit - Set Transmit Auto  
[2024.12.02-17.11.37:706][723]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_REQ: Transmit - Update Channel Media Options  
[2024.12.02-17.11.37:707][723]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Connection State | Connected - Mic Off
[2024.12.02-17.11.37:707][723]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Mic State Changed | State:  | PUB_STATE_PUBLISHING |  | Channel:  | リ
[2024.12.02-17.11.37:774][728]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Connection State | Connected - Mic On
[2024.12.02-17.11.37:774][728]LogBlueprintUserMessages: [HereafterGameInstance_C_2147482567] ALOG_Success_RESP: Mic State Changed | State:  | PUB_STATE_PUBLISHED |  | Channel:  | メ
[2024.12.02-17.11.42:397][  7]LogAudioMixer: Warning: AudioMixerPlatformInterface Timeout [ 5 Seconds] waiting for h/w. InstanceID=1
[2024.12.02-17.11.46:613][259]LogBlueprintUserMessages: [MenuInterface_C_2147479824] Change Input Mode Ran
[2024.12.02-17.11.46:613][259]LogViewport: Display: Viewport MouseCaptureMode Changed, NoCapture -> CaptureDuringMouseDown
[2024.12.02-17.11.47:063][286]LogBlueprintUserMessages: [MenuInterface_C_2147479824] Change Input Mode Ran
[2024.12.02-17.11.47:064][286]LogViewport: Display: Viewport MouseCaptureMode Changed, CaptureDuringMouseDown -> NoCapture
[2024.12.02-17.11.47:398][307]LogAudioMixer: Warning: AudioMixerPlatformInterface Timeout [ 5 Seconds] waiting for h/w. InstanceID=1

I suspect the AudioMixerPlatformInterface Timeout [ 5 Seconds] waiting for h/w. InstanceID=1 is what is causing the crash, but it always happens within 15 seconds and the timeout is 5 seconds, with the warning coming in 3 times. At times, it happens before 15 seconds as well

In the first map, the voice works fine btw.

AdditionalPlistData=<key>NSCameraUsageDescription</key><string>Enable video conferencing with other users</string><key>NSMicrophoneUsageDescription</key><string>To talk to other users</string><key>NSPhotoLibraryUsageDescription</key><string>Required for Saving Files</string><key>NSPhotoLibraryAddUsageDescription</key><string>Required for Saving Files</string>

@WinterPu
Copy link
Contributor

WinterPu commented Dec 4, 2024

You could try sth like this: AgoraUERtcEngine::Get()->setAudioScenario(agora::rtc::AUDIO_SCENARIO_TYPE::AUDIO_SCENARIO_GAME_STREAMING);

Or wait for the 4.5.0 https://github.com/AgoraIO-Extensions/Agora-Unreal-RTC-SDK/tree/release/4.5.0

@HereafterMills
Copy link
Author

HereafterMills commented Dec 5, 2024

You could try sth like this: AgoraUERtcEngine::Get()->setAudioScenario(agora::rtc::AUDIO_SCENARIO_TYPE::AUDIO_SCENARIO_GAME_STREAMING);

Or wait for the 4.5.0 https://github.com/AgoraIO-Extensions/Agora-Unreal-RTC-SDK/tree/release/4.5.0

Like this?
image

Also, should i just Use 4.5.0 now?

@WinterPu
Copy link
Contributor

WinterPu commented Dec 7, 2024

Yeah, we are still testing it. It is coming soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants