ant icon indicating copy to clipboard operation
ant copied to clipboard

[ERROR]( ant.window|world )attempt to perform arithmetic on a nil value (upvalue 'mouse_lastx')

Open constly opened this issue 2 years ago • 1 comments

在我自己的工程里面,某些情况下按鼠标右键会出现下面的报错,没找到稳定复现的手法

[2024-01-24 14:34:01.76][INFO ]( ant.window|world )(G:/ant/pkg/ant.ecs/main.lua:575) System refreshed.
[2024-01-24 14:34:01.76][INFO ]( ant.window|world )(G:/ant/pkg/ant.render/viewport/window_resize.lua:38) device_size:   0       0       1280    720
[2024-01-24 14:34:01.76][INFO ]( ant.window|world )(G:/ant/pkg/ant.render/viewport/window_resize.lua:39) main viewrect: 0       0       1280    720
[2024-01-24 14:34:08.12][ERROR]( ant.window|world )attempt to perform arithmetic on a nil value (upvalue 'mouse_lastx')
stack traceback:
        ( service:9 )
        G:/ant/pkg/ant.camera/camera_controller.lua:257: in local 'f'
        G:/ant/pkg/ant.ecs/main.lua:389: in upvalue 'update_func'
        G:/ant/pkg/ant.ecs/main.lua:414: in field '_pipeline_update'
        G:/ant/pkg/ant.ecs/main.lua:585: in method 'pipeline_update'
        G:/ant/pkg/ant.window/service/world.lua:95: in upvalue 'f'

constly avatar Jan 24 '24 06:01 constly

我找到了必现的手法:

  1. 执行 "bin/msvc/debug/lua.exe" "test/simple/main.lua"
  2. 在imgui窗口内 按住 鼠标右键 拖动,必定会报上面的错

constly avatar Feb 06 '24 03:02 constly