microsoft / ProjectAcoustics

Microsoft Project Acoustics
https://aka.ms/acoustics
Creative Commons Attribution 4.0 International
141 stars 22 forks source link

Unreal 5.1 Crashes between level loads #161

Closed JoshCaudill closed 1 year ago

JoshCaudill commented 1 year ago

Hello!

I'm currently working on a project using Project Acoustics in Unreal 5.1.1, and whenever anybody on the team tries to transitions between our levels during runtime, the engine crashes with the following log:

LoginId:978cf0c1427cf75c9fbde1b791d8ef90 EpicAccountId:ad2958ef8ceb4dc3a17c6a5a05ce3243

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000247842

UnrealEditor_Engine UnrealEditor_ProjectAcousticsNative!FAcousticsAudioPluginListener::OnListenerUpdated() [E:\Repos\ThesisProject\TPP\Plugins\ProjectAcousticsNative\ProjectAcousticsNative\Source\ProjectAcousticsNative\Private\AcousticsAudioPluginListener.cpp:119] UnrealEditor_Engine UnrealEditor_Engine UnrealEditor_Engine UnrealEditor_Engine UnrealEditor_Engine UnrealEditor_Engine UnrealEditor_UnrealEd UnrealEditor_UnrealEd UnrealEditor UnrealEditor UnrealEditor UnrealEditor UnrealEditor UnrealEditor kernel32 ntdll

Some of our machines mention the "SetActorLocation" function on crashes, while others do not, but the log always mentions Project Acoustics, and it always lists the \AcousticsAudioPluginListener.cpp:119.

Any help would be fantastic, and I'm more than willing to give any more information that would help.

KyleStorck commented 1 year ago

This is the same issue as this one https://github.com/microsoft/ProjectAcoustics/issues/147. I provided a code fix. No ETA on when we'll update the marketplace plugin with the fix. Also see this issue for how to apply the code fix https://github.com/microsoft/ProjectAcoustics/issues/152.

haisting commented 1 year ago

Hey Kyle, did the fix and it stopped the crashing but now we're having issues with doing bakes. When I'm on the Probes tab to prep the bake, once I hit calculate we get his crash. I removed project acoustics from the Plugins\Marketplace folder and rebuilt our project in visual studio. Any advice?

**Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff

Triton_Preprocessor vcomp140 vcomp140 vcomp140 vcomp140 kernel32 ntdll**

Additionally, I see there is a "Package" button in the plugins now when looking at Project Acoustics for Unreal Audio. Does this need to point to the AcousticData folder where the Triton processor is or the ProjectAcousticsNative folder? image

KyleStorck commented 1 year ago

Not sure about the packaging, but that does remind me. You should double check your Acoustics Data Folder points to the right spot. When you migrated your plugin, you might be using the old Acoustics Data Folder path which points to a directory that no longer exists. image

haisting commented 1 year ago

Hey Kyle!

It looks like it's pointing in the right location. It's looking for the Triton.LocalProcessor.exe right?

In my project's directory, I have it: [project]/Plugins/ProjectAcoustics/AcousticData

haisting commented 1 year ago

Also, when rebuilding should I be doing a full rebuild of Engine + Project in visual studio or just the project?

KyleStorck commented 1 year ago

Do you see your prebake files there (_config.xml and .VOX) in that folder? You may need to redo your prebake (Probes calculation) after you migrated your plugin.

haisting commented 1 year ago

I see them! They are mainly test levels and we were about to start to bake all our levels, so I could delete these as they aren't as important (if needed).

That's also where I'm getting the crash. Whenever I go to the probe calculation tab and kick off a calculation I get the error above.

haisting commented 1 year ago

Additionally, I tried removing everything and installing the downloadable version of the plugin. I kept getting the python error saying it had python dependencies in the probes tab. I attempted the fixes in CMD and ensured that I had all the correct packages from VS Installer and couldn't get that to work either. I'm a bit stump currently.

haisting commented 1 year ago

Just as a recap, I was having crashes with level loading so I referenced #147 and #152 to fix that issue and it did fix the crashing.

Now, I'm having issues trying to generate new bakes.

I go here: image

and then when I hit calculate this is what I get: image

I tried the method of moving everything over to plugins/ProjectAcousticsNative in my project directory, then uninstalling the version in the Plugins/Marketplace/ProjectAcousticsNative in the Engine directory and rebuilding and that still produced the crash.

I reverted back, and then tried compiling and modifying the plugin from the engine directory and that gave the same results.

Whenever I have the Marketplace plugin installed directly with no modifications, it works fine but my level loading breaks. When I add the code to the .cpp and .h files, that fixes the level loading crashes but now gives me this error, not allowing me to prep acoustics.

KyleStorck commented 1 year ago

Are you able to debug the project through Visual Studio? That would give us more information about the error.

Otherwise, we don't have an official fix out for the level change bug. The code I shared is an unofficial workaround and that makes it harder to debug.

haisting commented 1 year ago

I'm not sure, I don't spend a tremendous amount of time working in visual studio. I'd love to connect with you and show you what is going on. Project Acoustics is currently a primary factor in my thesis and would love to find a fix for this asap. If there is going to be a released patch, is there a general frame of time for that? I have to have my entire game finished by the end of April.

KyleStorck commented 1 year ago

No ETA on when the fix will be released. We'll get back to you if there's an update.

I think something went wrong when you were converting the plugin from a marketplace engine plugin to a project plugin. That's a messy process and a few different things could have gone wrong. My recommendation is to start completely fresh.

haisting commented 1 year ago

Thank you for being so helpful Kyle. I'm working through it right now. I did get this issue with python on the manual install. image

When installing the plugin this way, what is the proper way to do it? Do I open the project's .sln and rebuild (or build?) the project? Or do I build both the project and the engine?

KyleStorck commented 1 year ago

What are the messages in the Output Log?

haisting commented 1 year ago

image

haisting commented 1 year ago

Ohhh this was the bug you were talking about, going through that solution now.

KyleStorck commented 1 year ago

Yes, remove Mark of the Web from all the files in Plugins\ProjectAcousticsNative\Source\ThirdParty\Win64\Release

haisting commented 1 year ago

I got them all unblock and restarted the engine and the tab loaded! But when I tried to calculate it gave me the same error. (To confirm I haven't done the other fix for levels yet, only manual install and unblocking .dll files)

image

KyleStorck commented 1 year ago

Well, we know it's not the fix nor is it not the plugin conversion process. But now I'm stumped. I'll think more on it next week.

haisting commented 1 year ago

Hey Kyle! I just wanted to touch base and see if there are any updates on this issue.

KyleStorck commented 1 year ago

No, still not sure what could be wrong with your setup. Weird that it works fine when you use the Marketplace plugin. Some thoughts

image image

KyleStorck commented 1 year ago

A fix for the level change crash has been pushed to the marketplace. It can be found in version 4 (2022.1.410) of the Project Acoustics plugin.