Oculus Quest 2 and 3 apk crashing on start

Hello,
I spent a lot of time trying to figure out why Unreal Engine would build my VR project into an apk without giving any issues, until the project was opened on the Quest 2 or 3, and then it would just quit immediately.
I wasn’t able to get any useful logs, any specific reason or anything, until I recently discovered that FMOD was causing the apk to crash by accidentally disabling it.

With FMOD disabled, the compiled apk finally launched.

Does anyone know anything about this? Is it a memory issue, are there any guidelines or standard procedures to follow? What to do or not to do, etc?
If anyone can help with this issue it would be extremely helpful.

Thank you for your time and hope to hear back from someone soon.

Hi,

What version of the FMOD Integration are you using?

Our Android UE-specific documentation can be found here: Unreal Integration | Platform Specifics - Android.

If you still experience the issue please let me know.

Hope this helps

Hi Connor, thank you for the reply.
I am currently using version 2.02.2 and I just checked the Android documentation again.

I still have a couple of questions:

  • “To deploy on Android, make sure FMODStudio is in your game’s directory, not in the Engine plugins directory.”. I do have FMOD in my Content Folder, but in order to make it work, I also need the FMOD plugin to be in the plugins folder, or it wouldn’t work, right? This is what I mean:
    Screenshot 2024-04-15 081704
  • “you will need to write an APL file and drop it into the FMODStudio/Binaries/Android directory” does this mean I need to make a new file? I think this might be one of the issues.
  • When the document references the DSP plugin, is that only external not included in FMOD or does that apply also with the default version of FMOD. Example: “low pass” or “high pass” would those also apply?
  • " To package the Android banks add these lines to Platforms\Android\Config\AndroidGame.ini" I don’t seem to have any *.ini files anywhere in that folder.

If you could please answer any of these questions it would help a lot, thanks again for the links!

1 Like

If you need me to be more specific on anything please let me know, thank you

1 Like

Unfortunately, I was not able to reproduce the issue.

This isn’t very clear, I have made a note to improve the wording. What this means is the plugin files should be in your UE project Plugins directory e.g. E:\UEProjects\MyProject\Plugins rather than E:\UE Versions\UE_5.3\Engine\Plugins. You have the FMOD integration folders in the correct location.

You are not creating an Android Plugin you can disregard this section.

Create an AndroidGame.ini in the following path "E:\UEProjects\MyProject\Platforms\Android\Config\AndroidGame.ini"
With the following contents:

[/Script/UnrealEd.ProjectPackagingSettings]
-DirectoriesToAlwaysStageAsNonUFS=(Path="FMOD/Desktop")
+DirectoriesToAlwaysStageAsNonUFS=(Path="FMOD/Mobile")

I am surprised you can build to Android without this file as it should be reporting an error.

Can I get a screenshot of your Build preferences in FMOD Studio:

Are there any error logs that you can share?

Thanks again for your response, hopefully we can figure this out.

  • About the Plugins, that is already correct. They are in the Plugins folder of the project, not the one of the Unreal Engine directory.

  • Good to know about the APL FMOD plugins :ok_hand:

  • I tried to add the AndroidGame.ini in the game: I had to create a whole path to the folder because it wasn’t there. Unfortunately doing this causes to not even build anymore.

  • This is the screenshot of the settings so far (I also tried moving the build folder from Unreal Engine and FMOD at some point, but it didn’t make much of a difference):

  • Unfortunately, no logs - it only happens when you launch the game on the meta quest and the log is so verbose that I wasn’t able to find anything relevant to FMOD.

Thanks for the image.

Could I please get the logs when trying to build including the .ini file?

That is fine, could I get the whole log please?

I pasted the entire log. This time it didn’t build anymore (it builds when FMOD is inactive)
UE5_OutputLog_Apr19_2024.txt (342.7 KB)

In the logs I see:

[Restrictions]
If these files are intended to be distributed in packaged builds, move the source files out of a restricted folder, or remap them during staging using the following syntax in DefaultGame.ini:
[Staging]
+RemapDirectories=(From="Foo/NoRedist", To="Foo")
Alternatively, allow list them using this syntax in DefaultGame.ini:
[Staging]
+AllowedDirectories=MyGame/Content/Foo
(see C:\Users\Owner\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.3\Log.txt for full exception trace)

This means that you are missing the AndroindGame.ini, could I please see the file in your UE project directory?

I notice in your Studio preferences you are missing a build path.
image
Are your banks being built into your UE project?

Thanks for the logs, hope this helps

Hey Connor, once again thank you so much for helping out.
I currently do not see any AndroidGame.ini (or AndroindGame.ini) file anywhere. I have DefaultGame.ini, but I don’t know if that’s what you’re looking for. I will attach that one.

[/Script/EngineSettings.GeneralProjectSettings]
ProjectID=73E5D5F64138F1B4630A4C9549F085BE
bStartInVR=True
ProjectVersion=0.7.0.0
ProjectName=Path of Fury
CompanyName=TFL Studios
Homepage=www.menchiari.net
ProjectDisplayedTitle=NSLOCTEXT(“[/Script/EngineSettings]”, “8DAE616E4CD8C9FF7AF5F6A0218B19D8”, “Path of Fury”)
bAllowWindowResize=True
SupportContact=leonard.menchiari@gmail.com

[StartupActions]
bAddPacks=True
InsertPack=(PackSource=“StarterContent.upack”,PackName=“StarterContent”)

[/Script/UnrealEd.ProjectPackagingSettings]
Build=IfProjectHasCode
BuildConfiguration=PPBC_Development
BuildTarget=
FullRebuild=True
ForDistribution=False
IncludeDebugFiles=False
BlueprintNativizationMethod=Disabled
bIncludeNativizedAssetsInProjectGeneration=False
bExcludeMonolithicEngineHeadersInNativizedCode=False
UsePakFile=True
bUseIoStore=True
bUseZenStore=False
bMakeBinaryConfig=False
bGenerateChunks=False
bGenerateNoChunks=False
bChunkHardReferencesOnly=False
bForceOneChunkPerFile=False
MaxChunkSize=0
bBuildHttpChunkInstallData=False
HttpChunkInstallDataDirectory=(Path=“”)
WriteBackMetadataToAssetRegistry=Disabled
bCompressed=True
PackageCompressionFormat=Oodle
bForceUseProjectCompressionFormatIgnoreHardwareOverride=False
PackageAdditionalCompressionOptions=
PackageCompressionMethod=Kraken
PackageCompressionLevel_DebugDevelopment=4
PackageCompressionLevel_TestShipping=5
PackageCompressionLevel_Distribution=7
PackageCompressionMinBytesSaved=1024
PackageCompressionMinPercentSaved=5
bPackageCompressionEnableDDC=False
PackageCompressionMinSizeToConsiderDDC=0
HttpChunkInstallDataVersion=
IncludePrerequisites=True
IncludeAppLocalPrerequisites=False
bShareMaterialShaderCode=True
bDeterministicShaderCodeOrder=False
bSharedMaterialNativeLibraries=True
ApplocalPrerequisitesDirectory=(Path=“”)
IncludeCrashReporter=False
InternationalizationPreset=English
-CulturesToStage=en
+CulturesToStage=en
LocalizationTargetCatchAllChunkId=0
bCookAll=False
bCookMapsOnly=False
bSkipEditorContent=False
bSkipMovies=False
-IniKeyDenylist=KeyStorePassword
-IniKeyDenylist=KeyPassword
-IniKeyDenylist=rsa.privateexp
-IniKeyDenylist=rsa.modulus
-IniKeyDenylist=rsa.publicexp
-IniKeyDenylist=aes.key
-IniKeyDenylist=SigningPublicExponent
-IniKeyDenylist=SigningModulus
-IniKeyDenylist=SigningPrivateExponent
-IniKeyDenylist=EncryptionKey
-IniKeyDenylist=DevCenterUsername
-IniKeyDenylist=DevCenterPassword
-IniKeyDenylist=IOSTeamID
-IniKeyDenylist=SigningCertificate
-IniKeyDenylist=MobileProvision
-IniKeyDenylist=IniKeyDenylist
-IniKeyDenylist=IniSectionDenylist
+IniKeyDenylist=KeyStorePassword
+IniKeyDenylist=KeyPassword
+IniKeyDenylist=rsa.privateexp
+IniKeyDenylist=rsa.modulus
+IniKeyDenylist=rsa.publicexp
+IniKeyDenylist=aes.key
+IniKeyDenylist=SigningPublicExponent
+IniKeyDenylist=SigningModulus
+IniKeyDenylist=SigningPrivateExponent
+IniKeyDenylist=EncryptionKey
+IniKeyDenylist=DevCenterUsername
+IniKeyDenylist=DevCenterPassword
+IniKeyDenylist=IOSTeamID
+IniKeyDenylist=SigningCertificate
+IniKeyDenylist=MobileProvision
+IniKeyDenylist=IniKeyDenylist
+IniKeyDenylist=IniSectionDenylist
-IniSectionDenylist=HordeStorageServers
-IniSectionDenylist=StorageServers
+IniSectionDenylist=HordeStorageServers
+IniSectionDenylist=StorageServers
+DirectoriesToAlwaysCook=(Path=“/Game/FMOD/Banks”)
+DirectoriesToAlwaysCook=(Path=“/Game/FMOD/Buses”)
+DirectoriesToAlwaysCook=(Path=“/Game/FMOD/Events”)
+DirectoriesToAlwaysCook=(Path=“/Game/FMOD/Reverbs”)
+DirectoriesToAlwaysCook=(Path=“/Game/FMOD/Snapshots”)
+DirectoriesToAlwaysCook=(Path=“/Game/FMOD/VCAs”)
+DirectoriesToAlwaysStageAsNonUFS=(Path=“FMOD/Desktop”)

