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

Crash in-editor #129

Open
HereafterMills opened this issue Aug 20, 2024 · 15 comments
Open

Crash in-editor #129

HereafterMills opened this issue Aug 20, 2024 · 15 comments

Comments

@HereafterMills
Copy link

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.

@WinterPu
Copy link
Contributor

Did you release the instance correctly?

@sane5ek
Copy link

sane5ek commented Oct 17, 2024

+1 same issue

@WinterPu
Copy link
Contributor

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

@HereafterMills
Copy link
Author

HereafterMills commented Dec 4, 2024

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)

@WinterPu
Copy link
Contributor

WinterPu commented Dec 4, 2024

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.

@HereafterMills
Copy link
Author

HereafterMills commented Dec 6, 2024

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?

@WinterPu
Copy link
Contributor

WinterPu commented Dec 7, 2024

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.

@HereafterMills
Copy link
Author

HereafterMills commented Dec 7, 2024

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

@WinterPu
Copy link
Contributor

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

@WinterPu
Copy link
Contributor

Also, for now, 4.5.0 has been released.

@HereafterMills
Copy link
Author

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

@WinterPu
Copy link
Contributor

thx for pointing it out, this got fixed.

@HereafterMills
Copy link
Author

HereafterMills commented Dec 12, 2024

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

@HereafterMills
Copy link
Author

image

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

@WinterPu
Copy link
Contributor

  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.

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

3 participants