Problem with PS4 version integration

Hello!

I’m trying to add PS4 FMOD library in a game right now (Unity v.2018.4.5f1, tried FMOD version 1.10.04, but now switched to newer 1.10.15). On test-console game crashes right now launch.

Symbol name corresponding to the NID (mentioned in the end of crash log) is “_ZN4FMOD10getGlobalsEPPNS_6GlobalE”. Any idea how to fix that?

Full crash log:
00:04:18 #
00:04:18 # A user thread receives a fatal signal
00:04:18 #
00:04:18 # exception: 0xa0020101 (PRX_NOT_RESOLVED_FUNCTION)
00:04:18 # thread ID: 100912
00:04:18 # thread name: eboot.bin
00:04:18 # proc ID: 62
00:04:18 # proc name: eboot.bin
00:04:18 # proxied exception (Check generated coredump)
00:04:18 #
00:04:18 # registers:
00:04:18 # rax: 0000000000000000 rbx: 0000000000011015
00:04:18 # rcx: 00000000f36bfbc0 rdx: 0000000000000000
00:04:18 # rsi: 0000000000011015 rdi: 00000000f3bc4490
00:04:18 # rbp: 00000007effd1ab0 rsp: 00000007effd1ab0
00:04:18 # r8 : 0000000000000000 r9 : 0000000000000000
00:04:18 # r10: 0000000000000000 r11: 0000000000000246
00:04:18 # r12: 000000083c3b9410 r13: 000000083c3b9410
00:04:18 # r14: 00000000f3bc4490 r15: 00000002056ba970
00:04:18 # rip: 000000083bfdfa54 eflags: 00010206
00:04:18 # BrF: 00000000f35c4bb8 BrT: 000000083bfdfa50
00:04:18 #
00:04:18 # backtrace:
00:04:18 # 00000000f36c4827
00:04:18 # 00000001789a6cdd
00:04:18 # 0000000177ffd92c
00:04:18 # 0000000177f4ce3c
00:04:18 # 0000000178e931e6
00:04:18 # 00000000523d911c
00:04:18 # 00000000523e8f80
00:04:18 # 00000000523e94e2
00:04:18 # 00000000523e8deb
00:04:18 # 0000000052425d04
00:04:18 # 0000000052425a36
00:04:18 # 000000005206a794
00:04:18 # 0000000052069de6
00:04:18 # 000000005206a223
00:04:18 # 00000000520696ed
00:04:18 # 000000005206b5df
00:04:18 # 000000005206bd9a
00:04:18 # 00000000520a1cd0
00:04:18 # 000000005202e163
00:04:18 # 000000005202e3bf
00:04:18 [SceCdlgApp] I/PSM.UI : UISystem timer started!! 00:00:00.0000457
00:04:18 [SceCdlgApp] I/PSM.UI : UI RenderingSettings Resolution: Pixels2K[1920,1080]
00:04:18 [SceCdlgApp] I/PSM.UI : OnAccessibilitySettingsChanged
00:04:18 [SceCdlgApp] I/PSM.UI : TimerLog: diff [110.90]msec / process time [1597]msec / GC[0] : [UIInitialize] UISystem.InitializeTopMost
00:04:18 [VPA] PAllocatorInitialize system(addr=132ca00000, size=4194304) video=(addr=1387200000, size=41943040)
00:04:18 [PGraphics] Create PGraphicsDevice v[1387200000 - 1389a00000] s[132ca00000 - 132ce00000]
00:04:18 [PGraphics] Allocated compositor index 0
00:04:18 Initialized PGraphicsDevice 88207ea40
00:04:18 [SceCdlgApp] I/PSM.UI : TimerLog: diff [123.73]msec / process time [1749]msec / GC[0] : => [UIInitialize] UISystem.InitializeGraphics:
00:04:18 # 0000000052e16e4b
00:04:18 # 0000000052e1a00d
00:04:18 # 0000000052e9953f
00:04:18 # 0000000000000000
00:04:18 #
00:04:18 # dynamic libraries:
00:04:18 # /app0/eboot.bin
00:04:18 # text: 0000000051600000:0000000053cf4000 r-x
00:04:18 # data: 0000000054000000:00000000541dc000 rw-
00:04:18 # fingerprint: 8bff22d240fe898b2b3ae7549043c8ed00000000
00:04:18 # /yTbzUln9j8/common/lib/libkernel.sprx
00:04:18 # text: 000000083bfb0000:000000083c004000 r-x
00:04:18 # data: 000000083c3b0000:000000083c3e8000 rw-
00:04:18 # fingerprint: c3ec46402804e1a7d8363146e8d2334a00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceLibcInternal.sprx
00:04:18 # text: 000000080ae88000:000000080afb4000 r-x
00:04:18 # data: 000000080b288000:000000080b29c000 rw-
00:04:18 # fingerprint: 1d1be0eadcdc0ebdb317624af4cb30ef00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceSysmodule.sprx
00:04:18 # text: 000000083c3e8000:000000083c3f4000 r-x
00:04:18 # data: 000000083c7e8000:000000083c7f4000 rw-
00:04:18 # fingerprint: 0a3c2e9b3b4f98676ead90cd58c12e0d00000000
00:04:18 # /app0/sce_module/libSceFios2.prx
00:04:18 # text: 0000000109678000:00000001096d8000 r-x
00:04:18 # data: 0000000109a78000:0000000109ba4000 rw-
00:04:18 # fingerprint: c836411a940457cf3e11f64a91b7da1300000000
00:04:18 # /app0/sce_module/libc.prx
00:04:18 # text: 00000001b09a0000:00000001b0ab4000 r-x
00:04:18 # data: 00000001b0da0000:00000001b0da8000 rw-
00:04:18 # fingerprint: 83292d2512f5f3292d8836a5a3f20e9200000000
00:04:18 # /yTbzUln9j8/common/lib/libSceNet.sprx
00:04:18 # text: 000000081e8dc000:000000081e914000 r-x
00:04:18 # data: 000000081ecdc000:000000081edf0000 rw-
00:04:18 # fingerprint: 23c8ea06794a89cf8a8ce40bc5a5ac0200000000
00:04:18 # /yTbzUln9j8/common/lib/libSceIpmi.sprx
00:04:18 # text: 000000082bd58000:000000082bd64000 r-x
00:04:18 # data: 000000082c158000:000000082c16c000 rw-
00:04:18 # fingerprint: 0aa840c6f0803f8a2bf16cac02e85a5f00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceMbus.sprx
00:04:18 # text: 000000082c860000:000000082c86c000 r-x
00:04:18 # data: 000000082cc60000:000000082cc64000 rw-
00:04:18 # fingerprint: 6586a9534df6497c1b15b791ba4e6aee00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceRegMgr.sprx
00:04:18 # text: 000000082c16c000:000000082c170000 r-x
00:04:18 # data: 000000082c56c000:000000082c570000 rw-
00:04:18 # fingerprint: 4e6aeeb5e0143726e2166df8ff0bcdcf00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceRtc.sprx
00:04:18 # text: 00000008251e4000:00000008251ec000 r-x
00:04:18 # data: 00000008255e4000:00000008255e8000 rw-
00:04:18 # fingerprint: 3ca14e7be038c8def83b91e0689bd0cd00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceRazorCpu.sprx
00:04:18 # text: 0000000822e08000:0000000822e14000 r-x
00:04:18 # data: 0000000823208000:000000082320c000 rw-
00:04:18 # fingerprint: c65f02379f0609a07de39f2884787ac600000000
00:04:18 # /yTbzUln9j8/common/lib/libSceAvSetting.sprx
00:04:18 # text: 000000081518c000:0000000815198000 r-x
00:04:18 # data: 000000081558c000:0000000815590000 rw-
00:04:18 # fingerprint: 02e3400bb069c839125340a0fcfe7af400000000
00:04:18 # /yTbzUln9j8/common/lib/libSceVideoOut.sprx
00:04:18 # text: 000000083c7f4000:000000083c80c000 r-x
00:04:18 # data: 000000083cbf4000:000000083cbf8000 rw-
00:04:18 # fingerprint: b7e2d61377ef65dfca47bb0e52ca4e8600000000
00:04:18 # /yTbzUln9j8/common/lib/libSceGnmDriverForNeoMode.sprx
00:04:18 # text: 000000083910c000:0000000839118000 r-x
00:04:18 # data: 000000083950c000:0000000839510000 rw-
00:04:18 # fingerprint: f60c5911cd8c31b1dd95c8efd8dad81e00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceAudioOut.sprx
00:04:18 # text: 00000008112d0000:00000008112e8000 r-x
00:04:18 # data: 00000008116d0000:00000008116d4000 rw-
00:04:18 # fingerprint: 7c8d96248f3983a5c3c5236beb89ae3d00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceAudioIn.sprx
00:04:18 # text: 00000008116d4000:00000008116dc000 r-x
00:04:18 # data: 0000000811ad4000:0000000811ad8000 rw-
00:04:18 # fingerprint: d073991d127b8debb0bcf0177beec3a500000000
00:04:18 # /yTbzUln9j8/common/lib/libSceAjm.sprx
00:04:18 # text: 000000082279c000:00000008227a0000 r-x
00:04:18 # data: 0000000822b9c000:0000000822ba0000 rw-
00:04:18 # fingerprint: d65d832522ad6007a72b51a9de33e7d500000000
00:04:18 # /yTbzUln9j8/common/lib/libScePad.sprx
00:04:18 # text: 0000000833e84000:0000000833e90000 r-x
00:04:18 # data: 0000000834284000:000000083428c000 rw-
00:04:18 # fingerprint: 4041a869d2f0fd9f3f18884d41ca348e00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceCamera.sprx
00:04:18 # text: 0000000825604000:0000000825618000 r-x
00:04:18 # data: 0000000825a04000:0000000825a08000 rw-
00:04:18 # fingerprint: a20645ed6691e34b80fa49c9751bdd4e00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceDbgAssist.sprx
00:04:18 # text: 000000082b438000:000000082b43c000 r-x
00:04:18 # data: 000000082b838000:000000082b83c000 rw-
00:04:18 # fingerprint: 4678a66022c85762276dff28fc7838b100000000
00:04:18 # /yTbzUln9j8/common/lib/libSceNetCtl.sprx
00:04:18 # text: 000000082fb8c000:000000082fb94000 r-x
00:04:18 # data: 000000082ff8c000:000000082ff90000 rw-
00:04:18 # fingerprint: 570222e4b0677ee541296f13e784233400000000
00:04:18 # /yTbzUln9j8/common/lib/libSceHttp.sprx
00:04:18 # text: 0000000836380000:00000008363b4000 r-x
00:04:18 # data: 0000000836780000:0000000836788000 rw-
00:04:18 # fingerprint: 93e13781dfe7c18c9c1aee5dcc76797d00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceSsl2.sprx
00:04:18 # text: 0000000803540000:000000080366c000 r-x
00:04:18 # data: 0000000803940000:0000000803948000 rw-
00:04:18 # fingerprint: 6f440bb70e053b5edb37f4db70911b4f00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceNpCommon.sprx
00:04:18 # text: 0000000803ca4000:0000000803cec000 r-x
00:04:18 # data: 00000008040a4000:00000008040a8000 rw-
00:04:18 # fingerprint: 7a2794b3b71480cd5d644416c999bea700000000
00:04:18 # /yTbzUln9j8/common/lib/libSceNpManager.sprx
00:04:18 # text: 0000000816480000:00000008164c8000 r-x
00:04:18 # data: 0000000816880000:0000000816884000 rw-
00:04:18 # fingerprint: 2a8f27b65c8074b7f497fab486a0fc8d00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceNpWebApi.sprx
00:04:18 # text: 0000000808c70000:0000000808c88000 r-x
00:04:18 # data: 0000000809070000:0000000809074000 rw-
00:04:18 # fingerprint: 5f6405eba097d5d62ba1c1af53e3339900000000
00:04:18 # /yTbzUln9j8/common/lib/libSceSaveData.sprx
00:04:18 # text: 0000000817180000:00000008171cc000 r-x
00:04:18 # data: 0000000817580000:0000000817584000 rw-
00:04:18 # fingerprint: 31a146ecaac5c403802fde5c5d15fa3f00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceSystemService.sprx
00:04:18 # text: 0000000819600000:0000000819640000 r-x
00:04:18 # data: 0000000819a00000:0000000819a0c000 rw-
00:04:18 # fingerprint: 04c1f7c922978d8d0be78e4a79811bcd00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceUserService.sprx
00:04:18 # text: 0000000815590000:00000008155a0000 r-x
00:04:18 # data: 0000000815990000:0000000815994000 rw-
00:04:18 # fingerprint: 89e43f7707751be35b17b94f036f557a00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceCommonDialog.sprx
00:04:18 # text: 000000081dd50000:000000081dd54000 r-x
00:04:18 # data: 000000081e150000:000000081e154000 rw-
00:04:18 # fingerprint: 7f3bde047989fbc7e9568d9a2c16badc00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceSysUtil.sprx
00:04:18 # text: 0000000826fbc000:0000000826fc0000 r-x
00:04:18 # data: 00000008273bc000:00000008273c0000 rw-
00:04:18 # fingerprint: 22e4c9853b0e268de399932d1811083f00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceDiscMap.sprx
00:04:18 # text: 0000000812618000:000000081261c000 r-x
00:04:18 # data: 0000000812a18000:0000000812a1c000 rw-
00:04:18 # fingerprint: 36481b33425957dbcffa3a436efaca1b00000000
00:04:18 # /app0/Media/Modules/PS4Util.prx
00:04:18 # text: 00000001a71ec000:00000001a71f0000 r-x
00:04:18 # data: 00000001a75ec000:00000001a75f0000 rw-
00:04:18 # fingerprint: 88fdd64a621f0762d1f218b1ea8a24d400000000
00:04:18 # /app0/Media/Modules/Il2CppUserAssemblies.prx
00:04:18 # text: 0000000177f14000:000000017939c000 r-x
00:04:18 # data: 0000000179714000:0000000179a0c000 rw-
00:04:18 # fingerprint: 468d0c0dbe7087d325c711df0086641a00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceAppContent.sprx
00:04:18 # text: 000000081e154000:000000081e15c000 r-x
00:04:18 # data: 000000081e554000:000000081e55c000 rw-
00:04:18 # fingerprint: 199cad94bc28adfe4ff37538e038d3b800000000
00:04:18 # /yTbzUln9j8/common/lib/libSceIme.sprx
00:04:18 # text: 000000083f434000:000000083f46c000 r-x
00:04:18 # data: 000000083f834000:000000083f838000 rw-
00:04:18 # fingerprint: 18fc239df21f6d94875f2560b1474a1300000000
00:04:18 # /yTbzUln9j8/common/lib/libSceMove.sprx
00:04:18 # text: 0000000809074000:000000080907c000 r-x
00:04:18 # data: 0000000809474000:000000080947c000 rw-
00:04:18 # fingerprint: 614b426cece4fcfc6364922198f4c46b00000000
00:04:18 # /yTbzUln9j8/common/lib/libSceMouse.sprx
00:04:18 # text: 000000080b29c000:000000080b2a0000 r-x
00:04:18 # data: 000000080b69c000:000000080b6a0000 rw-
00:04:18 # fingerprint: 7baa81f4faa84a455d8f1b9fded69d3200000000
00:04:18 # /app0/Media/Plugins/libfmodstudioL.prx
00:04:18 # text: 00000000f35c4000:00000000f3820000 r-x
00:04:18 # data: 00000000f3bc4000:00000000f3bc8000 rw-
00:04:18 # fingerprint: c1aeb873dab5363ff235c92831c3bad300000000
00:04:18 #
00:04:18 # === Call to unpatched function is detected!!! ===
00:04:18 # Module Path : /app0/Media/Plugins/libfmodstudioL.prx
00:04:18 # Caller Address : 0x00000000f35c4bb8
00:04:18 # Required Module Name : libfmodL
00:04:18 # Required Library Name : libfmodL
00:04:18 # Required Function NID : 0xFB6B108AE953E2F1
00:04:18 !!! You can find the symbol name corresponding to the NID by scanning the result of following command
00:04:18 !!! > orbis-bin.exe -ds .scenid

