LegacyScriptEngine icon indicating copy to clipboard operation
LegacyScriptEngine copied to clipboard

[Bug]: Native Api中使用hook会导致服务器崩溃(补上了崩溃日志)

Open heyhey123-git opened this issue 1 year ago • 1 comments

Describe the bug

使用native api里NativeFunction原生函数的hook方法后,当原函数被调用,服务端就会崩溃

To Reproduce

如下例,当玩家与村民等实体交互时,即原函数被调用时,服务端崩溃

let func = NativeFunction.fromSymbol("?interact@Player@@QEAA_NAEAVActor@@AEBVVec3@@@Z");
func.hook((pl, act, pos) => {
    let res = func.call(pl, act, pos);
    return res;
});

Expected behavior

不崩溃

Screenshots

No response

Platform

win10

BDS Version

1.20.62

LeviLamina Version

0.9.2

LegacyScriptEngine Version

0.4.3

Additional context

minidump_2024-03-10_11-08-04.dmp

trace_2024-03-10_11-08-04.log

heyhey123-git avatar Mar 10 '24 03:03 heyhey123-git

据我所知ll3下的LSE没有native api了吧😂

WuHuiZhang6902 avatar Aug 17 '24 09:08 WuHuiZhang6902