Opened 5 years ago

Closed 5 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

http://buildbot.springrts.com/builders/validationtests/builds/4777/steps/validation%20test_2/logs/stdio

very likely an endless loop in the console because of screensize is 1x1 or sth. like that.

Change History (14)

comment:1 by abma, 5 years ago

Component: BARBA trunk

comment:2 by Floris, 5 years ago

what where?

comment:3 by Floris, 5 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
Last edited 5 years ago by Floris (previous) (diff)

comment:4 by abma, 5 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!!)

Last edited 5 years ago by abma (previous) (diff)

comment:5 by abma, 5 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 abma, 5 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 Bluestone, 5 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?

Last edited 5 years ago by Bluestone (previous) (diff)

comment:8 by Bluestone, 5 years ago

Priority: majorcritical

comment:9 by abma, 5 years ago

validation test uses ba:stable, so it very likely broke when BA was updated to 9.00.

comment:10 by Bluestone, 5 years ago

It was broken in http://imolarpg.dyndns.org/trac/balatest/changeset/3767#file4

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.

Last edited 5 years ago by Bluestone (previous) (diff)

comment:11 by Bluestone, 5 years ago

Owner: set to Floris

comment:12 by Floris, 5 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 Floris, 5 years ago

blackholehost7 has got a new test ba version applied

(and i updated my preferences and added email address for notifications)

Last edited 5 years ago by Floris (previous) (diff)

comment:14 by Bluestone, 5 years ago

Resolution: fixed
Status: newclosed

Oh - since its dependent on a config value reproducing could fail. [3907] works for me.

Note: See TracTickets for help on using tickets.