It looks like the native plugin library for FMOD hasn’t been included in your Unity project properly. Make sure libfmodL.prx and libfmodL_stub.a are present in your Plugins directory and the import settings are set up to include them in PS4 builds, like so:

libfmodL

The same goes for libfmod.prx and libfmod_stub.a if you want to create non-debug builds.

Hello!

Thank you for response! I could confirm that all of them together with libfmodstudio, libfmodstudio_stub, ibfmodstudioL, ibfmodstudioL_stub and resonanceaudio are present in Plugins/PS4 folder and got a mark near “PS4” in settings, so I’m pretty sure they should be included in console Unity builds. Seems like problem is somewhere else :frowning:

Small update - I found that game crashes right on this line in code:
FMOD.Studio.System.create(out fmodStudio);

Do you know what FMOD.RESULT is returned from FMOD.Studio.System.create()?

I tried

try {
FMOD.Studio.System.create(out fmodStudio);
} catch {

}

with some debug output, but game crashes immediately so I don’t see anything in debug console :frowning: Is there some other way to try get FMOD.RESULT in this case? Thank you!

Short update - same version of FMOD works fine on Switch and more or less fine on Xbox One (there’s some problems for that moment, but they are definitely past “FMOD.Studio.System.create” stage.

I haven’t been able to reproduce the issue here at all.

You could try to reimport the FMOD integration packages (both the base and for PS4).

What PS4 SDK are you using?
Can you test this in a new/empty project?

Using PS4 SDK v6.5

I have tried to create empty project, imported base FMOD package, then PS4 FMOD package. Added Init script for testing and test build crashing on PS4 right from the launch again :frowning: I have sent a link for my repro-project to you in Personal Message. Hope you can try to look on it. Thank you!

The issue is that libfmodL has not been loaded. PS4 does not automatically load libraries for you, normally you would have to load them manually but in Unity you can just call a function in the lib and Unity will load it for you.

The integrations RuntimeManager calls RuntimeUtils.EnforceLibraryOrder() which then calls:

public static void EnforceLibraryOrder()
{
...
    // Call a function in fmod.dll to make sure it's loaded before fmodstudio.dll
    int temp1, temp2;
    FMOD.Memory.GetStats(out temp1, out temp2);

    Guid temp3;
    FMOD.Studio.Util.parseID("", out temp3);
}

By adding something similar to your code, it will load libfmodL and work as expected.

Thank you for help!!! That was the source of the problem :slight_smile: I have added
FMODUnity.RuntimeUtils.EnforceLibraryOrder();
call right before
FMOD.Studio.System.create(out fmodStudio);
and now everything working same way as in PC version.

1 Like