[FMOD]
BankOutputDirectory=./Content/FMOD/Banks

[Staging]
+AllowedDirectories=VR_WingChun/Content/FMOD/Banks/Desktop
+AllowedDirectories=VR_WingChun/Content/FMOD/WingChun/Build/Desktop

About the build path, I have changed it, but it automatically goes empty for some reason. In this case, after choosing the correct path based on the documentation you sent me, it shows

Built banks output directory (optional):
. .

As for now the path is set under Project/Content/FMOD

1 Like

Thank you for sharing that. Unfortunately, adding the files to the DefaultGame.ini will not let you build to Android with FMOD.

I have my AndroidGame.ini file here:
image

Please add the following to your .ini file:

You will have to create these folders yourself. Could I get a screenshot of the .ini in your project once it is made?

Thanks for confirming the build path.

Awesome, thanks again. Just to be clear, there are a lot of ini files in the project. Can you be more specific on which ones?

I created a folder because I didn’t have anything in Platforms, only “HoloLens”. So I made a folder “Android” then in that one a folder “Config” and in that one I created a text file called “AndroidGame.ini” and inside I pasted those values exactly.
So this should work?

It should, could you try packaging again and post the whole build log again? Thanks

Packaged again and still no luck. The project packages fine, but when I launch it on the Quest it crashes on start
UE5_OutputLog_Apr29_2024.txt (393.0 KB)

I was also able to create a Meta Quest Developer Hub log that starts just before I start the app and ends right after it automatically shuts down. This log is over the course of a few seconds of opening and closing the app on the Quest headset; the crash should be reported somewhere in here probably
QuestLogs_Apr29_2024.txt (18.6 KB)

I managed to successfully make a build with FMOD:

  • I created a new Virtual Reality project, and substituted everything in the content folder with the old project
  • added the ini file that you mentioned with the file in it and removed the HoloLens folder since I wasn’t using it
  • I packaged the project

And it worked. Thank you so much for your help! I’ll update you if anything else happens in the future.

1 Like

Thank you for sharing your solution. If you have any more issues please let me know!

1 Like