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

Get v29 (2021.2.0) to load #202

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

SamboyCoding
Copy link
Contributor

@SamboyCoding SamboyCoding commented Feb 1, 2022

Doesn't handle the new attribute stuff yet, but it's better than nothing.

Tested on Darkest Dungeon 2.

Requires djkaty/Bin2Object#2 to handle the new unity compressed (u)int format

@Kein
Copy link

Kein commented Mar 24, 2022

Dead By Daylight 2.

Excuse me, good sir, what?

@SamboyCoding
Copy link
Contributor Author

Yea I've apparently been making this mistake for months. Darkest Dungeon 2*

@DaniGP17
Copy link

DaniGP17 commented Oct 2, 2022

Hello, thank you for uploading this way to get v29 work, but in my case I get this error:

image

Game: Phasmophobia, version: 2021.3.9f1

@Cr4nkSt4r
Copy link

Cr4nkSt4r commented Oct 4, 2022

Hello, thank you for uploading this way to get v29 work, but in my case I get this error:

image

Game: Phasmophobia, version: 2021.3.9f1

All the mentioned changes working fine for the game, so you prob. just messed something up.

[EDIT]
@DaniGP17 No you are right, someone else tried to just download SamBoys forked repo with these commits and got the same error.

@DaniGP17
Copy link

DaniGP17 commented Oct 8, 2022

Hello, thank you for uploading this way to get v29 work, but in my case I get this error:

image

Game: Phasmophobia, version: 2021.3.9f1

All the mentioned changes working fine for the game, so you prob. just messed something up.

[EDIT]
@DaniGP17 No you are right, someone else tried to just download SamBoys forked repo with these commits and got the same error.

I download the pull request and now for me is working, when I made the first comment I replace code and was a very bad option, so I downloaded and now work well.

@Cr4nkSt4r
Copy link

Cr4nkSt4r commented Oct 9, 2022

I download the pull request and now for me is working, when I made the first comment I replace code and was a very bad option, so I downloaded and now work well.

The actual problem was fixed by Samboy in this commit:
djkaty/Bin2Object@38304cb
This only occured for people, who just cloned the forked repo of Inspector.
That's why Samboy added a mention to the Bin2Object changes in his main post.

therealchjones added a commit to therealchjones/Il2CppInspector that referenced this pull request Feb 15, 2023
@SwiTool
Copy link

SwiTool commented Apr 29, 2023

will it get merged anytime soon ?

@ClarkKeyton
Copy link

How to Update Metadata of IL2CPP?!

@beyonddoor
Copy link

beyonddoor commented May 11, 2024

@SamboyCoding
Hi SamboyCoding, thanks for your great work. I have a problem when to load an il2cpp versioned 29, here comes the backtrace, it seems public uint ReadUnityCompressedUInt(out int bytesRead) => Reader.ReadUnityCompressedUInt(-1, out bytesRead); is called, so addr is assigned to -1, this value then be assigned to Position and an exception is raised.

Message = "Non-negative number required. (Parameter 'value')"
   在 System.IO.MemoryStream.set_Position(Int64 value)
   在 NoisyCowStudios.Bin2Object.BinaryObjectReader.set_Position(Int64 value) 在 D:\mine\Il2CppInspector\Bin2Object\Bin2Object\BinaryObjectReader.cs 中: 第 38 行
   在 NoisyCowStudios.Bin2Object.BinaryObjectReader.ReadUnityCompressedUInt(Int64 addr, Int32& bytesRead) 在 D:\mine\Il2CppInspector\Bin2Object\Bin2Object\BinaryObjectReader.cs 中: 第 368 行
   在 NoisyCowStudios.Bin2Object.BinaryObjectReader.ReadUnityCompressedInt(Int64 addr, Int32& bytesRead) 在 D:\mine\Il2CppInspector\Bin2Object\Bin2Object\BinaryObjectReader.cs 中: 第 405 行
   在 NoisyCowStudios.Bin2Object.BinaryObjectStream.ReadUnityCompressedInt(Int32& bytesRead) 在 D:\mine\Il2CppInspector\Bin2Object\Bin2Object\BinaryObjectStream.cs 中: 第 96 行
   在 Il2CppInspector.Il2CppInspector.getDefaultValue(Int32 typeIndex, Int32 dataIndex) 在 D:\mine\Il2CppInspector\Il2CppInspector.Common\IL2CPP\Il2CppInspector.cs 中: 第 114 行
   在 Il2CppInspector.Il2CppInspector..ctor(Il2CppBinary binary, Metadata metadata) 在 D:\mine\Il2CppInspector\Il2CppInspector.Common\IL2CPP\Il2CppInspector.cs 中: 第 246 行
   在 Il2CppInspector.Il2CppInspector.LoadFromStream(IFileFormatStream stream, Metadata metadata, EventHandler`1 statusCallback) 在 D:\mine\Il2CppInspector\Il2CppInspector.Common\IL2CPP\Il2CppInspector.cs 中: 第 622 行
   在 Il2CppInspectorGUI.App.<>c__DisplayClass33_0.<LoadBinaryAsync>b__0() 在 D:\mine\Il2CppInspector\Il2CppInspector.GUI\App.xaml.cs 中: 第 322 行

Btw, I load an android game (package name is com.paurau.SlowMoRun) for testing.

@beyonddoor
Copy link

I tried to change the code as following, I am not sure am I right.

       //BinaryObjectReader
        public uint ReadUnityCompressedUInt(long addr, out int bytesRead) {
            lock (readLock) {
                // if(Position >= 0) // your version
                if(addr >= 0)  // I changed here, it seems work
                    Position = addr;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants