Skip to content

Final Fantasy Resonance iOS crash after options screen #25

Closed

Description

@stoneshawn88

Trying this on an M1 ipad pro with 16GB Ram
I have added RAM limit using GetMoreRam
The app starts and loads the option screen fine, once press play the app crashes.
Used the same nsp to build a mac app and it runs fine

Activity

  1. LNPANDY commented on Oct 26, 2026

    @LNPANDY
    Owner

    "Mac runs it, the iPhone crashes right after Play" narrows this a lot, and there is one likely cause worth checking before anything else — plus two things I need from you.

    The most likely cause: the memory entitlement did not survive signing

    This game's profile reserves 5 GB of guest address space (mem_reserve 0x140000000, 4.375 GB of it an alias region — dm/games/0100606026F12000/game.tsv). On iOS that only fits if the app carries com.apple.developer.kernel.increased-memory-limit.

    The build script embeds exactly that entitlement (dm/ios/tools/build_ipa.sh:122), and it verifies it is in the placeholder signature (:159). But the sideloader re-signs the app with your certificate, and the entitlement only survives if the signing tool carries it over. AltStore/SideStore and 爱思助手 commonly drop entitlements they were not told to keep. A dropped entitlement does not fail the install — it fails at the moment the game asks for the memory, which is exactly "the options screen loads, then Play crashes" (the options screen allocates almost nothing; the game's memory setup happens when it starts).

    How to confirm it in 30 seconds — on the iPhone, in the app's Documents/log.txt, look for the boot lines and then what precedes the crash. If the last lines are the memory setup / SetHeapSize / the guest's nninitStartup, it is this. (If instead you see a [RED] line naming a shader or a service, that is a different bug and I need that line.)

    What to do about it: re-sign with a tool that preserves entitlements. ldid -S<entitlements.plist> Payload/DmIOS.app/DmIOS or Sideloadly's "custom entitlements" option both work; AltStore does not expose it. This is a real limitation of sideloading, not something the app can work around — an entitlement Apple grants per-signature cannot be added by the IPA itself.

    If it is not that, I need two things

    1. Documents/log.txt from the device after a crash (Files app → DmIOS → log.txt). The host writes everything there; the last 20 lines name the failure.
    2. Which build: the fork's v0.4.7 or an older one, and whether you built with the app or the script. Also the game version — the profile covers 1.0.1 (v65536); a different update will not match the profile's build IDs and can fail in ways that look like a crash.

    Worth knowing

    • GetMoreRam is not part of this project — I could not find it in the repository. If it is a third-party tool that patches the binary or the entitlements, it is a plausible source of the problem on its own (it may replace the signature, dropping the entitlement above).
    • The Mac app has no memory entitlement to lose: macOS gives a process address space freely, so a 5 GB guest layout works there without any signing consideration. That asymmetry is exactly why "works on the Mac" is consistent with this diagnosis rather than contradicting it.

    Please send the log — with it I can tell you in one round whether it is the entitlement, the profile version, or something in the host.

  2. stoneshawn88 commented on Oct 26, 2026

    @stoneshawn88
    Author

    It was built on 0.4.6 with app, game version is 1.0.1.

    Here is the log:

    boot: game language en-US
    boot: game files /var/mobile/Containers/Data/Application/ED8AC05A-4B25-4AB6-BF67-EB5861179BA8/Documents/romfs
    [dm] game arguments from the game profile: -SwitchVirtualAddressSpaceSize=4064
    [dm] key numbers K18=265 KTLS=266 KTLR=267 KGATE=268
    [dm] main: gates 100 patch_off 0xfffffffffe000000 keys 265/266/267/268
    [dm] main: base 0x11cc00000 size 0x9b58000
    [dm] subsdk0: gates 10 patch_off 0x670000 keys 265/266/267/268
    [dm] subsdk0: base 0x115a44000 size 0x6d4000
    [dm] sdk: gates 104 patch_off 0xc60000 keys 265/266/267/268
    [dm] sdk: base 0x116118000 size 0xd04000
    [dm] front end: thermal state 0, brightness 0.65, Low Power Mode off
    launcher: 14 settings shown
    [dm] main: undefined weak _ZTHN13LowLevelTasks5FTask10ActiveTaskE bound to 0
    [dm] main: undefined weak _ZTHN13LowLevelTasks7Private20FOversubscriptionTls26bIsOversubscriptionAllowedE bound to 0
    [dm] main: undefined weak _ZTHN30FOverridableSerializationLogic20OverriddenPropertiesE bound to 0
    [dm] main: undefined weak _ZTHN30FOverridableSerializationLogic28bUseOverridableSerializationE bound to 0
    [dm] main: undefined weak _ZTHN17FPropertyTagScope18CurrentPropertyTagE bound to 0
    [dm] main: undefined weak _ZTHN13LowLevelTasks5FTask10ActiveTaskE bound to 0
    [dm] main: undefined weak _ZTHN13LowLevelTasks7Private20FOversubscriptionTls26bIsOversubscriptionAllowedE bound to 0
    [dm] main: undefined weak _ZTHN30FOverridableSerializationLogic20OverriddenPropertiesE bound to 0
    [dm] main: reloc relative=0 relr=1371154 abs/glob=3985 jump=627
    [dm] subsdk0: reloc relative=0 relr=3424 abs/glob=11832 jump=3817
    [dm] sdk: _ZNSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE9underflowEv bound to an earlier module's definition (subsdk0)
    [dm] sdk: _ZTIN2nn2sf6detail13CmifProxyInfoE bound to an earlier module's definition (subsdk0)
    [dm] sdk: _ZTIN2nn2sf6detail13CmifProxyInfoE bound to an earlier module's definition (subsdk0)
    [dm] sdk: _ZTIN2nn2sf6detail13CmifProxyInfoE bound to an earlier module's definition (subsdk0)
    [dm] sdk: _ZTIN2nn2sf6detail13CmifProxyInfoE bound to an earlier module's definition (subsdk0)
    [dm] sdk: _ZTIN2nn2sf6detail13CmifProxyInfoE bound to an earlier module's definition (subsdk0)
    [dm] sdk: _ZTIN2nn2sf6detail13CmifProxyInfoE bound to an earlier module's definition (subsdk0)
    [dm] sdk: _ZTIN2nn2sf6detail13CmifProxyInfoE bound to an earlier module's definition (subsdk0)
    [dm] sdk: reloc relative=0 relr=15011 abs/glob=11214 jump=7813 (some bound to an earlier module's definition)
    [dm] sdk: 771 bound to an earlier module's definition in all
    [dm] force: 395 entries hit, 503 not referenced by this game
    [dm] sdk: NintendoSDK nnSdk-20_5_17-Rele (major 20)
    [dm] stubs=0
    [dm] FINAL FANTASY RESONANCE 1.0.1: Unreal's allocator (FMallocBinned3 at main+0x77c6210) runs on a host malloc zone
    launcher: DM_FPS_TARGET=60
    launcher: DM_OPMODE=1
    launcher: DM_PRESENT_UPSCALE=off
    launcher: DM_LANG=en-US
    launcher: DM_SHOW_FPS=1
    launcher: DM_TOUCH_HAPTICS=1
    launcher: DM_RUMBLE=1
    launcher: DM_RUMBLE_GAIN=1.0
    launcher: DM_PRESENT_SNAP=0
    launcher: DM_PSO_MTL4=0
    launcher: DM_PSO_PREBUILD=1
    launcher: DM_NVN_ENC_THREAD=1
    launcher: DM_FPS_HOLD=on
    launcher: DM_METAL_HUD=0
    [dm] front end: shaking the phone shakes the controller (threshold 1.50 G)
    [dm] front end: frame-rate counter on
    [dm] audio session: sample rate 48000 Hz, I/O buffer 5.33 ms (asked for 5 ms)
    [dm] host loading already finished early in the background (dm_host_preload_start)
    [dm] >>> nnosInitialize
    [dm] guest AS 0x300000000 +0x140000000 heap 0x438000000 alias 0x310000000 stack 0x428000000
    [dm] >>> nninitInitializeSdkModule
    [dm] init takeover: nndiagStartup (no-op)
    [dm] init takeover: oe::Initialize (no-op)
    [dm] init takeover: aoc::Initialize (no-op)
    [dm] init takeover: err::InitializeContextWriterApi (no-op)
    [dm] init takeover: fs::InitializeForApplication (no-op)
    [dm] init takeover: pctl::Initialize (no-op)
    [dm] init takeover: diag::InitializeApplicationAbortObserver (no-op)
    [dm] >>> nninitStartup
    [dm] main: DT_INIT +0x59220c0 (init_array 1890 entries)
    [dm] time::LoadTimeZoneRule HKT (host time zone used instead)
    [dm] ToCalendarTime: first conversion 1793052093 → 2026-10-27 06:01 (time zone HKT, offset 28800 s)
    [dm] subsdk0: DT_INIT +0x20 (init_array 45 entries)
    [dm] sdk: DT_INIT +0x400 (init_array 83 entries)
    [dm] >>> nnMain
    [dm] [mem] alias region mapped up to +1.06 GB (alias region 4.38 GB)
    [dm] fs mount rom: → /var/mobile/Containers/Data/Application/ED8AC05A-4B25-4AB6-BF67-EB5861179BA8/Documents/romfs/romfs (read-only)
    [dm] fs rom: archive /var/mobile/Containers/Data/Application/ED8AC05A-4B25-4AB6-BF67-EB5861179BA8/Documents/romfs/romfs (14 files, 10 dirs, 9 shards, tree hash 2f541d2514e14875)
    [dm] aoc: reporting 0 add-on contents {} (no DM_AOC_DIR)
    [dm] game called nn::diag abort: Result 0, call site main+0x11bc
    [dm] bt: main+0x11bc main+0x1e2154 main+0x1729f0 main+0x352f884 sdk+0x141cf0 sdk+0x148474 dm_thread_enter+0x18
    [dm] FATAL game aborted
    [dm] CRASH sig=6 addr=__pthread_kill+0x8 pc=__pthread_kill+0x8 lr=pthread_kill+0x10c sp=0x43708c5e0
    x0=0 x1=0 x2=0 x3=0 x4=0x1a9ef9e67 x5=0x43708c590
    x6=0x64 x7=0 x8=0x1063ce6113b40715 x9=0x1063ce60784d3715 x10=0x2 x11=0xfffffffd
    x12=0 x13=0 x14=0 x15=0 x16=0x148 x17=0x16bf93000
    x18=0 x19=0x6 x20=0xee07 x21=0x16bf930e0 x22=0x43708c808 x23=0x200
    x24=0x11a1d0ed0 x25=0x23 x26=0x24 x27=0x2 x28=0x43708cdf0
    [dm] *x5: 0 __sF+0x130 0x43708c5c0 +0x30 +0 0
    [dm] *x17: 0x1063ce6113b40715 0 0x16c09f000 0x17069f010 0 0
    [dm] *x21: 0x16bf93000 0x16bf930ac 0x800f 0xee07 0x20ff 0
    [dm] *x22: 0x4c0077006f004c 0x6c006500760065 0x61007400610046 0x7200720045006c 0x5b00200072006f 0x65006c00690046
    [dm] *x24: 0x566863746977532d 0x64416c6175747269 0x6170537373657264 0x343d657a69536563 0x343630 0
    [dm] *x28: 0x18f90100 0x5000000000 0 0x64004100000000 0 0x61007000000000
    [dm] bt: abort+0x94 h_vi_VsyncEvent.cold.1+0 diag_abort+0 main+0x11bc main+0x1e2154 main+0x1729f0 main+0x352f884 sdk+0x141cf0 sdk+0x148474 dm_thread_enter+0x18
    [dm] fp=0x43708c600 0x100 bytes below sp:
    [dm] 43708cdf0 2 24 23
    [dm] 2 2079ebc18 43708c530 1a9e87e58
    [dm] 43708c550 1a9e8aca0 29b82c078 10f48a2a0
    [dm] 2079ec048 2079ebb80 2079ebd88 1
    [dm] 43708c580 1fdbf6b50 2 2079ebc18
    [dm] 43708c5a0 1a9e87e58 0 2079ebc18
    [dm] 43708c5c0 1a9eda018 1a9ed9fe8 0
    [dm] 43708c600 1a9ea1de0 11a1d0ed0 200
    [dm] stack scan sp=0x43708c5e0: [+168]main+0x7c919e8 [+200]main+0x11bc [+232]main+0x1e2154 [+264]main+0x7c919e8 [+400]main+0x7c3e9f8 [+1624]main+0x1729f0 [+1656]main+0x6290d8c [+1672]main+0x352f884 [+1944]main+0x352f884 [+1960]main+0x7c47198 [+2392]sdk+0x141cf0 [+2456]main+0x8c2b71c [+2464]main+0x8c2b570 [+2472]main+0x8c2b718 [+2488]sdk+0x148474 [+2504]sdk+0xb7a768 [+2520]main+0x8c2b570 [+2560]sdk+0x141c80
    [dm] handle table use 3 / 4096, threads created so far 3
    [dm] same-core handoffs 0, total 0.0 ms
    [dm] thread 0x1003 'FHeartBeatThread' priority 43 core 0 mask 0x7 CPU 0.00s svc 5 created at tick 0 (0.0 s ago) waits:running/not waiting addr=0 last svc 0xb lr=sdk+0xc800e4
    [dm] 0x1003 registers pc=0x24d553808 x19=0 x20=0x4288a8980 x21=0x4e20 x22=0x44b82fa09b5a53 x23=0x3b9aca00 x24=0 x25=0 x26=0 x27=0x10c4cc000 x28=0
    [dm] 0x1003 x20 → 128 bytes from 0x4288a8980: 00000000 00000000 165a0bc0 00000000 00000000 00000000 00000000 00000000 0c5dcb78 00000001 0000000b 00000000 17c64c00 00000001 1dcd6500 00000000 288a8a00 00000004 0440dd64 00000001 00000000 00000000 00000000 00000000 1dcd6500 00000000 288a8bf0 00000004 1dcd6500 00000000 288a8bf0 00000004
    [dm] 0x1003 backtrace: main+0x1aaf8 sdk+0x141cf0 sdk+0x148474
    [dm] thread 0x1002 'GameThread' priority 43 core 1 mask 0x7 CPU 0.00s svc 13 created at tick 0 (0.0 s ago) waits:running/not waiting addr=0x118fd19cc last svc 0x1c lr=sdk+0xc8038c
    [dm] thread 0x1001 'main thread' priority 44 core 0 mask 0x7 CPU 0.05s svc 58 present since process start waits:sync object addr=0 last svc 0x18 lr=sdk+0xc802ec
    [dm] 0x1001 backtrace: sdk+0x141e44 main+0x352f1e0
    [dm] host thread 0x103: mach_msg2_trap+0x8 mach_msg_overwrite+0x1a8 mach_msg+0x18 +0xa0 +0x4a4 +0x214 GSEventRunModal+0x78 +0x31c UIApplicationMain+0x14c main+0xda8 +0x1b10
    [dm] host thread 0x2103: __workq_kernreturn+0x8
    [dm] host thread 0x2203: __workq_kernreturn+0x8
    [dm] host thread 0x3913: mach_msg2_trap+0x8 mach_msg_overwrite+0x1a8 mach_msg+0x18 +0xa0 +0x4a4 +0x214 +0xd4 +0x40 +0x1a4 +0x2dc _pthread_start+0x88
    [dm] host thread 0x4503: __workq_kernreturn+0x8
    [dm] host thread 0x4d23: semaphore_timedwait_trap+0x8 +0x4c $sSo21OS_dispatch_semaphoreC8DispatchE4wait11wallTimeoutAC0dG6ResultOAC0D8WallTimeV_tF+0x18 +0x1c20 +0x71c4 +0x804 +0x3ac +0x30 +0x4f0 +0x10 +0x38 +0x24c
    [dm] host thread 0xac03: semaphore_wait_trap+0x8 +0x20 +0x60 _pthread_start+0x88
    [dm] host thread 0xae03: semaphore_wait_trap+0x8 +0x20 +0x60 _pthread_start+0x88
    [dm] host thread 0xb703: mach_msg2_trap+0x8 mach_msg_overwrite+0x1a8 mach_msg+0x18 +0xa0 +0x4a4 +0x214 CFRunLoopRun+0x40 _ZNK16CLMotionActivity9isMountedEv+0x839c _pthread_start+0x88
    [dm] host thread 0xbe03: semaphore_timedwait_trap+0x8 +0x4c +0x144 _pthread_start+0x88

  3. LNPANDY commented on Oct 27, 2026

    @LNPANDY
    Owner

    Thank you — this log is much more useful than the first one, and it rules out what I suggested before. Ignore the entitlement theory: the app got past jetsam and into nnMain, mapped its address regions, mounted the RomFS and read the add-on list. The crash is the game aborting on its own, with the SDK reporting it as Result 0.

    What the log says

    [dm] >>> nnMain
    [dm] [mem] alias region mapped up to +1.06 GB (alias region 4.38 GB)
    [dm] fs mount rom: → …/Documents/romfs/romfs (read-only)
    [dm] aoc: reporting 0 add-on contents {} (no DM_AOC_DIR)
    [dm] game called nn::diag abort: Result 0, call site main+0x11bc
    [dm] bt: main+0x11bc main+0x1e2154 main+0x1729f0 main+0x352f884 sdk+0x141cf0 sdk+0x148474 dm_thread_enter+0x18
    

    The register dump carries the reason: x24 points at -SwitchVirtualAddressSpaceSize=4064 (UTF-16), and x22 at LowLevelFatalError [File: …]. That is Unreal's own fatal-error path, not the SDK's.

    What I checked, and what it is not

    I worked through the obvious candidates and each one is fine:

    • Not the alias region running out. The profile cuts the node area to 62 MB, so the 4064 MB engine region starts 62 MB in and ends at 4126 MB of the 4480 MB region — 354 MB spare. I initially thought this was the cause and was wrong.
    • Not -SwitchVirtualAddressSpaceSize=4064 being too large. It is 4064 because the profile measured this game needing +2.02 GB at 166 s and a 2 GB region aborted (that is written down in dm/games/0100606026F12000/game.tsv).
    • Not the add-on. aoc: reporting 0 add-on contents {} is normal when the game has no DLC and not your problem here.

    What I need from you

    Result 0 means the SDK did not classify the failure, so the abort itself says nothing. The guest backtrace is main+0x11bc ← main+0x1e2154 ← main+0x1729f0, and the profile records OnOutOfMemory at main+0x13c74, which is not in that chain — so this is a different fatal error, one whose message the log does not print.

    Two things would pin it down:

    1. Run it again with DM_LOG_UEMALLOC=1 in Documents/env.txt and send the log. That prints the engine's own allocation calls, so we see whether it is the page allocator asking for a block it cannot place, or something else entirely.
    2. Documents/env.txt: is any DM_NVN_* or memory switch set? The log shows the launcher's normal 14 settings, and I want to be sure nothing else is in there.

    If #1 shows an allocator failure, the next step is to raise mem_alias in the profile — the 354 MB of spare would then matter — and I will make that change and give you a build to test. If it shows nothing, the abort is somewhere else in main+0x1e2154 and I will trace that offset against the module.

    One question about your device, because it decides how much room we have: which iPhone is it, and how much RAM? The profile's numbers were measured on a 12 GB iPhone; if yours has less, the physical budget — not the address space — is what we would have to work within, and that changes the plan.

  4. LNPANDY commented on Oct 27, 2026

    @LNPANDY
    Owner

    Correction before you try anything — I named a switch that does not exist. DM_LOG_UEMALLOC is not real; please ignore that line. I checked docs/env_switches.tsv, which is generated from the sources, and the switches that would actually tell us something here are:

    DM_MEMSTAT=Documents/memstat.tsv
    

    That writes one line per second: footprint, Metal allocations, and resident and charged memory by region class (guest, code, malloc, gpu, …). If the game aborts on a physical budget rather than on address space, it shows up there as a class hitting its ceiling right before the abort.

    Two more, if you are willing:

    • DM_ALIAS_WINDOWS=256 logs every 30 s how much of each 256 MB window of the alias region is mapped. That is the direct measurement of the question I got wrong above, so it would settle whether 4126 MB really does fit.
    • The full Documents/env.txt as it is now, so I know exactly what is already set.

    Sorry for the noise — the rest of the previous comment stands: it is not the entitlement, and it is not the alias region running out on paper.

    And still the one question that decides the plan: which iPhone is this, and how much RAM? The profile's figures came from a 12 GB device.

  5. stoneshawn88 commented on Oct 27, 2026

    @stoneshawn88
    Author

    A quick reply to you: it is an M1 ipad pro 1TB version with 16GB Ram

    Trying to rebuild on 0.4.8, will report soon

  6. stoneshawn88 commented on Oct 27, 2026

    @stoneshawn88
    Author

    Rebuilt on v0.4.8, lucky that I have a set of RomFS files saved so I solved the archive skipped issue by pasting the folder before the building step.

    Can confirm it runs on the iPad now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions