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

Hook 方法突然间不会被hook了 #33

Closed
panzhi1 opened this issue Jan 13, 2023 · 15 comments
Closed

Hook 方法突然间不会被hook了 #33

panzhi1 opened this issue Jan 13, 2023 · 15 comments

Comments

@panzhi1
Copy link

panzhi1 commented Jan 13, 2023

hook了surfaceTexture的updateTexImage方法,开始正常hook, 在频繁调用此方法后,一段时间后就无法hook了,看日志是voidBridge 这个方法不再被调用,日志也没有其他不正常信息。请问有没有办法定位到voidBridge不调用的原因吗?

@yujincheng08
Copy link
Contributor

看起来像是 jit 的问题。

@panzhi1
Copy link
Author

panzhi1 commented Jan 13, 2023

只有在release下才会发生这种情况,debug下没有发生。日志里在突变失败的时候,没有任何信息变化

@yujincheng08
Copy link
Contributor

看起来像是 jit 的问题。

@panzhi1
Copy link
Author

panzhi1 commented Jan 13, 2023

看起来像是 jit 的问题。
麻烦说下嘛?

看起来像是 jit 的问题。

麻烦能说具体点吗?

@yujincheng08
Copy link
Contributor

jit 把热点方法编译之后覆盖了啊

@panzhi1
Copy link
Author

panzhi1 commented Jan 13, 2023

jit 把热点方法编译之后覆盖了啊

谢谢! 但为啥只在release出现,debug下不会出现?在hook不到之后,我又主动调用了这个方法,还是不会被hook到?

请问有没有办法解决呢?

@yujincheng08
Copy link
Contributor

debug 因为要给 debugger 加断点所以不会启用 jit。

解决方法就是 Pine.disableJitInline();

@panzhi1
Copy link
Author

panzhi1 commented Jan 13, 2023

debug 因为要给 debugger 加断点所以不会启用 jit。

解决方法就是 Pine.disableJitInline();

感谢! 请问disableJitInline这个方法调用时机有要求吗?我调用返回false了

@panzhi1
Copy link
Author

panzhi1 commented Jan 13, 2023

debug 因为要给 debugger 加断点所以不会启用 jit。
解决方法就是 Pine.disableJitInline();

感谢! 请问disableJitInline这个方法调用时机有要求吗?我调用返回false了

Unexpected inline_max_code_units value 4064260840 (offset 48). 看注释是因为设备厂商修改了偏移量导致失败了

@yujincheng08
Copy link
Contributor

yujincheng08 commented Jan 13, 2023

那只能等修复了。

或者可以试试 LSPlant

@panzhi1
Copy link
Author

panzhi1 commented Jan 13, 2023

那只能等修复了。

谢谢了

@panzhi1 panzhi1 closed this as completed Jan 13, 2023
@panzhi1 panzhi1 reopened this Jan 13, 2023
@panzhi1
Copy link
Author

panzhi1 commented Jan 13, 2023

那只能等修复了。

大佬 没有办法指定对应函数不被Jit优化吗?

@yujincheng08
Copy link
Contributor

@panzhi1 应该已经处理过才对。

你要不还是试试 LSPlant

@panzhi1
Copy link
Author

panzhi1 commented Jan 13, 2023

LSPlant

好的 我试下

@panzhi1 panzhi1 closed this as completed Jan 13, 2023
@panzhi1
Copy link
Author

panzhi1 commented Mar 15, 2023

在hook方法调用前加上try-catch就可以了

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

No branches or pull requests

2 participants