Opened 6 years ago
Closed 6 years ago
#897 closed defect (fixed)
endless-loop with spring-headless in AddConsoleLine callin
Reported by: | abma | Owned by: | Floris |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | BA trunk | Version: | |
Keywords: | Cc: |
Description
very likely an endless loop in the console because of screensize is 1x1 or sth. like that.
Change History (14)
comment:1 by , 6 years ago
Component: | BAR → BA trunk |
---|
comment:2 by , 6 years ago
comment:3 by , 6 years ago
here in red console i assume....
function widget:AddConsoleLine(lines,priority) lines = lines:match('^\[f=[0-9]+\] (.*)$') or lines local textcolor for line in lines:gmatch("[^\n]+") do textcolor = processLine(line, console, Config.console, textcolor)[4] end clipHistory(console,true) end
comment:4 by , 6 years ago
thats a stacktrace from the lua watchdog:
[f=0000000] [Watchdog] Hang detected: [f=0000000] 0, line, lineColour [f=0000000] stack traceback: [string "LuaUI/Widgets/watchdog.lua"]:20: in function <[string "LuaUI/Widgets/watchdog.lua"]:14> [string "LuaUI/Widgets/gui_red_console.lua"]:297: in function 'lineColour' [string "LuaUI/Widgets/gui_red_console.lua"]:334: in function 'clipLine' [string "LuaUI/Widgets/gui_red_console.lua"]:382: in function 'clipHistory' [string "LuaUI/Widgets/gui_red_console.lua"]:749: in function <[string "LuaUI/Widgets/gui_red_console.lua"]:743> [C]: in function 'pcall' [string "LuaUI/bawidgets.lua"]:628: in function 'AddConsoleLine' [string "LuaUI/bawidgets.lua"]:1169: in function <[string "LuaUI/bawidgets.lua"]:1167> (tail call): ?
(fu$k, we need email-notification here!!)
comment:5 by , 6 years ago
spring-headless runs with 8x8 window:
[InitOpenGL] video mode set to 8x8:24bit @100Hz (windowed)
so very likely its reproduceable with normal spring, too when window is very small
comment:6 by , 6 years ago
any more info needed to fix this? its imo urgent as it totally breaks validation tests for spring development. only "fix" would be to disable validation tests with ba which is bad for spring and ba. :-|
comment:7 by , 6 years ago
It's not reproducible with normal spring, because Spring has a min window size.
Do you know what/when something changed to cause the error?
comment:8 by , 6 years ago
Priority: | major → critical |
---|
comment:9 by , 6 years ago
validation test uses ba:stable, so it very likely broke when BA was updated to 9.00.
comment:10 by , 6 years ago
It was broken in http://imolarpg.dyndns.org/trac/balatest/changeset/3767/trunk/luaui/widget/gui_red_console.lua
The breaking change was the alteration to maxsize in lines 372-376, which can result in maxsize being negative. This causes an infinite loop in clipLine.
To reproduce, simply run spring+BA as normal to generate a script.txt, then quit and drag that same script.txt over spring-headless.exe.
comment:11 by , 6 years ago
Owner: | set to |
---|
comment:12 by , 6 years ago
removed those lines, it indeed could cause a negative value
(btw dragging a script.txt (generated by local game) onto spring-headless didnt show me errors, just that i was connected or smth)
comment:13 by , 6 years ago
blackholehost7 has got a new test ba version applied
(and i updated my preferences and added email address for notifications)
comment:14 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Oh - since its dependent on a config value reproducing could fail. [3907] works for me.
what where?