Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG - Release] KH3 crashes with UE4SS 3.0.1 Shipping build #700

Open
ntsik opened this issue Nov 5, 2024 · 20 comments
Open

[BUG - Release] KH3 crashes with UE4SS 3.0.1 Shipping build #700

ntsik opened this issue Nov 5, 2024 · 20 comments
Labels
game specific This issue is not a UE4SS core problem, but related to a specific game

Comments

@ntsik
Copy link

ntsik commented Nov 5, 2024

Branch or Release
The crash occurs on:

Game and Engine Version
Kingdom Hearts 3, UE 4.17

Describe the bug
With UE4SS 3.0.1 "Shipping" installed, KH3 will crash with a "Fatal error" either when loading a save or when loading a cutscene.

The release and experimental builds appear to be using the "Shipping" build. It is worth noting that this crash does not occur with "Dev".

Mods directory
Only default mods installed.

To Reproduce
I was able to reliably reproduce by creating a save in the KH3 prologue next to the OC map chest (the second save point in the game). The game would crash either when loading the save, when the heartless fight begins at the bottom of the stairs, or at the beginning of the first trinity sled event. The latter always happens; the first two only sometimes.

Expected behavior
KH3 should not crash with a "Shipping" build of UE4SS.

Screenshots, UE4SS Log, and .dmp file
Untitled
UE4CC-Windows-4BC1D1E44D0F8F6C80A5B3A262609D11_0000.zip

Desktop:

Edition	Windows 10 Home
Version	22H2
Installed on	‎1/‎4/‎2023
OS build	19045.5131
Experience	Windows Feature Experience Pack 1000.19060.1000.0

Additional context:

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ff7df4a1c20 (KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x0000000002b1ae90)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 000000070000005e
Attempt to read from address 000000070000005e

PROCESS_NAME:  KINGDOM HEARTS III.exe

READ_ADDRESS:  000000070000005e 

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  0000000000000000

EXCEPTION_PARAMETER2:  000000070000005e

STACK_TEXT:  
000000f5`6cece5e8 00007ff7`e0ab4ae4     : 3f800000`00000000 00000225`c71173c0 00000000`00005f98 00007ff7`dc9585b0 : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x2b1ae90
000000f5`6cece5f0 00007ff7`e0ab4b11     : 00000226`00bd70a0 000000f5`6cece760 00000000`00000003 000000f5`6cecd158 : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x412dd54
000000f5`6cece6f0 00007ff7`e0ab4523     : 00000000`00000009 00007ff7`df2534e0 00000225`de22f4c0 00000000`0000000a : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x412dd81
000000f5`6cece7f0 00007ff7`e0abdb9d     : 00000000`00000008 00000000`00000002 00000000`00000001 00007ff7`e6315b60 : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x412d793
000000f5`6cece8c0 00007ff7`e06eaa28     : 00000226`6fc68580 00000000`00000023 00000000`00000023 00000000`00000000 : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x4136e0d
000000f5`6cece8f0 00007ff7`e061dc28     : 00000225`d653b050 000000f5`6ceceb10 00000000`00000000 00000000`00000000 : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x3d63c98
000000f5`6cecec10 00007ff7`dda5caee     : 00000225`d653b050 00000000`00000000 00000000`00000000 00000000`eb33b100 : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x3c96e98
000000f5`6ceced10 00007ff7`dc9500e0     : 00000225`a684e680 00000225`aa0bec80 00000225`a684e680 00000000`00000009 : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x10d5d5e
000000f5`6ceced50 00007ff7`dc9568c0     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : KINGDOM_HEARTS_III!opus_repacketizer_out_range+0x3e1ba0
000000f5`6cecef00 00007ff7`dc95694a     : 00000000`00000030 00000000`00000000 00000000`00000001 00000225`eb33a80c : KINGDOM_HEARTS_III!opus_repacketizer_out_range+0x3e8380
000000f5`6cecf0a0 00007ff7`dc95d819     : 00000000`00000000 00000000`00000000 00000000`00000001 00000225`eb33a80c : KINGDOM_HEARTS_III!opus_repacketizer_out_range+0x3e840a
000000f5`6cecf0e0 00007ff7`e1da08aa     : 00000000`0000000a 00000000`00000000 00000000`00000000 000000f5`6c980000 : KINGDOM_HEARTS_III!opus_repacketizer_out_range+0x3ef2d9
000000f5`6cecf940 00007ffb`2a137374     : 00000000`00000000 00000000`00000000 00000000`00000000 00007ffb`04cf0000 : KINGDOM_HEARTS_III!agsSetDisplayMode+0x397b5a
000000f5`6cecf980 00007ffb`2a59cc91     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x14
000000f5`6cecf9b0 00000000`00000000     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x21
@Meep111
Copy link

