gopher-lua icon indicating copy to clipboard operation
gopher-lua copied to clipboard

attempt to index a non-table object(nil) stack traceback

Open ycwmuyi opened this issue 5 years ago • 1 comments

  • [ ] GopherLua is a Lua5.1 implementation. You should be familiar with Lua programming language. Have you read Lua 5.1 reference manual carefully?
  • [ ] GopherLua is a Lua5.1 implementation. In Lua, to keep it simple, it is more important to remove functionalities rather than to add functionalities unlike other languages . If you are going to introduce some new cool functionalities into the GopherLua code base and the functionalities can be implemented by existing APIs, It should be implemented as a library.

Please answer the following before submitting your issue:

  1. What version of GopherLua are you using? : 1.12.1
  2. What version of Go are you using? : v0.0.0-20181214045814-db9ae37725ec
  3. What operating system and processor architecture are you using? : linux
  4. What did you do? : `function _Wr1GLBdEKztyPO0Q() echo('{"coroutine_id":"_Wr1GLBdEKztyPO0Q","id":"end"}') end

new_coroutine(_Wr1GLBdEKztyPO0Q) -- 子任务1 echo('{"coroutine_id":"main","id":"_dL7akqsvClewPS0d"}') -- hone movej({j0 = -0.021467549799530253, j1 = -2.306976205286105, j2 = 2.393370003259824, j3 = -0.1303760951239764, j4 = -0.010821041362364843, j5 = 0.2569124658935653}, 0.785, 0.785, 0, 0) echo('{"coroutine_id":"main","id":"_6wMR9k0rEkRS4nsI"}') -- 2 movej({j0 = -0.09407324668249435, j1 = -1.374272253020335, j2 = 1.6348499103430885, j3 = -0.2488839513343914, j4 = 1.5104079346758927, j5 = 0.2558652683423687}, 0.785, 0.785, 0, 0)`

this is my code, "new_coroutine" "movej" "echo" Is my custom method,"new_coroutine" can add new coroutine in golang to exec GopherLua,

  1. What did you expect to see? : normal run
  2. What did you see instead? : <string>:8: attempt to index a non-table object(nil) stack traceback: <string>:8: in main chunk [G]: ? It does not have to occur, it only appears once after running dozens or thousands of times

ycwmuyi avatar Mar 10 '20 07:03 ycwmuyi

Any luck on this?

tooolbox avatar Mar 22 '21 20:03 tooolbox