resonance-audio/resonance-audio-unreal-sdk

unreal crash when cheking toggle visualisation

artpixel opened this issue · 7 comments

Hi all

A bug :
Unreal crash when cheking toggle visualisation in the resonance audio spacialisation source settings when there are no windows whith sound asset visible.

No worries! :) Thanks for reporting the crash. We're looking into it, and will update this thread shortly with findings!

Hi @artpixel,

I was trying to reproduce the crash today but not really sure what exactly you mean when saying "... when there are no windows whith sound asset visible"?

Would you mind sharing steps that would help me reproduce this crash?

Many thanks!

hello @mgorzel, i do not remember exactly the full process and it's difficult for me to reproduce the exact one, but: I have a dual screen, one with the main scene, and another with the BP screens.
When there are no visual representation on the sound asset on both screen, i mean in the 3d windows, then when i check the visibility cross, it crash. I dont know if the crash is due to that particular situation, but that's perhaps a way.. I also modified some settings like overlaping and so on maybe it helps ?

Hey @artpixel,

So I've tried the following: I opened the 3D editor on my screen 1 and the blueprint editor on screen 2. Then, on the screen 2 I also added "Resonance Audio Spatialization Source Settings", so that I could toggle directivity visualization on/off. I toggled it on/off with no sound present in the screen 1 and it worked fine. Then, I also added an Ambient Sound and added my "Resonance Audio Spatialization Source Settings" to it. I toggled the visualization on/off and it again worked fine.

Would you mind attaching a log file next time it happens for you? You will most likely find it in the following dir (depending on your project directory and assuming you are working on Windows):

C:\Users<USER>\Documents\Unreal Projects<PROJECT NAME>\Saved\Logs

The most recent log should be the one with no "backup" in its name.

Again, many thanks for your help trying to pin that down!

Ok, thanks to @andrea9293 I was able to reproduce the problem. We will look into that and get back with an update soon!

Thanks again for reporting this issue!

Duplicate of #2

This will be fixed in the upcoming release. In the meantime, here is an explanation of the problem / workaround:

Displaying the directivity visualization only makes sense if the owning actor of the AudioComponent is present in the level. However, if it is not, Unreal's GetOwner() will return nullptr even if the AudioComponent is attached to a valid actor. The current workaround could be to add a check if AudioComponent->GetOwner() != nullptr in the UResonanceAudioSpatializationSourceSettings::PostEditChangeProperty() method.

Thanks again for your help! :)

This should be now fixed in v1.1.1.