Lua crash when running multithreaded spring

Lua crash when running multithreaded spring

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
Salamander
Posts: 5
Joined: 11 Oct 2011, 23:51

Lua crash when running multithreaded spring

Post by Salamander »

Hey

I can't play multiplayer games using non-multithreaded spring because fps drops to 3 later on in the game when there are hundreds of units. I have a quad-core CPU, so I need multithreading. I recompiled spring with gml support (Gentoo 64) so I have spring-multithreaded, but during zero-k games (the only mod I tested using spring-multithreaded so far) the lua interface keeps crashing. I get many of these errors in infolog.txt

Code: Select all

(...)
[f=0000299] GML error: Sim thread called gmlDeleteLists (LUA)
[f=0000299] LuaUI::RunCallIn: error = 2, AddConsoleLine, [string "LuaUI/Widgets/chili/Controls/control.lua"]:122: Invalid call
[f=0000301] 5 errors deep in LuaUI, disabling...
(...)
or

Code: Select all

(...)
[f=0003172] GML error: Sim thread called gmlDeleteLists (LUA)
[f=0003172] 5 errors deep in LuaUI, disabling...
[f=0003172] LuaUI::RunCallIn: error = 2, AddConsoleLine, [string "LuaUI/Widgets/chili/Controls/control.lua"]:130: Invalid call
[f=0003172] Type '/luaui reload' in the chat to re-enable LuaUI.
[f=0003172] ===>>>  Please report this error to the forum or mantis with your infolog.txt
(...)
Is there anything I can do to have a playable multithreaded spring game?

----------------------------------------------
Specs:
Gentoo 64
spring-0.82.7.1
i7 CPU Q 820 @ 1.73GHz GenuineIntel (quadcore)
8GB RAM
nvidia-drivers-275.09.07
lua-5.1.4-r4 (this is my system lua, I don't know if Spring uses it, or its own)
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Lua crash when running multithreaded spring

Post by Beherith »

Dont use any widget that draws on screen with MT spring.
Salamander
Posts: 5
Joined: 11 Oct 2011, 23:51

Re: Lua crash when running multithreaded spring

Post by Salamander »

So how can I have those useful buttons like placing mexes over an area, and other useful displays?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Lua crash when running multithreaded spring

Post by hoijui »

there is a reason why the multi-threaded build of spring is not the default build. and if you figure that most gamers will have multi-core CPUs these days, you know that it can not be that it runs slower on single core CPUs.
making spring run well, and well distributed over multiple threads is a very hard thing to do, and we are just on the way there.
i guess you have seen the MT related warning in your infolog.txt.
BA should work much better with MT then ZK.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Lua crash when running multithreaded spring

Post by zerver »

For zero-k I recommend that you wait with MT until the next version of spring. Even if you would get it to run, there are some bugs that could make it perform worse than single thread.
Salamander
Posts: 5
Joined: 11 Oct 2011, 23:51

Re: Lua crash when running multithreaded spring

Post by Salamander »

hoijui wrote:(...) and if you figure that most gamers will have multi-core CPUs these days, you know that it can not be that it runs slower on single core CPUs.
I figure that most gamers have dual-core CPUs where the speed of a single core is on average higher than that of a core in a quad-core CPU. I also notice that only one of my CPU cores is maxed out when performance drops.

Another point of interest is that SpringLobby reports most people as having a CPU speed of 6.7GHz. Why that is I do not know, obviously that is not what they have, but I am curious why it does that. My CPU speed is correctly reported as 1.7GHz.

The low fps issue is not related to my GPU, as I presume my GPU is better than the average Spring gamer's one, and, more importantly, the low fps is not correlated to the number of units visible on screen. It drops when the number of units on the whole map is high, even if they're all off the screen, and therefore not rendered.

The only conclusion that makes sense to me is that this is a CPU issue - the processor is the bottleneck in my case. If you have a better idea, then please do share it.
zerver wrote:For zero-k I recommend that you wait with MT until the next version of spring
Specifically the next one, or some future one? If the former, are you referring to a major or minor new version?
Is there a roadmap I can read?
luckywaldo7
Posts: 1398
Joined: 17 Sep 2008, 04:36

Re: Lua crash when running multithreaded spring

Post by luckywaldo7 »

Salamander wrote:Another point of interest is that SpringLobby reports most people as having a CPU speed of 6.7GHz. Why that is I do not know, obviously that is not what they have, but I am curious why it does that. My CPU speed is correctly reported as 1.7GHz.
Mostly unrelated to OP but FYI, that is what Zero-K Lobby reports as CPU speed instead of actual CPU speed, to help the devs identify who is using it.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Lua crash when running multithreaded spring

Post by zerver »

Salamander wrote:Specifically the next one, or some future one? If the former, are you referring to a major or minor new version?
Is there a roadmap I can read?
The next major is supposed to work. If it does not, you should mantis it immediately.
Post Reply

Return to “Help & Bugs”