Comments (16)
能定位到具体是哪个类注入报错么?
from injectfix.
OK
from injectfix.
等我哦
from injectfix.
是一个添加了partial关键字的类
from injectfix.
看报错信息里,定位到是Code.Translator.cs中的这句报空指针 ,请问会是什么原因呢
if (md.Body != null && !checkILAndGetOffset(md, md.Body.Instructions)) //if条件中报空指针 { //Console.WriteLine("check " + md + " fail il = " + md.Body.Instructions[p] // + ",caller=" + method); return false; }
from injectfix.
partial的类我以前是试过的
from injectfix.
最好能贴个必现的例子
from injectfix.
您好,这个例子是必现的哈,我指定配置这个类,进行注入时就会报错
from injectfix.
项目原因不方便贴上来呢,我先排查排查,然后在这里继续comment,请教您哈
from injectfix.
不过您能说说一般符合什么情况的类,会被提示注入空指针呢
from injectfix.
报错的地方准确的话应该是md为空。
简单加个判断是可以避免这个异常,但是需要知道具体情况才能更准确的处理
from injectfix.
我也碰到了类似的问题,最简化代码如下,当注入class A的时候将会报错
namespace NSA { class A :NSB.B { public void test() { base.ba(() => { base.bb(1); }); } } } namespace NSB { public class B { public virtual void ba( Action onComplete) { } public virtual void bb<T>( T data) { } } }
from injectfix.
我也碰到了类似的问题,最简化代码如下,当注入class A的时候将会报错
namespace NSA { class A :NSB.B { public void test() { base.ba(() => { base.bb(1); }); } } } namespace NSB { public class B { public virtual void ba( Action onComplete) { } public virtual void bb<T>( T data) { } } }
同样的代码我在unity5.2.3测试没问题
你是啥版本?
from injectfix.
报错定位是这里
Object reference not set to an instance of an object
at IFix.CodeTranslator.checkILAndGetOffset (Mono.Cecil.MethodDefinition method, Mono.Collections.Generic.Collection1[T] instructions, System.Collections.Generic.Dictionary
2[TKey,TValue] ilOffset, System.Int32& stopPos) [0x0033c] in
再下探查找,应该是bool ret = checkILAndGetOffset(method, instructions, null, out p); 这里的空指针
from injectfix.
但问题是我同样的代码,并不会报错,unity5.2.3和unity2018都试过了,都不报错
from injectfix.
这是unity 2018(或者更新版本)设置.net 3.5独有的问题。更新下代码,并重新编译
from injectfix.
Related Issues (20)
- Webgl使用问题。 HOT 2
- 催更 HOT 3
- [Bug] 文档错误Doc/quick_start.md
- 包含 as 的函数 Inject 不成功,不能对函数热更 HOT 1
- 为何不能直接使用await Task.Delay呢 HOT 1
- 如何定位到Injectfix的文件代码位置 HOT 1
- Unity 2021.3.26 无法热更 async/await HOT 5
- Unity3d 2022.3.7f1c1 IFixToolKit/IFix.exe.mdb doesn't match image HOT 1
- 对UI事件函数制作补丁,在load补丁的时候会报错
- unity2019.4.17f 安卓打包注入失败 HOT 2
- Unhandled Exception:System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. HOT 9
- InjectFix的使用范围建议? HOT 2
- InvalidProgramException: no closure wrapper for CallbackSignal`2+Action`2[Unit,System.Int32,Unit,System.Int32]
- 是否支持WebGL平台 HOT 3
- 自动化打包流程安卓生成patch文件失败
- 在unity 2022.3.14f1版本建立空工程,打包APK无法Inject。大佬可以看下问题么。
- [Unity2022.3.16]在Unity2022下Inject成功,但是在dll中没有看到IFix相关内容,热更新失效
- 如果通过 patch 文件判断是否有方法调用了处于不同程序集的 base 方法
- Tuple 数组作为参数或返回值时,不生效,但是List 可以
- 打包到客户端System.Exception: assembly may be not injected yet, cat find IFix.ILFixInterfaceBridge, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from injectfix.