Meep111 commented Dec 10, 2024

u sayed u use exprimental build, use the stabile source instead

@ntsik
Copy link
Author

ntsik commented Dec 10, 2024 via email

@Meep111
Copy link

Meep111 commented Dec 10, 2024

do you get a log file from ues? also log file says Windows (unknown version)

@Meep111
Copy link

Meep111 commented Dec 10, 2024

do paste ue4ss log and your windows version

@ntsik
Copy link
Author

ntsik commented Dec 10, 2024

Just tried again and I still experience the crash with the latest from main. https://github.com/UE4SS-RE/RE-UE4SS/releases/download/experimental/zDEV-UE4SS_v3.0.1-225-gcd7746e.zip

Untitled

UE4SS.log

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ff6c0144b4b (KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x000000000412ddbb)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000001
   Parameter[1]: 00007ff6bd0e3180
Attempt to write to address 00007ff6bd0e3180

PROCESS_NAME:  KINGDOM HEARTS III.exe

WRITE_ADDRESS:  00007ff6bd0e3180 

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  0000000000000001

EXCEPTION_PARAMETER2:  00007ff6bd0e3180

STACK_TEXT:  
000000e7`6becea10 00007ff6`c0144523     : 00000000`00000090 00007ffa`ada031a3 00000000`00000000 00000000`00000092 : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x412ddbb
000000e7`6beceb10 00007ff6`c014db9d     : 00000000`00000008 00000000`00000002 00000000`00000001 00007ff6`c59a5b60 : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x412d793
000000e7`6becebe0 00007ff6`bfd7aa28     : 0000020c`e3ba7b00 00000000`0000003b 00000000`0000003b 00000000`00000000 : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x4136e0d
000000e7`6becec10 00007ff6`bfcadc28     : 0000020c`331d7090 0000020c`7d5952c0 00000000`00000000 00000000`00000000 : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x3d63c98
000000e7`6becef30 00007ff6`bd0ecaee     : 0000020c`331d7090 00000000`00000000 00000000`00000000 00000000`7f39ad00 : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x3c96e98
000000e7`6becf030 00007ff6`bbfe00e0     : 0000020c`3bbde680 0000020c`3f42ec80 0000020c`3bbde680 00000000`00000009 : KINGDOM_HEARTS_III!Scaleform::Render::Matrix4x4<float>::SetIdentity+0x10d5d5e
000000e7`6becf070 00007ff6`bbfe68c0     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : KINGDOM_HEARTS_III!opus_repacketizer_out_range+0x3e1ba0
000000e7`6becf220 00007ff6`bbfe694a     : 00000000`00000030 00000000`00000000 00000000`00000001 0000020c`7f39a3dc : KINGDOM_HEARTS_III!opus_repacketizer_out_range+0x3e8380
000000e7`6becf3c0 00007ff6`bbfed819     : 00000000`00000000 00000000`00000000 00000000`00000001 0000020c`7f39a3dc : KINGDOM_HEARTS_III!opus_repacketizer_out_range+0x3e840a
000000e7`6becf400 00007ff6`c14308aa     : 00000000`0000000a 00000000`00000000 00000000`00000000 000000e7`6b8c2000 : KINGDOM_HEARTS_III!opus_repacketizer_out_range+0x3ef2d9
000000e7`6becfc60 00007ffb`13a77374     : 00000000`00000000 00000000`00000000 00000000`00000000 00007ffa`ceff0000 : KINGDOM_HEARTS_III!agsSetDisplayMode+0x397b5a
000000e7`6becfca0 00007ffb`1593cc91     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x14
000000e7`6becfcd0 00000000`00000000     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x21

UE4CC-Windows-E4E9A3054611766C37037D9E0EEE1581_0000.zip

Edition	Windows 10 Home
Version	22H2
Installed on	‎1/‎4/‎2023
OS build	19045.5131
Experience	Windows Feature Experience Pack 1000.19060.1000.0

@Meep111
Copy link

Meep111 commented Dec 10, 2024

