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

Access violation due to stripped methods #489

Open
etmltg69 opened this issue Feb 23, 2024 · 3 comments
Open

Access violation due to stripped methods #489

etmltg69 opened this issue Feb 23, 2024 · 3 comments
Labels
bug Something isn't working game specific Likely to be an issue related to a specific game

Comments

@etmltg69
Copy link

etmltg69 commented Feb 23, 2024

Why I'm getting always access violation error when trying to add values to generic list or what I'm doing wrong?

let list = Il2Cpp.corlib.class("System.Collections.Generic.List`1")
let int = Il2Cpp.corlib.class("System.Int32")
let listInt = list.inflate(int).new()
                     
listInt.method(".ctor").invoke()
listInt.method("Add").invoke(1)

Getting always the same error, doesn't matter if I try method "Add", "Insert" or "set_Item"

Error: access violation accessing 0x3e8
at invokeRaw (il2cpp/structs/method.ts:233)
at (src/index.ts:1023)
at call (native)
at (il2cpp/structs/method.ts:354)

@etmltg69 etmltg69 changed the title System.Collections.Generic.List`1 - access violation when trying to invoke "Add" method System.Collections.Generic.List`1 - access violation when trying to invoke "Add", "Insert" or "set_Item" method Feb 29, 2024
@etmltg69 etmltg69 changed the title System.Collections.Generic.List`1 - access violation when trying to invoke "Add", "Insert" or "set_Item" method System.Collections.Generic.List`1 (List<int>) - access violation when trying to invoke "Add", "Insert" or "set_Item" method Feb 29, 2024
@soletsabuse
Copy link

Same problem. Need some help =/

@soletsabuse
Copy link

Looks like these methods were stripped by linker. This can happens to any functions which are not used in the project.

@vfsfitvnm vfsfitvnm changed the title System.Collections.Generic.List`1 (List<int>) - access violation when trying to invoke "Add", "Insert" or "set_Item" method Access violation due to stripped methods Aug 24, 2024
@vfsfitvnm
Copy link
Owner

Looks like these methods were stripped by linker. This can happens to any functions which are not used in the project.

As far as I recall, this is correct - but those methods would have a virtualAddress should be NULL.

What's the app name and platform?

@vfsfitvnm vfsfitvnm added bug Something isn't working game specific Likely to be an issue related to a specific game labels Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working game specific Likely to be an issue related to a specific game
Projects
None yet
Development

No branches or pull requests

3 participants