Agora-Unreal-RTC-SDK icon indicating copy to clipboard operation
Agora-Unreal-RTC-SDK copied to clipboard

Crash in-editor

Open HereafterApps opened this issue 1 year ago • 1 comments

Within the editor, everything works on the first play, but second play causes a crash. At times, even if i dont play a second time, maybe 10-15 seconds later, it crashes unreal. If i disable connecting to voice exclusively in pie, then all works fine (without voice).

Not that one would need voice in the editor, but it does help with the debugging.

My assumption is that this is related to the instance of the RTC engine that is created by the game instance on the first run, and then the creating of a new one without handling of the old one on the next play.

HereafterApps avatar Aug 20 '24 11:08 HereafterApps

Did you release the instance correctly?

WinterPu avatar Aug 21 '24 13:08 WinterPu

+1 same issue

sane5ek avatar Oct 17 '24 07:10 sane5ek

Did you use C++ or Blueprints? Which version of Unreal Engine did you use? Could you show me the call stack?

WinterPu avatar Oct 18 '24 03:10 WinterPu

Did you use C++ or Blueprints? Which version of Unreal Engine did you use? Could you show me the call stack?

I am certain that this crash is occuring because of the game instance storing the RTCEngine instance. I remember i had this issue before when i was parenting it to the player controller by mistake. Same sort of issue, but on a packaged build. RTCEngine does not like to be initialized more than once per start. So in the editor its being initialized many times (on each run)

HereafterApps avatar Dec 04 '24 09:12 HereafterApps

It seems you need to pay attention to RTCEngine instance management. The good news is that for versions greater than 4.2.1, there would be a new way to use the plugin: AgoraUERtcEngine::Get()->method(). You no longer need to manage the instance yourself.

WinterPu avatar Dec 04 '24 12:12 WinterPu

It seems you need to pay attention to RTCEngine instance management. The good news is that for versions greater than 4.2.1, there would be a new way to use the plugin: AgoraUERtcEngine::Get()->method(). You no longer need to manage the instance yourself.

It seems like a lot of the issues get fixed with the new version. So would you recommend 4.4 or 4.5? Also, is it stable with Windows/Mac/Android/iOS?

HereafterApps avatar Dec 06 '24 09:12 HereafterApps

I would recommend version 4.5.0. Additionally, starting from version 4.4.0, there have been changes in the way blueprints are used. Please be aware of this.

WinterPu avatar Dec 07 '24 01:12 WinterPu

Im getting this error while trying to build my project - Enum 'EAgoraBPuEventHandlerType' shares engine name 'EAgoraBPuEventHandlerType' with enum 'EAgoraBPuEventHandlerType' in D:\Projects\NewGora\Plugins\AgoraPlugin\Source\AgoraPlugin\Public\AgoraBlueprintPlugin\AgoraBPuBaseDataTypes.h(17) AgoraBPExample D:\Projects\NewGora\Plugins\AgoraPlugin\Source\AgoraPlugin\Public\AgoraBlueprintPlugin\AgoraBPuDataTypes.h 20

I first downloaded the 4.5 BP template, then put in the 4.4 VOICE SDK, and then overwrote that with the 4.5 SDK

HereafterApps avatar Dec 07 '24 07:12 HereafterApps

Maybe you need to clean the Intermediate folders and rebuild again.

WinterPu avatar Dec 10 '24 16:12 WinterPu

Also, for now, 4.5.0 has been released.

WinterPu avatar Dec 10 '24 16:12 WinterPu

Also, for now, 4.5.0 has been released.

Ah, ok. Just a heads up, the 4.5-release branch still lists the 4.4 sdk

HereafterApps avatar Dec 11 '24 08:12 HereafterApps

thx for pointing it out, this got fixed.

WinterPu avatar Dec 12 '24 01:12 WinterPu

Looks good @WinterPu

Question.

image

Is there any reason i cant simply bind events to RTCEngine>GetEventHandler that persist across levels, rather than creating an actor specific to it (the BP_Audio_CBExecutor). My code is all in the game instance, so the bindings should persist as well.

image

HereafterApps avatar Dec 12 '24 09:12 HereafterApps

image

Also, why are these all strings? Shouldnt they be floats?

HereafterApps avatar Dec 12 '24 18:12 HereafterApps

  1. If you still want to use the original binding, it should be supported, but I would not recommend it. (1) The binding only needs to be done once. (2) You can easily reuse your executor BP code with the new method. (3) You can easily override your function in your executor. Please give it a try.
  2. As for the type, the reason is that they are actually optional, but there is no double precision in BP.

WinterPu avatar Dec 13 '24 06:12 WinterPu