ok then go into ue4ss.ini and set up a log text , i should have specified it.
also https://www.reddit.com/r/dragonballfighterz/comments/nsbevo/games_keeps_crashing_ue4ccwindows_crash_files/
if its a trusted game u need to alow the folder. some virus program has more issues then other. usally its write issues or as post says. but i do want to see that log. see where it stopped. UE4SS.log set that up in ini of ue4ss

@ntsik
Copy link
Author

ntsik commented Dec 10, 2024

The UE4SS.log is included in my comment above (https://github.com/user-attachments/files/18084613/UE4SS.log). It doesn't appear to contain anything of interest from what I can tell.

UE4SS works correctly with the "Dev" version. It only crashes with "Shipping". AFAICT it's not an issue with trusting the game directory or anti-virus.

@Meep111
Copy link

Meep111 commented Dec 10, 2024

dont use shipping then if it works, even unreal engine when building in shipping has issues. as soon as ure aob are loaded ure ok.

@Meep111
Copy link

Meep111 commented Dec 10, 2024

thanks you for log

@ntsik
Copy link
Author

ntsik commented Dec 10, 2024

I agree and am moving forward with the "Dev" build for creating mods.

However, I would expect for UE4SS releases to work out of the box. That could mean fixing the "Shipping" build, or adding the "Dev" version of UE4SS.dll into CustomGameConfigs, or adding documentation for KH3 specifically, or something different.

For people new to the project, it's unintuitive to set UE4SS up for KH3. I was lucky that I found someone else with a working setup who could help me narrow down the issue. Other modders might bounce off of UE4SS instead.

@Meep111
Copy link

Meep111 commented Dec 10, 2024

we are just people having job and life, no one is payed, this happens when it happens on freetime , but if u do feel to contribute make ure adjustement and push for game you need https://docs.ue4ss.com/guides/fixing-compatibility-problems.html.

@Meep111
Copy link

Meep111 commented Dec 10, 2024

so issue solved @Buckminsterfullerene02

@narknon
Copy link
Collaborator

narknon commented Dec 10, 2024

I'm not sure what Meep is trying to say, or why they're saying this is solved.

I don't know how UE4SS would cause crashes with Scaleform, especially not only on shipping. Can't really debug without a way to repro. I think I can use your save if it's for Epic version.

@Meep111
Copy link

Meep111 commented Dec 10, 2024

he will use main with dev

@ntsik
Copy link
Author

ntsik commented Dec 10, 2024

I understand this is an open source project, and I understand fixing the root cause may take time (or may not happen at all). From my end, I just want to help others who might encounter the same issue.

My save file is for Steam, unfortunately. I can repro reliably, but I'm still very new to non-JVM projects, so I'm not entirely sure how to debug this issue myself, or even what to look for in this case.

@narknon
Copy link
Collaborator

narknon commented Dec 10, 2024

he will use main with dev

That's not a solution if this is a bug with release build. Please don't hold yourself out to be a maintainer of the repository. You have posted a lot of low quality replies to issues.

@Meep111
Copy link

Meep111 commented Dec 10, 2024

i never sayed im a maintaner, but he needed a solution wich was main dev

@Meep111
Copy link

Meep111 commented Dec 10, 2024

if you dont want people to respond to peoples issues then close this. no need to be snappy

@UE4SS UE4SS added the game specific This issue is not a UE4SS core problem, but related to a specific game label Dec 12, 2024
@UE4SS
Copy link
Collaborator

UE4SS commented Dec 12, 2024

If the game doesn't work when UE4SS is built targeting Shipping games, but it does work when targeting Debug games, that suggests that either the game in question is actually built as Debug which would be bizarre, or there's some engine change and the Debug target coincidentally has some change in it that make it work.

The game needs to be reverse engineered to fix this.
The VTable layouts, member variable layouts (structs/classes), and potentially FUObjectArray members, and also FName alignment.
The easiest way to get an idea of what the problem is would probably be to build UE4SS yourself targeting Shipping but with our own debug target so that the compiler doesn't optimize away debugability, and then see where in the code the crash happens and debug the problem.
I don't have the game so I can't debug the game myself.

@narknon
Copy link
Collaborator

narknon commented Dec 12, 2024

The debug target of UE4SS does not have any changes to vtables/member variables. They mean our debug build config (which targets shipping games) for some reason does not crash, but shipping does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
game specific This issue is not a UE4SS core problem, but related to a specific game
Projects
None yet
Development

No branches or pull requests

4 participants