[Ack] Mega clearing/mega building bug


#1

Summary: I decided to try and see how large a building I could build. I cleared a significant area and made a massive building, but got constant [variable ‘total_score’ is not declared] errors and a slowdown that made it unplayable.

Steps to reproduce:

  1. Start new game
  2. Zoom out
  3. Harvest everything on screen
  4. Build as large a building as possible

Expected Results:

Building is completed within the hour.

Actual Results:

Notes:

The game became extremely sluggish. The computer usage monitor bar at the bottom right of the screen went from mostly green to blue and pink, over 75% pink by the time I quit. (What do you call that thing, anyways?!)

My score was quite high, over 31000.

Versions and Mods: V134


#2

I’ve had similar with large buildings in r127:

Part of a list of bugs, but I had the same town score error with a large building.

It’s just showing you what SH is spending most of its CPU cycles working on.


#3

thanks for the report @phector2004… and thanks for the confirmation @Teleros:+1:

should this perhaps stand on its own, as a separate report?


#4

Huh? This is a thread for the giant building / town score bug, with confirmation :confused: .

Anyway, I’ve recreated it, and noticed a few things:

  1. Much slowdown when designing the building - placing walls & the roof, principally. After that it was fine for me though.
  2. Lots of blue bar stuff in the bottom right - the blue / light grey in that bar in the bottom left is for LUA (blue) / native tasks (light grey).

Edit: The error code in detail:

stack traceback:
radiant/modules/events.luac:64: in function <radiant/modules/events.luac:64>
[C]: in function 'error'
radiant/lualibs/strict/luac:12: in function '__index'
Stonehearth/services/server/score/score_service.luac:63: in function '__calculate_category_level'
Stonehearth/services/server/score/score_service.luac:50: in function '__calculate_category:score_from_subscores'
Stonehearth/services/server/score/score_service.luac:41: in function '__get_aggregate_score_from_player'
Stonehearth/services/server/score/score_service.luac:28: in function '__calculate_net_worth'
Stonehearth/services/server/score/score_service.luac:3: in function '__fn'
radiant/modules/time_tracker.luac:17: in function 'fire'
radiant/modules/time_tracker.luac:26: in function 'set_now'
Stonehearth/services/server/calendar/calendar_service.luac:64: in function 'fn'
radiant/modules/events.luac:73: in function <radiant/modules/events.luac:72>
[C]: in function 'xpcall'
radiant/modules/events.luac:72: in function 'trigger'
radiant/modules/events.luac:86: in function '_update'
radiant/server.luac:25: in function <radiant/server.luac:23>

#5

haha… yes, I realize that… :stuck_out_tongue:

your earlier reply made it sound as though you had already reported something similar in another thread, so I wasn’t sure if this thread should remain, or be merged…

but thanks for the formal confirmation! :smile:


#6

Yeah I suspect it’s a similar bug, but (as usual :stuck_out_tongue: ) I’d lumped my bugs all together, so a dedicated topic makes sense I think :slight_smile: .


#7

I too have had this bug. I had just completed work on the Great Smial and my score was tipping in at around 49k.
The great and the good from across the land were joining in droves and then:

2014-Sep-14 20:13:35.524282 | 0 | lua.code | stonehearth/services/server/score/score_service.luac:63: variable ‘total_score’ is not declared

Reality for my Hearthling/Meeple/SHeeples became a wee bit wobbly.
One crash later and the Great Smial is nought but fond recollections and regret.


#8

Whoops, my bad. Thanks @Albert for pointing out exactly where we were going wrong. Fixed on my machine.

Until the next fix, the workaround for you all is to go into score_category,json and set the last level’s net worth to be much, much higher than you expect to achieve between now and our next push. With any luck, this will fix your saved games.