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

接入luapanda后,在unity编辑器中启动游戏会导致编辑器闪退 #182

Open
89cs opened this issue Apr 7, 2024 · 2 comments
Open

Comments

@89cs
Copy link

89cs commented Apr 7, 2024

Describe the bug
接入luapanda后,在unity编辑器中启动游戏会导致编辑器闪退

To Reproduce
Steps to reproduce the behavior:

  1. 在项目中导入luapanda。
  2. unity编辑器中点击play
  3. unity编辑器闪退,闪退复现率100%

Expected behavior
能够正常游戏

Screenshots
91c147a118bfeb011d2c5a347bd3d4d3

Desktop (please complete the following information):

  • OS: [macOS Monterey 12.2.1]
  • Visual Studio Code Version [1.88.0 (Universal)]
  • LuaPanda Version [v3.3]
@89cs
Copy link
Author

89cs commented Apr 8, 2024

unity 的版本为2021.3.17f1,lua的版本为5.3.5,xlua的版本为2.1.15

@stuartwang
Copy link
Collaborator

image
我看了下代码最后崩溃在luaD_hook中,这个函数的作用是在 lua_Debug 中填充调试信息,并调用调试器设置的hook函数。
看起来是因为 plibdebug 库中设置的 lua_hook 函数指针有问题,导致调用时崩溃了。

建议参照这个文档,把useCHook选项设置为false ,观察下效果看是否还会崩溃。
https://github.com/Tencent/LuaPanda/blob/e3ac3d3314f24cf939c36cac5b7dc1f2ed6ee129/Docs/Manual/launch-json-introduction.md

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