We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
可以确认的是 oc本身是可以调用到的, 不为空,但lua调用存在 偶现找不到方法的情况,原因未知,排查中。
报错信息为: [SPA] PANIC: unprotected error in call to Lua API ([string "spa_class("xxxx")..."]:8: attempt to index a nil value)
[SPA] PANIC: unprotected error in call to Lua API ([string "spa_class("xxxx")..."]:8: attempt to index a nil value)
The text was updated successfully, but these errors were encountered:
此时 lua中获取到的self 为空
初步排查后,原因在 前后两次 类的实例 地址相同,导致
+ (int)createInstanceUserData:(lua_State *)L object:(id)object { ...... lua_pushlightuserdata(L, (__bridge void *)(object)); if(lua_isnil(L, -1) ){ } else { }
走到了else逻辑,最后导致self为空
else
Sorry, something went wrong.
fix: 有偶现的 无法调用到 oc类的情况 #8
8cbfe7f
fix: 有偶现的 无法调用到 oc类的情况 #8 8cbfe7f hzfanfei <hzfanfei@corp.netease.com>
ed9cfa5
lua_isnil(L, -1) 只判断空是不够的的,还要判断内部的instance是否为空
No branches or pull requests
可以确认的是 oc本身是可以调用到的, 不为空,但lua调用存在 偶现找不到方法的情况,原因未知,排查中。
报错信息为:
[SPA] PANIC: unprotected error in call to Lua API ([string "spa_class("xxxx")..."]:8: attempt to index a nil value)
The text was updated successfully, but these errors were encountered: