Giter Site home page Giter Site logo

Unhandled Exception:System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. about injectfix HOT 9 CLOSED

pangxiaobo avatar pangxiaobo commented on June 11, 2024
Unhandled Exception:System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.

from injectfix.

Comments (9)

AskrYggdrasillsCR avatar AskrYggdrasillsCR commented on June 11, 2024 1

发个函数案例呗

我该如何定位到具体函数呢?
改工程源码,在刚才报错的地方加个打印信息,然后用工程里面[build_for_unity.bat]重新编译一下

看看是哪一个函数导致的报错

from injectfix.

pangxiaobo avatar pangxiaobo commented on June 11, 2024

安卓注入失败, Web 平台正常

from injectfix.

pangxiaobo avatar pangxiaobo commented on June 11, 2024

Unity 版本 2021.2.18f1

from injectfix.

pangxiaobo avatar pangxiaobo commented on June 11, 2024

经过测试 static IEnumerable hotfix 返回值 长度大于5680 就会出现这个错误,小于则不会

from injectfix.

AskrYggdrasillsCR avatar AskrYggdrasillsCR commented on June 11, 2024

发个函数案例呗

from injectfix.

pangxiaobo avatar pangxiaobo commented on June 11, 2024

发个函数案例呗
static IEnumerable hotfix
{
get
{
List tList = new List();
Type[] cSharp = Assembly.Load("Assembly-CSharp").GetTypes();
tList.AddRange(cSharp);
Type[] cSharpFirst = Assembly.Load("Assembly-CSharp-firstpass").GetTypes();
tList.AddRange(cSharpFirst);
return tList;
}
}
Assembly-CSharp 定位不到具体函数 ,空项目测试 2W 个长度也不会有问题。

from injectfix.

pangxiaobo avatar pangxiaobo commented on June 11, 2024

发个函数案例呗

我该如何定位到具体函数呢?

from injectfix.

AskrYggdrasillsCR avatar AskrYggdrasillsCR commented on June 11, 2024

发个函数案例呗

我该如何定位到具体函数呢?
改工程源码,在刚才报错的地方加个打印信息,然后用工程里面[build_for_unity.bat]重新编译一下

from injectfix.

pangxiaobo avatar pangxiaobo commented on June 11, 2024

正确写法
[DllImport("__Internal")]
private static extern void XX();
错误写法
private static extern void XX();
虽然能编译通过但是会注入失败

from injectfix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.